Codex for beginners: review changes with /review

You have made a few changes and want a second look before your next commit. In Codex CLI, /review can inspect changes that have not yet been saved in a Git commit and flag possible problems. You choose what to review, then check the findings before asking for a fix.

This micro-guide follows OpenAI's documentation. The visuals are illustrations.

Review changes with /review in four steps

You need Codex CLI installed, an authenticated session and a Git project with changes. Follow OpenAI's Codex CLI guide first for setup instructions.

  1. Open a terminal in the intended project folder and start codex.
  2. Type /review inside Codex. This opens the review presets.
  3. Choose Review uncommitted changes. This includes changes added to the next commit (staged), changes not yet added (unstaged) and new untracked files.
  4. Read the findings in the conversation. Pick a relevant finding and check it against the code and project tests before asking Codex to fix anything.

Codex starts a dedicated reviewer that reads the selected changes and reports prioritized, actionable findings. The review itself leaves your working files unchanged.

Source: OpenAI: Code review, CLI instructions.

Use the findings to decide what to fix

A finding is something to investigate. Read the affected code and check whether the description fits your project. If Codex finds nothing, bugs can still remain. Review complements your project's tests.

Asking for fixes is a separate step. Your normal sandbox and approval settings apply. Inspect the resulting changes and run the relevant tests afterward.

Want to continue an earlier conversation first? Read the codex resume guide. The next time you have changes ready for a commit, use this review routine and assess the findings one at a time.

The Forge newsletter

Get new articles in your inbox

Pick the topics you care about. No noise, at most one email a week.

Get new articles in your inbox

We follow GDPR. Unsubscribe anytime.