Omit redundant -a on-request from shipped codex harness - #104
Merged
Merged
Conversation
Codex CLI treats --ask-for-approval (-a <policy>) and --dangerously-bypass-approvals-and-sandbox (--yolo) as mutually exclusive clap arguments. Because vaulted-agent forwards operator flags by appending them to the harness command line, having -a on-request baked into etc/harnesses.d/codex.conf caused 'va codex --yolo' to fail at clap validation. Codex already defaults to OnRequest when no approval flag is given, so omitting -a on-request preserves normal behavior while allowing --yolo (or custom -a <policy> overrides) to pass cleanly. Also: - Update README pick example row for codex - Add regression test in tests/cli_launch.rs - Add troubleshooting entry in AGENTS.md for permission denied on project configs in operator homes with workdir=caller
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Removes
-a on-requestfrometc/harnesses.d/codex.conf.Context & Motivation
When launching Codex via
va codex --yolo,vaulted-agentappends operator flags to the configured harness command:Because Codex CLI's argument parser (built on
clap) treats--ask-for-approval(-a <policy>) and--dangerously-bypass-approvals-and-sandbox(--yolo) as mutually exclusive, this fails fatally:Codex already defaults to
OnRequestwhen no approval flag is given (including with-s danger-full-access). Omitting-a on-requestpreserves normal behavior while allowing--yolo(and explicit-a never/-a on-request) to pass through without conflict.Changes
etc/harnesses.d/codex.conf: Changecommand = codex -s danger-full-access -a on-requesttocommand = codex -s danger-full-access.README.md: Update the samplevaulted-agent picktable row for codex.AGENTS.md: Add troubleshooting entry forPermission deniedon project configs (e.g.~/.codex/config.tomlmode 0600) when launched from an operator home withworkdir = caller.tests/cli_launch.rs: Addshipped_codex_harness_preserves_extra_args_without_approval_conflictintegration test.Verification
test shipped_codex_harness_preserves_extra_args_without_approval_conflict ... oktests/cli_launch.rspass.va codex --yolo doctorandva codex doctoras operator.