Skip to content

Add Go console runtime mirroring core agent loop - #371

Merged
rogeralsing merged 1 commit into
mainfrom
codex/create-go-console-app-and-core-package
Oct 24, 2025
Merged

rogeralsing merged 1 commit into
mainfrom
codex/create-go-console-app-and-core-package

Conversation

@rogeralsing

Copy link
Copy Markdown
Contributor

Summary

  • add a new golang workspace with a console runtime that mirrors the TypeScript agent loop
  • embed the canonical OpenAgent plan schema and implement plan management, command execution, and OpenAI client wrappers in Go
  • document the new workspace in the root context index

Testing

  • not run (environment limitations fetching Go modules)

https://chatgpt.com/codex/tasks/task_e_68fbcf52f9a08328b1652ee0a2732790

@rogeralsing
rogeralsing merged commit 69bae26 into main Oct 24, 2025
1 check failed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +157 to +175
func (rt *Runtime) executePlanIfReady(ctx context.Context) (bool, error) {
step, ok := rt.planManager.Ready()
if !ok {
return false, nil
}

if !rt.options.AutoApprove && !rt.options.NoHuman {
fmt.Fprintf(rt.writer, "\nPlan step %s is ready:\n %s\n Command: %s\nExecute? [y/N]: ", step.ID, step.Title, step.Command.Run)
answer, err := rt.reader.ReadString('\n')
if err != nil {
if errors.Is(err, io.EOF) {
return false, err
}
return false, fmt.Errorf("runtime: read approval: %w", err)
}
answer = strings.TrimSpace(strings.ToLower(answer))
if answer != "y" && answer != "yes" {
fmt.Fprintf(rt.writer, "Skipped plan step %s.\n", step.ID)
return true, nil

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update plan state when user rejects a step

When auto-approve is disabled, answering anything other than y/yes at the approval prompt just prints Skipped plan step <id> and returns (executePlanIfReady exits at the early return on rejection) without marking the step as abandoned or notifying the assistant. The step remains pending in the manager, so the outer loop immediately calls executePlanIfReady again and displays the same approval prompt before the user can type other commands. After declining once, the runtime becomes stuck prompting forever unless the process is killed. Consider updating the step status and/or querying the assistant so that the loop can progress after a rejection.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant