Automated code review โ€” layers of checks over a code change
Coding Agents ยท Article

How the Claude Code Team Does Code Review

Source: Anthropic โ€” Addy Osmani, Morgan Westlee Lunt & Qing Wang Published Oct 15, 2026 ยท 14 min read
Read the original โ†— claude.dev

Anthropic has said before that Claude writes about 90% of Claude Code's own code. So how do you review code at the volume an agent produces it โ€” does anyone read code anymore, and if something breaks, who catches it? This post walks through the Claude Code team's code-review flow and how it has evolved. The headline: from June to September, merged pull requests more than doubled while the share that had to be reverted fell by more than 40%. They didn't remove review โ€” they moved most of the reading to machines, optimized for human time and attention, and invested heavily in making mistakes fast and cheap to undo.

Rethinking the purpose of code review

When agents write code, the number of changes goes up fast. In Anthropic's monorepo, changes landing per day went from about 2,500 in May to more than 30,000 in September (source). Claude Code lives in its own repository, but it sees the same pressure โ€” at that speed, manual line-by-line review is effectively impossible.

Code review does two jobs: (1) find and fix issues before they ship, and (2) build shared context across the team. The reframe that matters: "did a human read the code?" is an imprecise proxy for "what could go wrong with this change, and which check โ€” automated or human โ€” is the right one to catch it?" That also changed when review happens. It used to be a gate at the end of the road; now it runs continuously, like spellcheck while you write. Most changes have been reviewed and fixed by Claude at least once before a human is asked to look.

The scarce resource: human time and attention

The goal is to preserve human time for issues only humans can solve, and let automated checks catch the rest. Human time has two sides โ€” the time spent reviewing, and the time spent fixing what bad code breaks โ€” and cutting the first doesn't help if it just reappears in the second. So the target is: most PRs merge with at most one human in the loop (who can be the author), with no increase in reverts or incidents. They measure human time via approvals per PR (median and 95th percentile), human comments, and time waiting on a person โ€” with revert and incident rates as the guardrail.

The life of a change

A typical change, from an engineer's laptop (or a Claude session in Slack), passes through multiple layers:

Before the PR โ€” the work is verified: Claude runs tests/build/linter, and a second agent reviews the diff in fresh context.
On every PR โ€” required CI (lint, types, tests, build); Claude code review (agents hunt bugs in parallel, verifiers vote, survivors ranked); security review (separate, blocking); risk-based approval (a classifier sets the tier: no person, one, or two).
Merging โ€” a merge queue re-runs checks on latest main with the change applied.
After merge โ€” behind a flag, internal employees first, gradual release (latest โ†’ stable channel), then watch / fix-forward / roll back.

Most of the path is automated; a person's attention goes where the risk is.

Layer by layer

1. The work is verified before anyone else looks. Most review now happens before a PR exists. Give Claude something it can run โ€” tests, a build, a screenshot to compare against the design โ€” and ask it to show the output instead of saying it's done. Then a subagent reviews the diff with fresh context. Both habits come from the best-practices guide. Boris Cherny, who created Claude Code, calls giving Claude a way to verify its work "probably the most important thing" for good results โ€” he estimates it makes the final result two to three times better.

When the automated reviewer keeps flagging the same thing, they fix it at the source โ€” in the skill, a lint rule, or instructional files: CLAUDE.md (what the project is; every review loads it) and REVIEW.md (written by code owners โ€” what matters in their part of the code, what failure looks like, capped nits, paths to skip, "file and line as evidence, not a guess from a name").

2. AI review on every PR. Every PR gets a Claude review before a person looks. The public version, Code Review for Claude Code, is now GA on Team and Enterprise; /code-review runs a lighter version locally. When the research preview launched, the share of internal PRs getting substantive review comments went from 16% to 54%. Findings are verified by other agents before humans see them: several agents hunt in parallel, a separate group votes on each finding, and only agreed-real ones are posted, tagged Important / Nit / Pre-existing. Every finding has to be answered โ€” fix it or resolve with a reason.

3. Security review that can block. A separate pass; a PR can't merge while any bug-review or security finding is open. Available via /security-review or the GitHub Action (setup guide).

4. Automated checks that block. Lint, type checks, tests on every platform, and a build (how they scaled CI for this volume). The PR template asks how the change was tested and how to undo it.

5. Human approval, scaled by risk. A docs fix and an auto-updater change get different review:

RiskExamplesHuman approvals
LowDocs, copy, internal-only, additive changes behind a flagNone (once automated + security are green)
MediumOrdinary product changes; sensitive areas (caching, auto-updater, system prompts)One person
HighHighest-risk code, plus paths that always need two peopleTwo people

The change sets the tier, not the author. A classifier reads the change and picks the risk tier; a second asks whether this particular change needs another person anyway. Only trusted authors get the lighter paths. An agent's approval never counts as a person's. On an agent-written PR, whoever prompted the change counts as one of the required reviewers. An approval covers one specific commit โ€” new unvouched commits reset it.

6. Merge queue, flags, gradual release. The merge queue re-runs checks against main with the change applied, so two PRs that pass separately can't combine into a broken main. New behavior ships behind a flag to employees first; public releases go to latest first, stable trails.

7. Fast detection, fast rollback. Flags turn off without a deploy; there's a weekly on-call rotation, and incident reviews ask which layer should have caught it. They don't yet have circuit breakers that tighten approval when revert/incident numbers move โ€” engineers want them before more code moves to zero-human merges.

Making the reviewer better

Any incident is now an eval. The team collected past PRs that caused incidents, had engineers confirm each bug, and run the reviewer against that set daily โ€” every change to the reviewer's prompts, tools, or model is scored against all of it, kept if the score went up and dropped if it didn't.

They measure noise by watching what people do with comments. Every comment is sorted by how the person responded (fixed / wrong / intentional / doesn't matter), plus the reviewer is run on known-clean PRs to count harmful false positives. Catching real bugs comes first; cutting review rounds second. Noise costs more when the author is an agent โ€” a person waves off a nit in seconds; an agent fixes it, spawning another commit and round.

Review has to converge. An agent author and agent reviewer can keep each other busy indefinitely โ€” one CLI PR went through more than fifty rounds overnight before its author stopped it. When they ran git blame on what kept getting flagged, about 59% was code that had been there since the first pass โ€” the reviewer was finding a few more old bugs each round, not new ones. Fixes: a round cap (after three, ask the author to step back), diff-only re-review after the first few passes, and flag the class of bug so the author fixes every instance. The result:

MetricBeforeAfter convergence work
Pass after one review + fix round65%78%
Need five or more rounds8.9%1.5%
Mean reviews to pass2.081.32

Where humans stay in the loop

People on the team are still responsible for: deciding whether to build it (direction, taste, scope โ€” "should we even do this?"); reviewing risky code (billing, the auto-updater, CI workflows); reviewing architecture that sets a pattern others will copy; reading the evidence (test output, the command that ran, a screenshot, the reviewer's findings โ€” if you can't say what the checks would miss, ask for a real review rather than a quick approval); and owning the outcome โ€” a person is accountable for every change that ships, whoever typed it.

Sharing context across the team

Review's second job has always been spreading codebase understanding. If machines do most of the reading, how does anyone learn the code? Their answer: nobody keeps a complete mental model of Claude Code in their head, and nobody needs to. When someone wants to understand a slice of the codebase, they ask Claude to write an explainer for exactly that slice โ€” it takes minutes and reflects the code as it is today. The team also defaults to working in open channels, so you see what others are building while they build it.

"You land it, you own it"

If you land a small or medium change and something still goes wrong, it's the norm that you usually fix it. What keeps that from going badly: changes are small (easy to review, debug, revert); everything is reversible (flags, reverts, staged releases); blast radius sets the bar (expensive code gets more people and checks); regressions surface fast (telemetry + internal use); and it isn't blame โ€” owning a fix means you have the most context, and incident reviews look at the system, not the person.

How you can adopt this process

Most of the pieces exist today. Before the PR: give your agent checks it can run (a short CLAUDE.md + hooks), run /code-review and /security-review locally or a fresh-context subagent review, add a REVIEW.md. On every PR: require CI, add "Testing / Risk / How to revert" to the template, add an AI reviewer on one repo and tune for a few weeks before widening, require every review thread resolved. Approval: write down risk tiers set from the change, keep lighter paths for trusted authors, use CODEOWNERS + branch protection so auth/billing/CI/release always need a person, never let a bot's approval replace a required human's. Merge and after: merge queue, feature flags, internal-first, staged releases, one-step rollback, and turn incidents/reverts into an eval set. Measure human time, with revert and incident rates as the guardrail.

Claims & provenance

Primary source

This is Anthropic's own engineering blog (claude.dev), authors Addy Osmani, Morgan Westlee Lunt & Qing Wang, published Oct 15, 2026. All figures (90% of code by Claude, 2,500โ†’30,000 changes/day, 16%โ†’54% substantive comments, the convergence table) are Anthropic's self-reported internal numbers โ€” authoritative for their team, but not independently audited.

Reproduced faithfully

Every stat, the risk-tier table, and the before/after convergence table are transcribed from the article body (also available as raw markdown). The two figures (life of a change, layers) are summarized in text; the original diagrams are on the source page.

Note on scope

This describes how Anthropic's Claude Code team reviews code, not a general claim about all agent-written code. The tools named (Code Review for Claude Code, /code-review, /security-review) are real and current as of publication.

Sources & further reading

โ˜ฐ View all