nazax.com

Code Review Agent for Claude Code: Use a Different Model

NAZAX · Last updated

A code review agent for Claude Code is a second agent that reads a finished change and judges it, and ours follows one rule: it is always a different model from the one that wrote the change. This article covers how we run it, what it returns, what it catches, and what it cannot. It is one stage of our multi-agent workflow, alongside CI and a try on localhost.

Why a different model

A model that wrote a change shares its own assumptions. It wrote the code and usually the tests, so it tends to find both reasonable. A second model does not carry that history. It sees the diff and the brief, and that gap between them is where problems show up. This is our practice, not a measured law, and we cannot give a catch rate. We keep the rule because a same-model review mostly confirms what the author already believed.

How we run it

  1. The builder finishes. It has committed in small steps and its quick checks pass.
  2. The reviewer gets the brief and the diff. The brief matters as much as the code, because the reviewer judges the change against what was asked.
  3. The reviewer returns findings only. Either “clean” or a list ranked by severity, each with a file and line and the fix to make. It does not edit.
  4. The verdict is recorded against the exact commit. A new commit needs a new review, unless it only merges the base branch in.
  5. Fixes go in as new commits. The builder or a fresh builder makes them, and we do not squash them away.

We start the review as soon as the quick checks pass, so it runs alongside the try instead of after it.

What a finding looks like

An illustrative example of the format we ask for, with the worst problem first:

HIGH  src/export/dialog.ts:42  The empty state also shows when loading
      failed. Fix: check the error state before the empty state.
LOW   src/export/dialog.ts:57  Unused import. Fix: remove it.

The builder fixes the top item, and the reviewer then reads the new commit. A bare “looks good” with no file or line tells you nothing about what was read.

What it catches

  • A change that passes its tests but misses the brief. The tests describe what the author understood, not what was asked.
  • Work outside the brief’s area. An edit to a shared file or an unrelated cleanup slipped into the diff.
  • Missing cases. An error path, an empty state, or an option the brief mentioned and the code ignored.
  • Claims the source does not support. For written copy, we run a separate review pass by a different model, checking each claim against its source and flagging wording that reads as machine-written.

What it does not catch

A reviewer reads text. It cannot see a layout break, a slow page, or a flow that fails on a real device. That is why every change is also tried on localhost, by an agent that opens the page and follows the steps, and why CI still runs the full suite. For some native apps, where suites are slow, we make the review read-only on the diff and fix forward on the installed build, which is a trade-off we accept only because a release gate exists.

Choosing the reviewer

Our builders run on the mid-tier model, so their changes are reviewed by the strongest model at medium effort. A change written by the strongest model can be reviewed by the mid-tier one. The one fixed rule is that the reviewer and the author differ. Our notes on model selection explain the tiers.

What goes wrong

The reviewer has no brief. It reviews style and not intent, and returns polite noise. Always send the brief.

The reviewer is asked to fix as well. Edits blur who is accountable. Keep it read-only, and let the builder own the change.

An old review is counted for a new commit. If the head changed, the review no longer covers it. Tie each verdict to a commit.

The review is treated as the gate. It is one of three. A clean review with a red CI run is still a red change.

Findings pile up with no ranking. A flat list of twenty nits hides the one real problem. Ask for severity order, and fix from the top.

Questions

Should the review agent be a different model from the one that wrote the code?

Yes. A model that wrote a change tends to accept its own assumptions and its own tests. A different model reads the diff without that history, so it is more likely to notice a gap between what was asked and what was built. We apply this rule to every change.

What should a Claude Code review agent return?

Either a clean verdict or a list of findings ranked by severity, each with a file and line and the fix to make. It should not edit anything. Keeping the reviewer read-only makes it clear who wrote the change and who judged it.

Does a review agent replace CI or testing?

No. A reviewer reads the diff and cannot see how the change behaves when it runs. We therefore treat the review, CI and a try on localhost as three separate checks, and a change merges only when all three pass on the same commit.