Task-led guide · official OpenAI sources checked Nov 3, 2026
How to make Codex code reviews fit your repository
A practical workflow for adding scoped review guidance in AGENTS.md, trying Codex reviews, and checking findings against the diff and tests.
When should I add repository-specific review rules?
Add a rule when reviewers repeatedly need to point out a consequential, non-obvious invariant, such as a compatibility requirement or a data boundary. OpenAI's guidance recommends keeping rules concise and scoped to the code they govern; ordinary formatting checks belong in CI.
What should a useful AGENTS.md review rule say?
State the invariant and a safe path. For example, describe which external contract must remain compatible and say to preserve it or make a backward-compatible change. Put repository-wide guidance at the root and more specific rules near the code they cover, then remove guidance that is stale or creates noise.
How can I try the rule without assuming it works?
Choose one representative change that should violate the rule, one safe counterexample, and one unrelated change. Run the review on each, then compare the findings with the actual diff and relevant tests. Refine the rule if it misses the intended issue or creates irrelevant comments. This is a practical check for your repository, not a general accuracy benchmark.
Can I review local work or a GitHub pull request with Codex?
OpenAI's Codex documentation describes `/review` for local changes in a Git checkout and a Code Review workflow for pull requests. The available connection, permissions, and review steps depend on the client and repository setup; check the linked current documentation before relying on a specific workflow.
Should Codex findings approve or replace human review?
No. Treat findings as suggestions to investigate. Check each cited location and expected behavior, run the relevant tests, and follow your repository's required approvals and branch protections. OpenAI describes Code Review as an additional reviewer; this page does not claim it catches every issue.
Does this guide prove Codex reviews are more accurate?
No. It explains documented workflows and a way to evaluate rules in your own repository. Vendor-reported evaluation results are not a substitute for independent evidence or a controlled comparison on your codebase.