Skip to content

fix: correct codex CLI invocation flags#426

Open
datashaman wants to merge 3 commits intogarrytan:mainfrom
datashaman:fix/codex-invocation-flags
Open

fix: correct codex CLI invocation flags#426
datashaman wants to merge 3 commits intogarrytan:mainfrom
datashaman:fix/codex-invocation-flags

Conversation

@datashaman
Copy link

@datashaman datashaman commented Mar 24, 2026

Summary

I've watched Claude stumble over this so, so many times, I thought I should propose a change instead.

Not sure what the policy is for supporting versions of independent commands, this is for the current one (0.116.0).

Changes

  • model_reasoning_effort="xhigh""high"xhigh is not a valid value (API rejects it with unsupported_value). Valid values: low, medium, high.
  • --enable web_search_cached--searchweb_search_cached is a deprecated feature flag. The --search flag is the correct replacement.
  • codex review --basecodex exec review --base --jsoncodex review doesn't support --json or --search flags. codex exec review does, and is needed for structured JSONL output parsing.
  • Gate verdict now checks for [P0] or [P1] markers (was [P1] only) — matches the actual priority tags from codex's built-in review_prompt.md: P0 (drop everything), P1 (urgent), P2 (normal), P3 (nice-to-have).
  • Updated test assertions to match corrected flag values.

Verified against codex-cli 0.116.0.

Test plan

  • bun test test/skill-validation.test.ts test/gen-skill-docs.test.ts — 556 pass, 1 pre-existing fail (version mismatch)
  • bun run gen:skill-docs regenerates all SKILL.md files cleanly
  • Verified codex exec review --base main --json produces valid JSONL output
  • Verified model_reasoning_effort="high" is accepted by the API
  • Verified model_reasoning_effort="xhigh" is rejected by the API

🤖 Generated with Claude Code

datashaman and others added 3 commits March 24, 2026 07:35
- model_reasoning_effort="xhigh" → "high" (valid: minimal/low/medium/high)
- --enable web_search_cached → --search (old flag removed)
- Update test assertions to match new flag values

These flags caused codex invocations to fail on first try, requiring
multiple retries before Claude found the correct combination.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
codex review doesn't support --json or --search flags.
codex exec review supports --json for JSONL output parsing.
Also update web search docs to clarify which modes support --search.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@datashaman datashaman force-pushed the fix/codex-invocation-flags branch from 55a9388 to baac156 Compare March 24, 2026 05:35
@datashaman datashaman marked this pull request as ready for review March 24, 2026 05:38
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.

1 participant