Repository navigation
Make exec the default worker mode (codex 0.155+) - #3
Conversation
…command Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 876fc0e49c
ℹ️ 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".
| function resolveMode(values: Record<string, unknown>): CodexMode { | ||
| if (values['dry-run']) return 'mock'; | ||
| const m = (values.mode as string) ?? 'mcp-server'; | ||
| const m = (values.mode as string) ?? 'exec'; |
There was a problem hiding this comment.
Reject nonzero exits before making exec the default
When codex exec exits nonzero after writing an authentication, configuration, quota, or model error only to stderr, runCommand leaves res.error unset and ExecCodexClient.runTask (src/codex-client.ts:353-361) parses the empty stdout and returns a placeholder response. With this line selecting exec by default, task consequently reports status: "ok", while project loops verify and retry as though Codex responded; check exitCode and propagate stderr before promoting this transport.
Useful? React with 👍 / 👎.
| '-c', | ||
| shellQuote(`sandbox_mode="${input.sandbox}"`), | ||
| '-c', | ||
| shellQuote(`approval_policy="${input.approvalPolicy}"`), |
There was a problem hiding this comment.
Reject approval policies removed in Codex 0.155
When an API or CLI caller selects the still-advertised untrusted or on-failure policy, this override causes the targeted Codex 0.155 executable to reject its configuration before running the task. The 0.155 AskForApproval schema accepts only on-request, a granular object, or never, while this repository's CLI types and MCP schema continue accepting all four strings; validate policies according to the selected transport/version rather than forwarding unsupported values.
Useful? React with 👍 / 👎.
| - **Integration path:** **`codex exec --json`** is the default worker transport | ||
| (codex-cli 0.155+ removed `codex mcp-server`, which remains available via | ||
| `--mode mcp-server` for older CLIs). Both sit behind one `CodexClient` interface alongside a **mock** impl. |
There was a problem hiding this comment.
Update the remaining worker-mode documentation
After announcing exec as the default and stating that Codex 0.155 removed mcp-server, the same README still labels mcp-server as the primary path at lines 249-250, tells users to verify it at lines 280-281, says the default real example uses it at lines 440-442, and describes exec as merely a fallback at lines 458-465. A user following the 0.155 setup instructions will therefore run a removed command and receive an inaccurate explanation of the actual transport; update those sections together with this compatibility statement.
Useful? React with 👍 / 👎.
codex-cli 0.155+ removed
codex mcp-server. Exec is now the default in cli and MCP server; sandbox/approval are passed via-coverrides; commands/massa.md synced with the live copy. Verified: build, 13/13 tests, and a real exec task returns the assistant text.🤖 Generated with Claude Code