Skip to content

Make exec the default worker mode (codex 0.155+) - #3

Merged
Solarthis merged 1 commit into
mainfrom
fix/exec-mode-default
Oct 17, 2026
Merged

Solarthis merged 1 commit into
mainfrom
fix/exec-mode-default

Conversation

@Solarthis

Copy link
Copy Markdown
Owner

codex-cli 0.155+ removed codex mcp-server. Exec is now the default in cli and MCP server; sandbox/approval are passed via -c overrides; 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

…command

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T14:48:54.360502Z 876fc0e PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Solarthis
Solarthis merged commit ebd0f3b into main Oct 17, 2026
1 check passed

@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.

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".

Comment thread src/cli.ts
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';

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 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 👍 / 👎.

Comment thread src/codex-client.ts
Comment on lines +344 to +347
'-c',
shellQuote(`sandbox_mode="${input.sandbox}"`),
'-c',
shellQuote(`approval_policy="${input.approvalPolicy}"`),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Comment thread README.md
Comment on lines +49 to +51
- **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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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.

1 participant