Codex CLI Code Review Receipts

Limit a Codex CLI review to evidence your team can check: the diff, repository instructions, test output, and any linked issue. OpenAI Codex can review code changes in a local workflow, but the useful unit for an engineering team is the review receipt you paste back into the PR, not a long chat transcript.
For Codex training, I start here because Codex code review goes wrong when the request is too broad. Ask the agent to inspect a specific diff, run known verification, and write down what it checked. That keeps Codex coding work inside normal engineering habits instead of turning it into a side conversation.
Start from the diff and the issue
Give Codex the same review surface a teammate would get. In a GitHub pull request workflow, that usually means the branch diff, the linked issue or ticket, and the commands the repo already trusts.
Do not ask for a general opinion on the whole codebase. A good Codex review is narrower: find behavior changes, missing tests, risky edge cases, and mismatches with the issue.
For example, on a TypeScript monorepo PR that changes an API route and a React form, I would ask Codex CLI to review only the changed files first, then run the package-level checks for those workspaces. If it wants to inspect shared validation code, that is fine, but the receipt should say why it left the diff.
This sits inside the broader habit of CLI workflows: keep the agent close to the repository, keep the commands visible, and make every claim reproducible.
Rolling this out in your team?
We train engineering teams on their own codebase in two days. Codex setup, shared rules and review included.
Put review rules in AGENTS.md
Use AGENTS.md for durable review behavior, not for task chatter. The file should tell Codex how your repo expects reviews to be done: test commands, architectural boundaries, security rules, and what counts as a blocking finding.
OpenAI’s AGENTS.md guide is the right place to check the mechanics. In practice, I prefer small scoped files over one huge root instruction file when a repo has different rules for backend, frontend, migrations, or infra.
A useful review rule is concrete enough to fail against. “Prefer clean code” is weak. “Do not introduce a new database write path without an idempotency check and a test for duplicate requests” gives Codex something to inspect.
This belongs in the Review step of our methodology: the agent can do useful review work, but the owner still decides what is merged.
Keep MCP narrow during review
MCP is where Codex reaches external systems, so review access should start read-only. GitHub issues, design docs, logs, and internal knowledge can all help, but write access during review should be rare and explicit.
The common mistake is giving the agent every integration because it feels convenient. That makes the review harder to audit. If Codex reads a Jira ticket, a GitHub issue, or a runbook through MCP, the receipt should name that context so a human reviewer can check the same source.
For a first pass, I would allow issue and PR reads, repository reads, and maybe documentation reads. I would not allow comment posting, label changes, deploy actions, or database writes from the review session.
If MCP is still new in your Codex setup, read Use MCP Servers in Codex CLI before connecting private systems to a review workflow.
Run the review loop in three passes
Use a small loop. Long agent sessions can produce good notes, but they also hide which claims came from code, which came from tests, and which came from inference.
- Ask Codex CLI to inspect the diff against the target branch and list suspected risks without editing files.
- Ask it to run or propose the smallest relevant verification commands, then capture the command output.
- Ask it to rewrite the findings into a PR-ready receipt with evidence, severity, and open questions.
That is enough for most openai codex cli review work. Add another pass only when the first pass finds a real issue or when the test surface is unclear.
There are limits. Codex can miss product intent, it can overvalue a failing flaky test, and it can infer a requirement that the issue never stated. The receipt format below exists to make those limits visible.
Paste a review receipt into the PR
A review receipt should be shorter than the chat and stricter than a summary. It should show what Codex inspected, what it ran, what it found, and what a human still needs to decide.
Paste this into a PR comment or into your internal review note after a Codex CLI review code changes pass:
## Codex review receipt
PR: <link or branch>
Reviewer owner: <human name>
Codex scope: <changed files, packages, or directories inspected>
Context used: <issue, ticket, docs, MCP sources, AGENTS.md paths>
Verification run:
- <command>: <pass/fail/not run, with short reason>
- <command>: <pass/fail/not run, with short reason>
Findings:
- [blocker|major|minor] <file:line or area> - <claim, evidence, and expected fix>
- [blocker|major|minor] <file:line or area> - <claim, evidence, and expected fix>
Non-blocking observations:
- <risk or cleanup that should not block this PR>
Human decision needed:
- <product, security, migration, or rollout question Codex cannot decide>
Merge recommendation:
- <approve after fixes | request changes | continue human review>
The receipt is not a rubber stamp. It is a way to make an agent-assisted review useful to the next reviewer without asking them to replay the whole Codex session.
Further reading
Try it on one open pull request
Pick one active PR, add the receipt template, and run the three-pass Codex CLI review before the next human reviewer starts. For guided practice, bring that PR to hands-on training on Codex CLI review workflows and we will turn it into a team habit.
Train your team on Codex
Two days on your team's own repository, onsite or remote, with a written proposal before you commit.
Book a callPrefer to measure first? Take the free team check.