Skip to content

[codex] teach orchestrator status command guidance#2227

Open
cneuralnetwork wants to merge 4 commits into
AgentWrapper:mainfrom
cneuralnetwork:codex/orchestrator-status-help
Open

[codex] teach orchestrator status command guidance#2227
cneuralnetwork wants to merge 4 commits into
AgentWrapper:mainfrom
cneuralnetwork:codex/orchestrator-status-help

Conversation

@cneuralnetwork

@cneuralnetwork cneuralnetwork commented Jun 27, 2026

Copy link
Copy Markdown

Summary

Teach orchestrator sessions the existing worker status commands instead of leaving them to guess. The standing orchestrator prompt now points to ao session ls, ao session get <worker-session-id>, and ao --help as the fallback before inventing commands.

Why

The prompt previously listed ao spawn and ao send, then told the orchestrator to track worker progress without naming the real inspection commands. That made orchestrators try nonexistent commands such as ao list or ao status --session before eventually discovering help.

Changes

  • Added status-command guidance to orchestratorPrompt.
  • Extended TestSpawnOrchestrator_UsesCoordinatorPrompt to assert the status and help hints are present in the orchestrator system prompt.
  • Stabilized the native CLI E2E harness by reaping the directly-started daemon child while ao stop polls for shutdown, matching the production ao start behavior.
  • Applied goimports/gofmt cleanup to the files reported by CI.

Testing

  • env GOTOOLCHAIN=auto GOSUMDB=sum.golang.org GOCACHE=/tmp/ao-go-cache GOPATH=/tmp/ao-gopath go test ./internal/session_manager
  • env GOTOOLCHAIN=auto GOSUMDB=sum.golang.org GOCACHE=/tmp/ao-go-cache GOPATH=/tmp/ao-gopath go test -race ./internal/session_manager
  • env GOTOOLCHAIN=auto GOSUMDB=sum.golang.org GOCACHE=/tmp/ao-go-cache GOPATH=/tmp/ao-gopath SHELL=/bin/bash go test -tags e2e -run TestE2E_Lifecycle -v ./internal/cli
  • env GOTOOLCHAIN=auto GOSUMDB=sum.golang.org GOCACHE=/tmp/ao-go-cache GOPATH=/tmp/ao-gopath SHELL=/bin/bash go test -tags e2e -v ./internal/cli
  • env GOTOOLCHAIN=auto GOSUMDB=sum.golang.org GOCACHE=/tmp/ao-go-cache GOPATH=/tmp/ao-gopath SHELL=/bin/bash go test ./...
  • env GOTOOLCHAIN=auto GOSUMDB=sum.golang.org GOCACHE=/tmp/ao-go-cache GOPATH=/tmp/ao-gopath SHELL=/bin/bash npm run lint
  • env GOTOOLCHAIN=auto GOSUMDB=sum.golang.org GOCACHE=/tmp/ao-go-cache GOPATH=/tmp/ao-gopath SHELL=/bin/bash go test -race ./...

Fixes #2197

@cneuralnetwork cneuralnetwork marked this pull request as ready for review June 27, 2026 11:41
@Vaibhaav-Tiwari Vaibhaav-Tiwari self-requested a review June 27, 2026 13:09

@Vaibhaav-Tiwari Vaibhaav-Tiwari left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm but there are some failing checks so please fix those

Image

…ator into codex/orchestrator-status-help

# Conflicts:
#	backend/internal/session_manager/manager.go
#	backend/internal/session_manager/manager_test.go
@axisrow

axisrow commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Heads up — after the merge-main commit (0f67456), all three workflows are sitting in action_required, not failing. They were green on 15eb8c7 (where @Vaibhaav-Tiwari approved). A maintainer "Approve and run" (or a nudge push) should get CI moving again. Just flagging so this doesn't stall — #2197 is the issue behind it.

Note: #2255 covers the same change; happy to close that one as a duplicate if this lands.

@illegalcall illegalcall left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review findings:

  1. Please split the backend/internal/cli/e2e_test.go daemon-cleanup change out of this PR. Issue #2197 is limited to orchestrator status-command guidance, while this hunk changes unrelated test behavior. More importantly, the five-second timeout only logs and allows the test to pass, which can hide a shutdown regression and leave the daemon child running. A separate fix should make the timeout fail and explicitly terminate/reap the process.

  2. In backend/internal/session_manager/manager.go, please retain the existing help sentence and only add the requested status-command line. The issue explicitly describes the existing ao --help guidance and asks to add one line, so rewording that instruction adds unnecessary prompt-behavior churn.

The core ao session ls / ao session get <worker-session-id> guidance and its assertions look correct.

@axisrow

axisrow commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

@cneuralnetwork — hurry up please, mergeable is DIRTY only because of a stale merge-base (0b45b676, Jul 6). The conflict is already resolved in the tree — git merge origin/main auto-merges clean. Fetch → merge → push flips it to MERGEABLE.

(Also pending: @illegalcall's review asks to split the e2e_test.go hunk into its own PR.)

…ator into codex/orchestrator-status-help

# Conflicts:
#	backend/internal/session_manager/manager.go
#	backend/internal/session_manager/manager_test.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Orchestrator prompt has no worker status commands (ao session ls / ao session get)

4 participants