Skip to content

Validate Exec CLI in multitool wrapper and update fork/resume test#13625

Merged
friel-openai merged 1 commit intodev/codex/add-fork-option-to-codex-execfrom
dev/codex/fix-exec_fork_conflicts_with_resume_subcommand-test
Mar 5, 2026
Merged

Validate Exec CLI in multitool wrapper and update fork/resume test#13625
friel-openai merged 1 commit intodev/codex/add-fork-option-to-codex-execfrom
dev/codex/fix-exec_fork_conflicts_with_resume_subcommand-test

Conversation

@friel-openai
Copy link
Copy Markdown
Contributor

Motivation

  • Ensure the multitool codex wrapper enforces the same ExecCli validation rules as the standalone codex-exec binary so codex exec --fork <id> resume is rejected consistently and the related unit test no longer fails.

Description

  • Call ExecCli::validate() in the multitool dispatch path before forwarding to codex_exec::run_main and handle validation errors by exiting appropriately; change located in codex-rs/cli/src/main.rs.
  • Update the unit test exec_fork_conflicts_with_resume_subcommand to parse the CLI and assert that exec.validate() returns an error (parse succeeds but validation fails) to reflect where the conflict is enforced.

Testing

  • Ran formatting with just fmt in the workspace and it completed successfully.
  • Executed the failing unit case with: PKG_CONFIG_PATH=/tmp/libcap-shim/lib/pkgconfig NO_PROXY=127.0.0.1,localhost cargo test -p codex-cli tests::exec_fork_conflicts_with_resume_subcommand, and the test passed.
  • Ran the codex-exec and codex-cli test suites with the same environment shim (PKG_CONFIG_PATH=/tmp/libcap-shim/lib/pkgconfig NO_PROXY=127.0.0.1,localhost) and they completed successfully.

Codex Task

@friel-openai friel-openai added the codex Label used by connector to tag PRs that have been reviewed by Codex label Mar 5, 2026 — with ChatGPT Codex Connector
@friel-openai friel-openai merged commit 685c6a2 into dev/codex/add-fork-option-to-codex-exec Mar 5, 2026
27 of 29 checks passed
@friel-openai friel-openai deleted the dev/codex/fix-exec_fork_conflicts_with_resume_subcommand-test branch March 5, 2026 21:32
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

codex Label used by connector to tag PRs that have been reviewed by Codex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant