Skip to content

feat(codex): accept --yolo launch flag#54

Merged
aannoo merged 1 commit into
aannoo:mainfrom
RichelynScott:feat/codex-yolo-flag
May 24, 2026
Merged

feat(codex): accept --yolo launch flag#54
aannoo merged 1 commit into
aannoo:mainfrom
RichelynScott:feat/codex-yolo-flag

Conversation

@RichelynScott
Copy link
Copy Markdown
Contributor

Summary

Codex CLI ships a hidden --yolo alias for --full-auto (equivalent to --dangerously-bypass-approvals-and-sandbox). hcom's Codex argument allowlist rejects it before launch, so hcom codex --yolo fails even though the underlying codex --yolo --version works:

$ hcom codex --yolo
Error: unrecognized flag: --yolo

This PR adds --yolo to the parser allowlist, sandbox-group set, and the hcom-writable sandbox-active detector — behavior parallels the existing handling for --full-auto and --dangerously-bypass-approvals-and-sandbox.

Changes

  • src/tools/codex_args.rs:
    • BOOLEAN_FLAGS adds --yolo (parser accepts it as a no-arg flag)
    • SANDBOX_FLAGS adds --yolo (treated as a sandbox-group override during arg merge)
    • New unit test test_parse_yolo_hidden_alias
    • New unit test test_merge_yolo_overrides_sandbox_group
    • Existing test_parse_boolean_flags extended to cover --yolo
  • src/tools/codex_preprocessing.rs:
    • ensure_hcom_writable sandbox-active list adds --yolo (so hcom CWD lands in --add-dir set)
    • New unit test test_ensure_hcom_writable_treats_yolo_as_sandbox_active
    • New unit test test_preprocess_yolo_overrides_hcom_default_sandbox

No 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 --locked passes locally (all 4 new tests + full suite)
  • cargo clippy --all-targets --locked -- -D warnings clean
  • cargo fmt --all -- --check clean
  • Manual: hcom codex --yolo accepts the flag and propagates it through preprocessing with sandbox-active treatment
  • CI: would benefit from confirmation on macOS / Windows runners

Branched from aannoo/hcom@main and squash-friendly — single focused commit.

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>
@aannoo
Copy link
Copy Markdown
Owner

aannoo commented May 24, 2026

thanks!

@aannoo aannoo merged commit 38c971b into aannoo:main May 24, 2026
10 checks passed
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.

2 participants