OpenAI Codexcodex-cli 0.154 · macOS, Linux, WSL, Windows
1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
26 small wins to finish your pathNext lesson

codex review: a review on demand

The work that most needs a second reader is the work nobody watched. Codex has a review that does not touch your files.

bash
codex review --help
Captured from a real run
Run a code review non-interactively

Usage: codex review [OPTIONS] [PROMPT]

Arguments:
  [PROMPT]
          Custom review instructions. If `-` is used, read from stdin

No prompt gives you the default review. A prompt makes it a specific one, which is where most of the value is: check error handling on the new endpoints beats review this every time.

What it does not do

It reports findings and leaves your working tree alone. In the app the same thing is /review, with a choice between reviewing against a base branch and reviewing uncommitted changes, and it needs the project to be a git repository.

That separation matters. A review that also fixes things is two jobs at once, and you cannot tell which findings you agreed with.

Where it fits

  • Before you open a pull request, on your own uncommitted work.
  • In CI, through codex exec review, so unattended changes still get read.
  • On somebody else's branch, with a read-only profile, since a review never needs to write.

That last one is worth doing on purpose. A review run under -P :read-only from lesson 4 cannot change anything even if it decides it would like to.

Ask for the review you want
Steer what it looks for. The review is only as good as the instruction, and "check the error handling and the migration safety" finds different things from the default pass.
Try it yourself
  • Run codex review on your current changes with no prompt, then with one.
  • Run it again under -P :read-only and confirm nothing was touched.

Little by little, you're building something great.