How it works
An AI reviewer as my merge gate
Published · 7 min read· Anton Shubin

In short
- A separate reviewer agent that cannot edit or merge read every change for 26 days. It sent back 433 of 1,526 changes (28.4%).
- 488 of 859 merged pull requests (56.8%) never got a needs-fix. The rest needed one round or more.
- Code merges only when the reviewer passed the exact commit and CI is green on it. The reviewer alone would not be enough.
- I can't tell you how many bugs it missed, because I never recorded the ones found later. Reverts and red builds on main are what I have.
An AI reviewer can gate merges safely enough for my own projects, as long as it is one of two gates. A separate reviewer agent must pass the exact commit, CI must be green on that commit, and only then does code merge it. From 6 November to 1 December 2026 my reviewer read 1,526 changes and sent 433 of them back (28.4%). It never edits code and never merges. On its own, I would not trust it, and the numbers below show why.
This is the review step of Issuemill, which runs Claude Code unattended on GitHub issues in 11 of my projects. The whole loop is in Running Claude Code unattended on GitHub issues. This post looks only at the reviewer.
What does the reviewer see, and what can't it do?
Each lead run is a top-level Claude Code session that works on one issue. The lead starts an implementer to write the change and then starts the reviewer as a separate subagent with a fresh context. The reviewer gets the branch, the base branch, the pull request's description and the issue's "done when" list. Its instructions open with two sentences I like a lot:
You are the reviewer. You did not write this code and you owe its author nothing.
Then it works through a fixed list:
- It reads the diff one file at a time, and every changed file must serve the issue.
- It counts every claim in the pull request's description. "Five tests added" means five tests.
- It breaks the code on purpose in a throwaway copy and checks that a test goes red. A test that stays green when the code is broken proves nothing.
- It reads CI's result for the exact commit it reviews, instead of running the whole suite again.
- When the change touches sign-in, sessions, raw SQL or what a server exposes, it does the security review itself, in the same pass.
What it may not do is short and strict: it never edits the author's code, never fixes anything
and never merges. Its answer ends with one line, VERDICT: pass or VERDICT: needs-fix.
A needs-fix needs a real reason: broken behaviour on the path the change is meant to handle, a security or data-loss risk, a false claim in the docs or the description, a failing check or a conflict with main, or code my rules forbid outright. Style nits and a missing test go into a "not blocking" list, and the change passes. A reviewer that blocks on taste turns every pull request into a long argument with itself, and both sides of that argument bill by the token.
When a change touches what a person sees, a second agent, the design reviewer, looks at the screens too.
How often did it pass a change the first time?
Less often than I expected. Here are the verdicts, parsed from the reviewers' answers in the run records:
| Reviewer | Verdicts | Needs-fix | Share |
|---|---|---|---|
| Code reviewer | 1,526 | 433 | 28.4% |
| Design reviewer | 375 | 112 | 29.9% |
Fifteen answers had no verdict line at all (9 from the code reviewer, 6 from the design reviewer), so they are left out.
Counted per merged pull request, the picture is harsher:
| Needs-fix verdicts on the issue | Merged PRs | Share |
|---|---|---|
| 0 | 488 | 56.8% |
| 1 | 244 | 28.4% |
| 2 | 87 | 10.1% |
| 3 or more | 40 | 4.7% |
So 371 of 859 merged pull requests (43.2%) were sent back at least once. The count is per issue: an issue that merged two pull requests gives both the same number.
Those rounds are not free. One needs-fix almost doubles the median cost of a merged pull request, from $4.19 to $8.00 at API list prices, as I measured in What unattended Claude Code costs per merged PR. I still think it is the best money in the whole setup. The implementer never argues back, which is the main way this differs from human code review.
What did it catch?
I never sorted the verdicts by kind, so I have no table of categories. What I did instead: I read back needs-fix verdicts from three of my public repositories (Seed, ts-libs and preact-components). These are the kinds I found:
- The pull request's description said something untrue. Usually a fix round had changed the code, and nobody went back to the text. One still named a test that had been renamed; another listed five tests for a function that the fix round had moved to a shared library.
- Documentation promised what the code did not do. In Seed, the docs said a
[WIP]title blocks a merge, and one path let it merge anyway. - A change broke how something looked. A fix in preact-components would have made the labels in every narrow menu wrap onto two lines, in every app that upgraded.
- A merge conflict with main.
- A security hole. In Seed, with sign-up open to invited people only, signing up checked the invitation but never used it up. A one-use link would have kept admitting new accounts.
The kind that surprised me is the first. The code was often fine; the story about the code was wrong. A person skimming the description would have believed it.
What did it miss?
I can't count that, and I want to be plain about it. I never recorded the defects a person found after a merge, and I never audited whether each needs-fix verdict was right. Here is what I do have:
- Reverts. One revert pull request merged in all my GitHub repositories in those 26 days, and it undid a change the engine did not make.
- Main's CI after an engine merge. 338 green, 54 red, 467 unknown (cancelled, still pending or never checked). My records of main's CI only begin on 12 November, which is why the unknown pile is so big.
- Main turning red. 38 times, main went from green to red right after a merge.
A red main is not always a reviewer miss. Some of those were flaky browser tests, and some were two pull requests that each passed alone and broke main together. I have not sorted the 54 by cause yet; that is the first thing I check next. The worst week of it has its own post: My worst week of unattended Claude Code.
And few reverts does not mean few bugs. I fix forward, so a bug the reviewer missed would usually come back as a later fix pull request, which these numbers can't tell apart from new work.
Would I let it merge without CI?
No. The reviewer reads, and CI runs. Those catch different things.
One example from the run records: a test that checked a formatted date passed on a developer machine set to British date format and failed on CI, which used the American one. No amount of reading the diff shows that. Running it does.
The reviewer's instructions say so themselves: "A claimed green run is not evidence; a CI run on the same commit is…" So the merge itself is plain code. Every ten minutes it reads each waiting pull request and holds it at the first doubt:
- the head commit is not the one the reviewer passed;
- any check on it is not green;
- main is red in that repository (I added this hold on 18 November, in the middle of the week in the post linked above);
- a comment says the gate failed.
Only when nothing objects does code squash-merge it. The check reads GitHub's own check results on the pull request, so it works with any CI that reports to GitHub.
When should a person still review?
Before the work and after it, and rarely in the middle. That is how I run it, anyway.
Before: the issue. The reviewer checks the change against the issue's "done when". If the issue asks for the wrong thing, the reviewer will pass the wrong thing, carefully and with evidence.
During: only the questions a run can't answer alone. A run that can't go on stops as blocked
and asks me one question with options; 21 of 1,461 lead runs did that. My rules also make an agent
ask before anything a revert can't undo: deleting data, rotating a secret, messaging customers.
After: I read what merged. Not every line, but enough to notice when the agents start solving the wrong problem very well.
If your team needs a human approval on every pull request, for an audit or a customer contract, keep it. The reviewer agent then hands that person a change that has already survived one suspicious reader.
Between them, my two reviewers said needs-fix 545 times in 26 days and never once took it personally. I am still working on that part.


