Skip to content

/codex review broken on Codex CLI ≥ 0.130.0 — passes [PROMPT] + --base together, which the CLI now rejects #1428

@Stashub

Description

@Stashub

What

The /codex skill's Review mode (Step 2A in skills/codex/SKILL.md) always invokes:

codex review "<filesystem-boundary instruction>[\n\n<user custom instructions>]" --base <base> -c 'model_reasoning_effort="high"' --enable web_search_cached

i.e. it passes a positional [PROMPT] and --base <branch>. Codex CLI 0.130.0 rejects that combination:

error: the argument '[PROMPT]' cannot be used with '--base <BRANCH>'
Usage: codex review --config <key=value> --enable <FEATURE> <PROMPT>

codex review --help on 0.130.0 confirms it — [PROMPT] and --base / --uncommitted are mutually exclusive (review either from a custom prompt or against a base branch / uncommitted changes, not both):

Usage: codex review [OPTIONS] [PROMPT]
Arguments:
  [PROMPT]          Custom review instructions. If `-` is used, read from stdin
Options:
      --uncommitted    Review staged, unstaged, and untracked changes
      --base <BRANCH>  Review changes against the given base branch

Step 2A's "Always pass the filesystem boundary instruction as the prompt argument, even without custom instructions" guarantees the conflict on every /codex review call.

Impact

/codex review and /codex review <custom instructions> fail immediately on Codex CLI ≥ 0.130.0. /codex challenge and /codex (consult) are unaffected — they use codex exec, not codex review.

Repro

$ codex review "anything" --base main
error: the argument '[PROMPT]' cannot be used with '--base <BRANCH>'

Suggested fixes (pick whichever fits)

  1. Route prompted reviews through codex exec (like Challenge/Consult already do): embed the filesystem boundary + custom instructions + a git diff <base> / git show instruction in the prompt; run codex exec "<prompt>" -s read-only. Loses the built-in P1/P2 gate parsing, but you can request [P1]/[P2] markers in the prompt and parse those.
  2. Branch on whether custom instructions exist: none → codex review --base <base> bare; custom instructions present → the codex exec route from (1).
  3. Try stdin: printf '%s' "<prompt>" | codex review - --base <base>--help says - reads PROMPT from stdin; worth testing whether - + --base is also rejected (the conflict may be about a literal positional only).
  4. Add 0.130.0+ awareness to gstack-codex-probe so the skill warns / falls back gracefully instead of hard-erroring.

Also worth a look: codex review --uncommitted (new in 0.130.0) might be a cleaner default than --base <default-branch> for the common "review my working changes" case.


Filed from a /codex run that hit this — worked around it via consult mode (codex exec + git show <commit>), which got the review done fine; flagging so the happy path works again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions