A code review that argues with itself.

A single AI reviewer holds one angle, and nothing pushes back on what it says. adv-review runs the review as a team would: one agent per angle, and a skeptic told to refute every finding.

every finding has to survive a skeptic

In this post
  1. 1Where the idea came from
  2. 2How a review runs
  3. 3How it differs from Claude Code’s own reviews
  4. 4Measuring it against an answer key
  5. 5What the passes taught me
  6. 6The same review with other agents
  7. 7How it was built
  8. 8Try it
Published
2 Nov 2026
Reading time
11 minutes
Licence
MIT
Runs with
Claude Code, Codex, Gemini, Copilot
Measured on
21 PRs, 18 planted defects

Ask a language model to review a pull request and you get a list. A style note, a “consider adding a test”, a few warnings about values that could be null but cannot be, some advice about naming, and somewhere in the middle, at the same volume as everything else, the one thing that would have taken production down. You read the first three, decide the tool is noisy, and skim the rest. The bug ships.

The model is not the problem. A single reviewer in a single context has two problems at once. It can hold one way of reading the change at a time, so it reports whatever it happened to notice first. And nothing ever pushes back on what it says. Confidence costs it nothing, so everything arrives at the same volume, and the reader ends up doing the triage the tool was supposed to do.

adv-review is my attempt at both problems. It is an open-source review tool for AI coding agents: a plugin for Claude Code, and a standalone runner that does the same review with OpenAI Codex, Google Gemini or GitHub Copilot. Either way, it reviews a pull request the way a good team does: several reviewers read it independently, each looking for a different kind of failure, and then someone whose job is to say “I don’t believe you” takes each claim apart. Only what survives that is reported.

Where the idea came from#

The adversarial shape is not mine. Ravindu Nanayakkara introduced me to it: independent reviewers whose findings must survive a reviewer told to refute them. I had been running an earlier version on real pull requests before the plugin existed, and most of what the plugin does is what those runs taught me. How much of the agent budget to hold back for verification. How many root causes one skeptic can handle before it starts agreeing with everything. When one skeptic is not enough.

How a review runs#

A review is a workflow of up to twenty agents, each in its own git worktree of the repository at the pull request’s head commit. It runs in five phases.

  1. Scout
  2. Finders
  3. Triage
  4. Skeptics
  5. Critic
  6. Report

Scout · designs the review for this diff

agents 1 of 20

The scout reads the diff and runs the project’s checks, then designs the review: it rules out migrations and rollout, because nothing stored changes.

fig. 1 · How a review runs, on three pull requests from the calibration fixture. The planted bugs, files and lines are the answer key’s own; the findings that get refuted and the critic’s checks are illustrative.
  1. A scout designs the review. It reads the diff and the files around it, runs the project’s own checks on the head commit, and reshapes the review for this particular change: it drops the angles the diff cannot trip, with a reason for each, points the kept angles at the code that could actually fail, adds angles specific to this PR, and ranks them. A review is designed per PR, not run off a checklist.
  2. One finder per angle hunts alone. Eight generic angles ship with it: correctness, tests that don’t test, boundary contracts, silent drops, authorisation and attribution, security, data integrity, and migrations and rollout. Each finder sees only its own angle and nothing the others found. A finding has to state a concrete failure: these inputs or this state, and this wrong outcome. Style is not a finding.
  3. Triage groups by root cause. A defect that shows up at six call sites is one defect, and it gets verified once rather than six times.
  4. A skeptic tries to refute each root cause. This is the phase that makes the report worth reading. Every root cause goes to an agent instructed to prove it wrong, with the code in front of it and permission to run it. An unsure verdict counts as refuted. Anything rated high or critical gets a panel of three, budget allowing, each checking one thing (is it reachable, is the mechanism right, is the consequence real) and decided by majority.
  5. A critic asks what nobody looked for. It is told what the scout ruled out, so a wrong drop is visible rather than silently missing.

The report records, for every finding, the severity, the file and line, the angle that found it, the skeptics that checked it, the commit it was checked at, and whether it was confirmed cleanly or only after a correction. It says whether the pull request introduced the defect or it was already there on the base branch. Refuted findings come back with the reason. And if the agent ceiling was too low to run every standard angle the scout kept (the generic eight, plus any the project adds), the run names the angles it cut and the ceiling that would have run them, and reports itself incomplete. Partial coverage is never reported as complete.

Nothing is posted, committed or pushed without a person saying yes.

How it differs from Claude Code’s own reviews#

Claude Code already has several ways to review a change with many agents, and two of them are the natural comparison. With the ultracode setting on, or the word ultracode in a request, Claude writes a dynamic workflow for the task: ask for a review and you get a script designed for that request, which fans out reviewers and can have them try to refute each other’s findings. A script that works can be saved and run again. And /code-review ultra (ultrareview, a research preview) runs a fleet of reviewer agents over the change in Anthropic’s cloud, and reports only the findings it has independently reproduced and verified.

beside:
ultracodea workflow Claude writes for your request
/code-review ultraultrareview · Anthropic’s cloud review
adv-reviewan open-source review workflow, in a plugin
Where it worksanywhere Claude Code workflows runclaude.ai sign-in; not Bedrock, Google Cloud or Foundryanywhere Claude Code workflows run, or CI
Whose agentsClaudeClaudeClaude, Codex, Gemini or Copilot
Fitting it to your projecta saved script you edit and maintaina note, typed each runset once in the repo: your own angles and checks, used in every review
If it can’t cover everythingdepends on the script Claude writesrefuses up front a diff over 500 files or 8,000 lines, by defaultnames the angles it cut and the findings it left unverified
What you can seethe script Claude wrote for this runthe findings; its prompts aren’t publishedevery phase and prompt, open source, with 55 tests
Speed and costyour plan’s usage; time depends on the script5–15 min; credits after 3 free runs15 min to 2 hours; your plan’s usage
fig. 2 · Where adv-review differs from two of Claude Code’s own many-agent reviews, and where it is slower. The ultracode and ultrareview columns follow Claude Code’s documentation as of November 2026; ultrareview is a research preview, so its details may change.

adv-review is a workflow too, the saved kind, shipped as a plugin. Three things set it apart. It is measured: the same review every time, scored against a public answer key, so you can see how often it is right before you trust it with your code. It is honest about its gaps: when it runs short of agents it names what it skipped, so a short report never passes for a complete one. And it is not tied to one vendor or one cloud: the agents run on your machine, they can be Claude, Codex, Gemini or Copilot, and every prompt is open source.

The trade-off is time. ultrareview typically finishes in five to fifteen minutes; adv-review usually takes fifteen minutes to two hours. For a quick check before you merge, ultrareview is the faster tool. For findings you need to trust, and a record of what the review did not cover, use adv-review.

Measuring it against an answer key#

The uncomfortable thing about building a reviewer is that you cannot tell whether it is any good by running it on your own work. A real pull request has no answer key. If the review finds three things you do not know what it missed, and if it finds nothing you do not know whether the code was clean.

So I built a fixture: a small ledger service with accounts, transfers, a JSON store with migrations, bearer tokens and an audit log, and twenty-one pull requests against it. Seventeen of them carry the eighteen defects I planted on purpose (one carries two). The first ten cover the eight generic angles and can be seen in the changed lines with care. The next eight need more than the changed lines: a race across an await, a cache that some writers invalidate and others do not, a once-a-day guard comparing a local day with a UTC day, idempotency keys that are global instead of per user, a webhook that fires before the ownership check. Four pull requests are clean, to measure false positives. Every planted defect is shown to bite by a script before it enters the answer key, and a scorer reads the review’s output and says what was confirmed, what was found and then wrongly refuted, what was missed, and what was reported that nobody planted.

The fourth version was the last one run over both sets. With Sonnet agents (the cheaper option; the default is Opus, so these numbers are a floor), it scored:

  • 17 of the 18 planted defects confirmed, and none wrongly refuted.
  • 33 of 33 confirmed findings true.
  • No findings at all on the four clean pull requests.

The one it missed is instructive. The defect was a seed script still calling a function by its old signature, and no finder opened that file. The critic named it in its list of gaps, but the critic’s gaps are not verified, so it stays a miss. Seen is not the same as confirmed, and the scorer does not pretend otherwise.

What the passes taught me#

The first calibration pass did not look like that. It confirmed every planted defect, but only 20 of its 25 confirmed findings were true, and it reported three things on the two clean pull requests. Every false positive was the same thing: a finder had noticed that a test could not fail, and reported that as a defect, over code that was correct. The test really was weak. The code really was fine. A reviewer that tells you a test is vacuous when the code under it is right is giving you work, not a finding.

The fix was a rule rather than a prompt tweak. A test that cannot fail is evidence on the defect it hides, one of that defect’s sites, and never a finding of its own. When the code is right it is nothing. Finders, triage and the skeptics were each told so, and a blind test can no longer lead a root cause or set its severity. On the next pass precision went to 15 of 15 with the same recall, and the clean PRs drew nothing.

Second versionfirst set · 11 PRs
Planted defects confirmed
10 of 10
Confirmed findings that were true5 false
20 of 25

Findings on the clean PRs: 3, all false, on two

Third versionfirst set · 11 PRs
Planted defects confirmed
10 of 10
Confirmed findings that were true
15 of 15

Findings on the clean PRs: none, on two

Fourth versionboth sets · 21 PRs
Planted defects confirmed1 missed
17 of 18
Confirmed findings that were true
33 of 33

Findings on the clean PRs: none, on four

the blind-test rule landed in the third version: a test that cannot fail is evidence, never a finding

fig. 3 · Three calibration passes on the fixture, all with Sonnet agents; the first version came out before the fixture existed. Every one of the second version’s false findings was a weak test reported over correct code; the blind-test rule in the third removed the class, and the fourth held it across a second, harder set.

The second lesson was about the budget. Agents are expensive, and the review has to decide how to spend them. The count you give it is a ceiling, not a quota: a small PR stops at six or seven agents, and about 30% of whatever is available is held back so that what the finders report can be verified. The failure I wanted to rule out was the quiet one, where a run short of agents skips an angle and says nothing. So it cannot. If a ceiling cuts a standard angle the scout kept, the report says so, names the ceiling that would have been enough, and is marked incomplete.

Where the 20 go, at most

  1. Scout · 1

    designs it

  2. Finders · up to 10

    one per angle kept

  3. Triage · 1 or 2

    a second when root causes sit within three lines

  4. Skeptics · about 6

    held back to verify

  5. Critic · 1

    last

A small PR

stops at 6 or 7

a ceiling too low for every angle the scout kept: the run names what it cut, the ceiling that would do, and calls itself incomplete

fig. 4 · How a run spends its agents. The ceiling is the most a run may spend, not a quota: about 30% of it is held back so that what the finders report can be verified, and a small PR stops long before the end.

The third was humbling. The “harder” second set was not as hard as I meant it to be, because the fixture’s docs folder spelled out the rules the defects broke, and the finders read the docs. A real codebase is rarely that helpful. The next fixture needs defects against conventions nobody wrote down.

The same review with other agents#

Since the fifth version, the review is not tied to one vendor. A standalone runner takes the same workflow and runs each agent as a headless CLI process in its own worktree, so the same scout, finders, skeptics and critic can be Claude, OpenAI Codex, Google Gemini or GitHub Copilot, and two of them can review the same commit and have their results put side by side.

the session

Claude Code, with the plugin

/adv-review:review 140
on Claude Code’s workflow runtime

The standalone runner · a terminal, or CI

node runner/review.mjs 140 --agent codex
as headless CLI processes

the review workflow · one script

the same scout, finders, triage, skeptics and critic · the same prompts and budget · the same answer shape

launches each agent

the agents

  • Claude

    Opus or Sonnet

    plugin and runner

  • OpenAI Codex

    GPT, the CLI’s default

    runner

  • Google Gemini

    Gemini, the CLI’s default

    runner

  • GitHub Copilot

    the CLI’s default model

    runner

each agent in its own git worktree at the head commit · its answer checked against a schema

fig. 5 · Two layers. The session launches the review and reports; the agents do the reviewing. The plugin runs Claude agents on Claude Code’s own workflow runtime; the runner runs the same script with any of four CLIs as headless agent processes.

I benchmarked Codex on a four-PR sample. It confirmed all four planted defects, 21 of its 22 confirmed findings were true, and it reported more beside the planted defects than Claude did: eleven true findings about the sample’s PRs. Four PRs are a sample, not a score, but it was enough to show the design is not tuned to one model. Gemini and Copilot plug into the runner the same way, each through its own command-line tool, and a table in the README sets out what each one enforces, such as the shape of its answers and read-only mode.

The runner also taught me things about sandboxes I would not have learned otherwise. Codex keeps the repository’s .git read-only inside its sandbox, so each agent’s worktree has to be created at the head commit before the agent starts rather than checked out by it. And nothing in that sandbox can listen on a port unless you say so, which a test suite with a server in it needs.

How it was built#

I should say how adv-review itself came to exist, because the answer is part of the point. I built it in Claude Code over three days in October, and Claude wrote most of the code. My part was the one a reviewer would recognise: deciding what the thing should do and refuse to do, reading what came back, running the calibration passes, adjudicating every finding the scorer could not match to a planted defect, and deciding what shipped. The repository has a hundred tests; the fifty-five on the workflow exercise every failure path (a dead agent, an answer about the wrong commit, a forged claim, a ceiling too low) with scripted stand-ins for the agents, so no model is called to run them.

It was not tidy. For three calibration passes the script that ran them stopped the shell around each review session instead of the session itself, which left forty-five review sessions running on my machine for most of a day after their results were in. That is the kind of mistake you only find by looking, which is rather the theme.

Try it#

It is open source under MIT. In Claude Code you need a paid plan with dynamic workflows enabled, the GitHub CLI signed in, and two commands:

claude plugin marketplace add YahampathChandika/adv-review
claude plugin install adv-review@yahampathchandika

Then, from a session in the repository, say what to review:

/adv-review:review                  # the PR for this branch
/adv-review:review 140              # PR 140
/adv-review:review 136 140          # a stack, as one review
/adv-review:review --branch         # a branch with no PR yet
/adv-review:review --branch NAME --base main

And, if you need them, how:

/adv-review:review 140 --no-run       # read only, run nothing
/adv-review:review 140 --model sonnet # cheaper than Opus
/adv-review:review 140 --agents 30    # a higher agent ceiling
/adv-review:review 140 --post         # post without asking
/adv-review:review 140 --out r.json   # keep the result as JSON

--no-run is for a pull request from someone you would not let run code on your machine: every agent is told to read and run nothing, and the README’s table says what enforces that for each agent. A larger ceiling suits a big PR, or a project that adds angles of its own.

A review usually takes between fifteen minutes and two hours (most of it agents running the project’s tests), runs in the background, and costs several times what reading the PR in conversation would; it counts toward your plan’s usage. The report lists findings most severe first, each with the failure the skeptics could not refute, and then asks whether to post a summary on the pull request.

Other agents can do the reviewing too. From inside Claude Code, name them:

/adv-review:review 140 --agent codex          # Codex agents
/adv-review:review 140 --agent claude,codex   # both, compared

Or run the standalone runner from a terminal or CI, from a clone of the repository, with that agent’s own command-line tool installed and signed in:

node runner/review.mjs 140 --agent codex
node runner/review.mjs --branch --agent gemini
node runner/review.mjs 140 --agent copilot
node runner/review.mjs 140 --agent claude:sonnet,codex:gpt-5.5

The last one runs both agents at once and prints the comparison: what each found, what only one found, and what one confirmed while the other refuted. Codex is the one with benchmark numbers so far, and the README has every option.

The generic angles are a baseline. What finds the next bug in your codebase is an angle written from the last one it shipped, and adv-review reads such angles from a config file in your repository. If you write one that catches something the generic eight missed, I would like to hear about it.

useful? pass it on