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 Mar 5, 2026
Conversation
685c6a2
into
dev/codex/add-fork-option-to-codex-exec
27 of 29 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
codexwrapper enforces the sameExecClivalidation rules as the standalonecodex-execbinary socodex exec --fork <id> resumeis rejected consistently and the related unit test no longer fails.Description
ExecCli::validate()in the multitool dispatch path before forwarding tocodex_exec::run_mainand handle validation errors by exiting appropriately; change located incodex-rs/cli/src/main.rs.exec_fork_conflicts_with_resume_subcommandto parse the CLI and assert thatexec.validate()returns an error (parse succeeds but validation fails) to reflect where the conflict is enforced.Testing
just fmtin the workspace and it completed successfully.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.codex-execandcodex-clitest 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