feat(codex): accept --yolo launch flag#54
Merged
Conversation
Codex CLI ships a hidden `--yolo` alias for `--full-auto` (equivalent to `--dangerously-bypass-approvals-and-sandbox`). hcom's argument allowlist rejected it before launch, so `hcom codex --yolo` failed even though the underlying `codex --yolo` works. Adds `--yolo` to: - `BOOLEAN_FLAGS` (parser accepts it as a no-arg flag) - `SANDBOX_FLAGS` (treated as a sandbox-group override) - `ensure_hcom_writable`'s sandbox-active detector (so hcom CWD is added to writable roots) Behavior parallels `--full-auto` and `--dangerously-bypass-approvals-and-sandbox`. Adds 4 regression tests covering: - parser acceptance of `--yolo` - `--yolo` overriding sandbox-group flags in merge - `--yolo` triggering hcom-writable sandbox handling - `--yolo` overriding hcom's default sandbox in preprocessing Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
RichelynScott
added a commit
to RichelynScott/hcom
that referenced
this pull request
May 24, 2026
FYI.md: append 2026-05-23 entry — full audit + merge + binary swap procedure, cross-family security review verdict (SAFE), upstream PR link, and the "DO NOT uv tool upgrade" rule until PR aannoo#54 ships. HANDOFF.md: rewrite for new state. Fork is now 4 commits ahead of upstream/main (3 docs + merge); installed binary is locally built v0.7.18; PR aannoo#54 open; safety tag pre-merge-v0.7.18-20260523 preserves rollback. Added BINARY SWAP PATTERN as Rule aannoo#2 so any future session knows the mv-rename trick when the binary is text-file-busy. PROJECT_INDEX.json: regenerated to reflect new HANDOFF section structure and log count. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Owner
|
thanks! |
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
Codex CLI ships a hidden
--yoloalias for--full-auto(equivalent to--dangerously-bypass-approvals-and-sandbox). hcom's Codex argument allowlist rejects it before launch, sohcom codex --yolofails even though the underlyingcodex --yolo --versionworks:This PR adds
--yoloto the parser allowlist, sandbox-group set, and the hcom-writable sandbox-active detector — behavior parallels the existing handling for--full-autoand--dangerously-bypass-approvals-and-sandbox.Changes
src/tools/codex_args.rs:BOOLEAN_FLAGSadds--yolo(parser accepts it as a no-arg flag)SANDBOX_FLAGSadds--yolo(treated as a sandbox-group override during arg merge)test_parse_yolo_hidden_aliastest_merge_yolo_overrides_sandbox_grouptest_parse_boolean_flagsextended to cover--yolosrc/tools/codex_preprocessing.rs:ensure_hcom_writablesandbox-active list adds--yolo(so hcom CWD lands in--add-dirset)test_ensure_hcom_writable_treats_yolo_as_sandbox_activetest_preprocess_yolo_overrides_hcom_default_sandboxNo dependency changes. No schema or CLI-contract changes for existing flags. Doc updates intentionally omitted — happy to add if you'd prefer them in this PR.
Test plan
cargo test --release --lockedpasses locally (all 4 new tests + full suite)cargo clippy --all-targets --locked -- -D warningscleancargo fmt --all -- --checkcleanhcom codex --yoloaccepts the flag and propagates it through preprocessing with sandbox-active treatmentBranched from
aannoo/hcom@mainand squash-friendly — single focused commit.