31 tools· updated nov 2026

codex review: what it found in my test, the four targets, and the GitHub route

Marek.

  • codex
  • coding-agents
  • ai-code-review

codex review runs a code review from the terminal, without opening the Codex TUI. Each run takes one target. Pick uncommitted work, a base branch, a commit or a prompt. This is for Codex users who want a second reader on a diff. Short answer: it does the job. codex-cli 0.167.2 caught the main bug I planted twice, in 29 and 24 seconds.

codex review --uncommitted                      # staged, unstaged, untracked
codex review --base main                        # changes since the merge base
codex review --commit <SHA> --title "<TITLE>"   # one commit
codex review "Check only the SQL changes"       # custom instructions
  • One target per run. --uncommitted, --base, --commit and a prompt conflict with each other. --title needs --commit.
  • Report only. The docs say the reviewer reports findings "without changing your working tree".
  • Priority tags. Findings are tagged P0 to P3. My runs each returned one [P2] with a file and line range.
  • AGENTS.md counts. The review rubric in the Codex source tells the model to follow AGENTS.md files for the changed code.
  • Not the GitHub bot. @codex review on a pull request is a cloud feature. The CLI command posts nothing.

For scripted Codex runs in general, start with codex exec. For how far to trust an agent as a reviewer, read AI code review agents.

What does codex review do?

codex review starts a dedicated reviewer for the selected scope, prints its report and exits. codex --help on 0.167.2 describes it as "Run a code review non-interactively". Its system prompt is a review rubric from the Codex source. The rubric asks for bugs the author would fix. Style counts only when it obscures meaning or breaks documented standards.

The rubric sets two more limits. Older bugs are out. An empty report beats a weak one. My runs printed plain text: a two-sentence summary, then "Review comment:" and the findings.

Which options does codex review have?

codex review has four targets and one optional label. --uncommitted reviews staged, unstaged and untracked changes. --base <BRANCH> reviews changes against a base branch. --commit <SHA> reviews one commit. A positional PROMPT sets custom instructions. Pass - to read them from stdin. --title <TITLE> adds a commit title to the summary.

You cannot mix targets. None of these errors called the model:

$ codex review
Error: Specify --uncommitted, --base, --commit, or provide custom review instructions
$ codex review --uncommitted "focus on tests"
error: the argument '--uncommitted' cannot be used with '[PROMPT]'
$ codex review --title x
error: the following required arguments were not provided:
  --commit <SHA>

With --base, Codex computes the merge base and tells the model to diff against that SHA. If the lookup returns no SHA, the prompt asks the model to find the merge base with the upstream of that branch. A git diff against one SHA also shows uncommitted edits to tracked files. I read both paths in codex-rs/prompts/src/review_request.rs at tag rust-v0.167.2. For a separate review model, the docs point to review_model in Codex config.toml.

What did codex review find in my test?

codex review found the main planted bug in both runs and nothing else. My test function, median(), had two planted flaws. It returned the upper middle value for even-length lists. It also sorted the caller's list in place. Both runs flagged the first as P2 at stats.py:14-15. Neither run flagged the in-place sort.

I think that is a real miss, though the docstring does not forbid it. codex review --uncommitted ran first, at 09:05 CET on 12 November 2026. It took 29 seconds. Then I committed the change on a branch. codex review --base main took 24 seconds. Exit code 0 both times. Excerpt from run two's stdout, path cut short:

- [P2] Average the two middle values for even-length lists - stats.py:14-15
  For even-length inputs, this returns the upper middle element rather than
  the median. For example, `median([1, 3])` returns `3` instead of `2`.

One note from the 0.167.2 source: under some conditions, Codex saves a trust level for a new project folder in its config.toml.

How do I run codex review on GitHub?

On GitHub you use the cloud feature, not the CLI. Connect the repository to Codex and turn on code review in Codex settings. Then comment @codex review on a pull request. The docs say that in GitHub it flags only P0 and P1 issues.

Automatic reviews skip the comment. Review rules go in a ## Code Review Rules section of the nearest AGENTS.md. I did not test the GitHub route.

Can I run codex review in CI?

I expect it to work as a shell step, but the official action does not call it. The Codex docs say CODEX_API_KEY works with codex review. The Codex GitHub Action, openai/codex-action@v1, runs codex exec with a prompt or prompt file. Its action.yml has no review input.

A plain codex review --base main step needs the base branch in the clone. The docs example checks out with fetch-depth: 0. I have not tested codex review in CI.

Is there a /review command in the Codex TUI?

Yes. Type /review in an interactive Codex session. The CLI docs list four presets: review against a base branch, review uncommitted changes, review a commit, and custom review instructions. The review shows up as a turn in the transcript. I did not open the TUI for this post.

Is codex review a skill or an agent?

An agent, not a skill. codex review is a built-in CLI command that starts a dedicated review subagent. In the 0.167.2 source, that subagent gets the review rubric as its instructions and has web search turned off. It is not a skill you install. For skills, see Codex skills.

How does codex review compare with Claude Code /code-review?

Claude Code's /code-review takes free-form targets, such as a PR number or a path. It can apply fixes with --fix or post comments with --comment. codex review only reports findings in the terminal. The Claude Code column comes from its docs, not from a test.

Codex CLI 0.167.2Claude Code
Commandcodex review, /review/code-review, alias /review
Default targetNone, pick oneBranch plus uncommitted changes
Other targets--uncommitted, --base, --commit, promptPR number, commit range, path
FixesReport only--fix
PostingNone from the CLI--comment on a PR
InstructionsAGENTS.mdCLAUDE.md
GitHub bot@codex review@claude review, Team and Enterprise

Frequently asked questions

Does codex review change my files?

Not your working tree, per the docs. The commands in my two transcripts only read files and ran a Python check. Outside the repo, Codex can save a trust level in its own config.toml, as noted above.

Can I combine a custom prompt with --base?

No. In 0.167.2 the prompt conflicts with all three target flags.

What do P0 to P3 mean in codex review?

They are priority tags from the rubric. P0 is blocking. P1 is urgent. P2 is normal. P3 is nice to have.

Did you test this?

Yes, on a Mac on 12 November 2026 with codex-cli 0.167.2. Two runs called the model. Four bad argument sets failed without calling it. I skipped --commit, prompts, the TUI, the GitHub bot and CI.

The verdict

I use Codex every day as a worker next to Claude Code. I would run codex review --base main before a push. My two runs took 29 and 24 seconds. It found the median bug. I think it missed the in-place sort. So it is one reviewer, not the whole review. To review every pull request automatically, enable Automatic review in Codex settings.

Sources, read on 12 November 2026: the Codex code review page, GitHub page, GitHub Action page and CLI reference, the Claude Code /code-review page and Code Review page, and local help for codex-cli 0.167.2. The non-interactive mode page was read on 18 November 2026. Code is from openai/codex at rust-v0.167.2 and openai/codex-action on main. The test runs are my own.