- Published
- Updated
AI code review with Claude and Codex
AI code review is useful when it is treated as a second opinion on a real diff. It is much less useful when it becomes a rubber stamp for code nobody has read.
For business websites, review should stay focused. A small code change can affect lead forms, booking flows, SEO, page speed, analytics, accessibility, or payment-related logic.
Code review begins after a proposed change exists. If the problem has not yet been explained or reproduced, start with debugging with Claude Code and Codex instead. Mixing diagnosis and review encourages the reviewer to redesign the patch before establishing whether it solves the original problem.

Recent security findings in PHP and nginx
On 21 October 2026, PHP released fixes for two critical vulnerabilities uncovered with the help of AI. A PHP developer had seen signs of one of the underlying problems in 2024. The new research established how serious it was. PHP Foundation’s account of the release · OpenAI’s account of the research
The 18 November nginx disclosure included a flaw in code that had been part of nginx for more than ten years. An Xint researcher found it by hand, and Xint’s automated analysis found four more flaws. Cloudflare’s account of the nginx findings
When reviewing a change, also read the code it calls. A new use of an old function can expose assumptions about inputs or permissions that held for its original callers.
Review the change against its contract
Claude Code and Codex can both help review a patch when they have enough context. The important input is the actual diff, the surrounding files, the intended behavior, and the limits of the task.
Before reviewing implementation quality, restate the change contract:
- What behavior was requested?
- What was explicitly out of scope?
- Which existing behavior must remain unchanged?
- Which checks should prove the result?
- Are there deployment, data, or compatibility constraints?
A technically tidy patch can still be wrong if it solves a nearby problem, changes more than requested, or cannot be verified in the real system.
Good review prompts are specific:
- Does this diff change behavior outside the requested task?
- Are there missing edge cases?
- Could this break forms, routes, redirects, or tracking?
- Are tests or validation commands missing?
- Is there a security or privacy concern?
- Is the change consistent with the existing codebase?
This turns AI review into a risk-finding step instead of a vague “is this good?” question.
Use different review angles
When Codex writes code for me, I always have Claude Code review it. When Claude Code writes it, I ask Codex to review it. To try this yourself, start a fresh session in the other tool and give it the original task, the diff, and any relevant tests. Ask for findings before you share the first tool’s reasoning or ask either tool to make changes.
I enjoy the ping-pong that follows. Take a finding back to the tool that wrote the code and ask it to explain its choice. If the question is still open, give that explanation to the reviewer. Following the reasoning on both sides helps me see assumptions I might have missed. It makes me better at reviewing code myself.
I often split AI review into focused passes.
One pass can look for functional regressions. Another can look for security and validation issues. Another can check accessibility, SEO, or performance. Another can review whether the patch is too large for the task.
That structure works better than asking for one general review because the tool has a clearer job.
For example, a change to a booking site might need separate review of form validation, API retries, structured data, mobile usability, and analytics events. Those are different failure modes.
Ask each pass to cite the relevant file and changed line, explain the failure scenario, and distinguish a confirmed problem from a question. Findings without a concrete path from code to impact create noise rather than a useful review.
Verify findings before changing the patch
AI reviewers produce false positives. A warning may ignore a surrounding guard, framework behavior, an intentional workaround, or a test that already covers the case.
For each material finding:
- Read the surrounding code, not only the changed line.
- Check whether the described path can actually run.
- Reproduce the failure or add a focused test when practical.
- Confirm that the suggested fix does not widen the task.
Using a second model can provide a different angle, but disagreement between two tools is not evidence by itself. The code, requirements, and checks must resolve it.
Human review still decides
Claude and Codex can point out likely risks, but they do not know the business context by default. They may miss a messy but intentional workaround, or they may suggest a cleaner change that would break a real workflow.
The developer still has to decide:
- Is the finding real?
- Is the proposed fix worth it?
- Does the change match the business goal?
- Has the critical path been tested?
- Is the deployment risk acceptable?
AI review is a filter, not an authority.
Connect review to validation
A useful review ends with evidence. That might be a test command, type check, build, manual form test, screenshot, or log comparison.
This is where AI review connects to normal engineering work. It can suggest what to validate, but the project still needs actual checks.
For the workflow before and during implementation, see using Claude Code and Codex in an existing codebase. A review is complete only when its important findings have been verified and the final diff still matches the original task.
