Once agents start writing a large share of your code, pull requests pile up faster than humans can read them line by line. Reading every diff carefully turns the review queue into the team’s main bottleneck, while rubber-stamping PRs leaves nobody sure what just shipped. This post breaks down how the Claude Code team restructured code review around layered automated checks and where they still spend human engineering time.

At a Glance

  • Claude writes roughly 90% of Claude Code’s codebase. Between June and September, merged PR volume more than doubled while the revert rate fell by more than 40%.
  • Rather than dropping review, the team shifted most code reading to machines: six stacked layers—from pre-PR self-verification to post-merge rollback—each catch a slice of defects.
  • Required human approvals depend on change risk rather than whether a human or an agent wrote the code: zero human approvals for low-risk changes, one for medium, and two for high.
  • Convergence rules such as round caps stop author and reviewer agents from trading nitpicks overnight, lifting the single-round pass rate on internal PRs from 65% to 78%.

About the Original Post

Addy Osmani, Morgan Westlee Lunt, and Qing Wang published this 14-minute post on October 15, 2026. It documents the production review pipeline used by the Claude Code team, covering how they evaluate and tune review agents, what decisions stay with humans, and what order other teams should adopt these pieces in. Engineering leads rethinking PR rules for agent-heavy repositories are the primary audience. Source: How the Claude Code team does code review .

Redefining What Code Review Is For

Start with the volume numbers. Daily changes landing in Anthropic’s main monorepo grew from roughly 2,500 in May to over 30,000 in September, and the standalone Claude Code repository faces comparable pressure. At that pace, relying on a human to read every line of every diff stops working.

The authors separate code review into two distinct jobs: catching defects before users hit them, and building shared understanding of the codebase across the team. Most of the post tackles the first job. Instead of asking “did a human read this diff?”, the team asks what could go wrong with a change and whether an automated check or a human is better suited to catch it. Changing the question also shifted when review happens. Instead of acting as a final gate after opening a PR and waiting on a teammate, review runs continuously while the change is being built—more like live spellcheck than a pre-press sign-off. By the time a human sees a PR, Claude has usually reviewed and revised it at least once.

The team set an explicit operational target across Claude Code’s CLI, desktop and web apps, and mobile apps: most PRs should merge with at most one human involved—who can be the author—without raising revert or incident rates. They track human cost with three metrics: human approvals per PR (median and 95th percentile), human comments per PR, and time a PR spends waiting on a human. Revert and incident rates serve as guardrails; if time saved during review simply turns into firefighting after release, those guardrail numbers surface it immediately.

The Path Every Change Travels

The diagram below traces a change from the author’s laptop to production users. Circles mark automated checks, the orange diamond marks the single risk-based human decision point, and the looping arrow at the bottom marks recovery.

Lifecycle of a Claude Code change across four stages: Before the Pull Request, On Every Pull Request, Merging, and After the Merge, ending in observe and fix forward or roll back

Figure 1. From top to bottom, a change moves through BEFORE THE PULL REQUEST, ON EVERY PULL REQUEST, MERGING, and AFTER THE MERGE. Risk-based approval is the sole human gate in the flow. Source: Original post .

Each layer handles a specific slice of verification:

  • Pre-PR verification: Give Claude concrete ways to run the code—test suites, builds, or screenshots compared against design specs—and require command output rather than a claim that work is finished. A fresh subagent with clean context then reviews the diff before a PR ever opens. Claude Code creator Boris Cherny estimates that giving the agent self-verification tools improves output quality two to three times.
  • Repository guidance files: Whenever automated review repeats the same complaint, the team updates skills, lint rules, or guidance docs. CLAUDE.md explains what the project is and how to work in it, while REVIEW.md—maintained by code owners—tells reviewers what matters in that directory. Good REVIEW.md files stay short: they state what failure looks like in that repo (factual errors in docs, misrouted traffic in configs), cap minor nitpicks, and require file and line citations as proof.
  • AI review on every PR: Externally, Code Review for Claude Code is generally available on Team and Enterprise plans, while /code-review runs a lighter local pass. After rolling out the research preview internally, the share of internal PRs receiving substantive review comments jumped from 16% to 54%. Each repository picks a review depth from Quick, Standard, or Deep.
  • Voting on findings: Multiple agents hunt for bugs in parallel, and a second group of agents votes on whether each candidate finding is genuine. Only high-consensus findings survive; pure style and formatting nits get filtered out. Surviving comments post in severity order with Important, Nit, or Pre-existing tags (Pre-existing flags bugs the PR did not introduce). Authors must either fix each finding or close the thread with a written explanation.
  • Security review and required CI: A dedicated security review pass runs alongside bug review, and any open thread from either pass blocks merging. Lint, typechecks, cross-platform tests, and builds are also mandatory, and the PR template requires explicit test and rollback plans.

Stacking those layers creates a Swiss-cheese defense where each plate catches defects the previous one missed.

Swiss-cheese diagram of six check layers—verification, required CI, AI review, security review, human approval, and merge queue + flags—catching orange defect dots, with fast rollback catching the rare issue that passes all six

Figure 2. Each plate represents one verification layer, orange dots represent defects, and white holes show blind spots in individual layers. Rare defects that line up through every hole land in fast rollback at the bottom. Source: Original post .

Risk Determines How Many Humans Approve

Fixing a documentation typo and changing the auto-updater should not demand the same human scrutiny. The team maps change risk directly to required human approvals:

Risk tierTypical changesHuman approvals required
LowDocs, copy tweaks, internal-only features, additive code behind a disabled flagZero once automated and security checks pass
MediumStandard product changes, plus sensitive areas such as caching, auto-updater, or system promptsOne human
HighHighest-risk code paths and directories configured to always require dual sign-offTwo humans

One classifier assigns the risk tier from the diff, and a second independent classifier checks whether an extra human reviewer should still be pulled in regardless of tier. Owner-designated sensitive paths and CI workflow files always require human eyes.

Low-friction paths carry strict guardrails. Only authors on the repository’s trusted list qualify, and an agent approval never counts toward a human approval slot. When an agent opens a PR on someone’s behalf, the human who dispatched that agent becomes a required reviewer. Approvals bind to a specific commit SHA—pushing new commits or resolving a merge conflict by hand resets the approval state.

Protection continues past the merge button. A merge queue re-runs checks with the change rebased onto main so two individually green PRs cannot break the build together. New features ship behind flags to Anthropic employees first, then roll out to the public latest channel before reaching stable. Flags can be killed without redeploying, backed by a weekly on-call rotation. One piece the authors note they have not built yet is an automated circuit breaker that tightens approval thresholds when revert or incident rates spike.

Stopping Endless Agent Review Loops

When both the PR author and the PR reviewer are agents, review-and-fix cycles can spin out of control. One CLI PR ran through more than 50 rounds overnight until the human author stepped in and stopped it. Running git blame on the lines flagged in later rounds showed that roughly 59% of them had already been sitting in the diff during round one—the reviewer was barely catching regressions from recent fixes, just surfacing a few more missed issues per pass. Where a human engineer shrugs off a minor comment in seconds, an agent dutifully burns another commit and triggers another full review cycle.

To force convergence, the team rewrote its re-review rules around four constraints:

flowchart TD
  A["AI review"] --> B{"New findings?"}
  B -->|"No"| C["Pass"]
  B -->|"Yes"| D["Fix every instance<br/>of each bug class"]
  D --> E{"Past round 3?"}
  E -->|"No"| F["Re-review new diff only after early rounds<br/>Do not repeat prior findings"]
  F --> B
  E -->|"Yes"| G["Ask author to<br/>rethink the approach"]

Pre-existing bugs lurking in untouched files moved out of PR review altogether into a separate nightly review agent. Those changes shifted internal PR convergence sharply:

Horizontal bar chart comparing PR convergence before and after rule changes: one-round pass rate rose from 65% to 78%, PRs needing 5+ rounds dropped from 8.9% to 1.5%, and average review rounds fell from 2.08 to 1.32

Figure 3. Gray bars show metrics before, and orange bars show after the convergence work: share of PRs passing in one review-and-fix round, share needing five or more rounds, and average review rounds to pass. Source: Original post .

The team grades the reviewer itself every day. They curated an evaluation set from historical PRs that caused real incidents, asking engineers familiar with those outages to annotate the exact bug and location. Daily eval runs score recall against that incident set, while precision comes from developer reactions on live PRs—whether an author fixed a comment, marked it wrong, explained it as intended behavior, or dismissed it. They also run the reviewer against known-clean PRs to watch how often it nudges authors toward harmful edits. Their explicit priority order puts catching real bugs ahead of minimizing review rounds.

What Stays With Humans

Five responsibilities remain firmly human: deciding product direction, taste, and scope (whether a change should exist at all); reviewing high-risk paths like billing, auto-update, and CI workflows; shaping architectural patterns that other engineers and agents will copy; reading verification artifacts like test logs and UI screenshots; and owning production outcomes. If the attached proof still leaves you unsure what automated checks might have missed, the rule is to request a full human review instead of clicking approve.

Knowledge sharing—the second traditional job of code review—changed form completely. Nobody holds the entire Claude Code codebase in their head anymore, and the authors argue nobody needs to. When an engineer needs to understand an unfamiliar subsystem, they ask Claude for a walkthrough tailored to that question; it arrives in minutes and reflects today’s code rather than stale wiki pages. Skimming a one-line copy diff teaches almost nothing compared with reading a fresh explanation of the module you are about to modify.

Team culture reinforces ownership after merge: whoever merges a small or medium change usually fixes any fallout themselves. That norm works because diffs stay small and most mistakes can be reverted or flag-killed within minutes—putting recovery in the hands of the person who already holds the freshest context rather than hunting for blame.

Takeaways

The notes below are this blog’s own interpretation, not part of the original post.

  1. Pairing human-time metrics (approvals, comments, wait time) with outcome guardrails (revert and incident rates) is the sharpest operational idea in the post. Data platform teams can apply the exact same framing to SQL and pipeline reviews: instead of asking whether a senior engineer read every line of a dbt model, map out what schema checks, row-count diffs, and reconciliation queries catch at each layer—shrinking human review down to business-definition changes and high-blast-radius tables.

  2. The finding that 59% of late-round review comments targeted code already present in round one should shape anyone’s multi-agent workflow design. Whenever one agent critiques another agent’s output, build in round caps and diff-scoped re-checks from day one; otherwise, token spend goes toward trickling out missed first-pass observations one commit at a time.

  3. Turning past production incidents into a daily benchmark for the review agent transfers cleanly to internal enterprise agents. Curating real failure cases from your own operations—and re-scoring every prompt, tool, or model change against that incident set—gives you a grounded answer to whether a new agent version actually prevents outages that hurt your team before.

What to Try First

  • Add a short REVIEW.md to your repository capturing the review comments your team repeats most often, plus one sentence per area describing what real failures look like in docs, configs, or application code.
  • Update your pull request template to require explicit fields for test evidence, risk level, and rollback steps.
  • If you already run an AI code reviewer, measure review rounds per PR over the past few weeks and check what percentage of PRs spin past three rounds.

Original post: How the Claude Code team does code review