How the Claude Code Team Does Code Review When AI Writes 90% of the Code
The core question this article answers: When AI handles most of the code writing, can code review still rely on humans reading line by line?
No, and it shouldn’t. The Claude Code team’s answer is to automate most of the “reading code” work and reserve human attention for the high-risk decisions that only humans can make. They didn’t cancel code review. They redesigned what it looks like.
This article is based strictly on the Claude Code team’s published review practices. It breaks down their thinking, the six-layer check process, and the operational steps you can adapt for your own team.
The Results First: PRs Doubled, Revert Rate Dropped 40%
What this section answers: Does review quality inevitably drop when code volume explodes?
The Claude Code team’s numbers give a counterintuitive answer. Between June and September, the number of pull requests merged into the Claude Code codebase more than doubled. At the same time, the share of pull requests that had to be reverted fell by more than 40%.
Put those two numbers together and it’s clear they didn’t reduce risk by merging less. Merge volume went up sharply while the revert rate went down. Three main threads made that possible: automating most of the reading work, tuning that automation to save human time and effort, and investing heavily in making mistakes faster and easier to revert.
One more background number is worth noting. In their monorepo, they went from roughly 2,500 changes merging each day in May to over 30,000 in September. Claude Code itself isn’t in that monorepo, but it faces similar pressure. At that speed, manual line-by-line review becomes increasingly difficult, if not impossible.
Image source: input file
What Is Code Review Actually For?
What this section answers: Is the purpose of code review to have “someone look at the code”?
No. The Claude Code team splits the purpose of code review into two goals:
-
Detect and correct bugs before they ship. -
Develop a shared understanding of the codebase.
This article focuses primarily on the first goal. The second goal comes up toward the end.
They judge whether review is effective not by asking “did someone read the code?” but by asking: “What could go wrong with this change, and what check — automated or human — is the right one to catch it?” That question is more precise, and it guides process design better.
This shift also changes when review happens. Traditional code review is a check performed after the fact: the code is written, the PR is filed, and someone waits for someone else to take a look. The Claude Code team integrated review into the workflow. It’s more like a spellcheck you continuously run while writing. Most changes have already been reviewed and corrected by Claude at least once before a human is asked to look. Routine bugs get caught by automation, and human attention goes to higher-level considerations.
Human Time Is a Two-Sided Cost
What this section answers: Does reducing review time equal saving human effort?
Not necessarily. The Claude Code team treats human time as a two-sided cost. You count the time people spend doing code review, and you also count the time they spend fixing bugs introduced by bad code. If you reduce the first without reducing the second, you haven’t really saved human time.
So their goal is specific: the majority of pull requests in the Claude Code repos — the CLI, the desktop and web apps, and the mobile apps — should merge with a maximum of one person in the loop, who could be the author, without an increase in reverts or incidents.
They track these metrics:
-
Median human approvals per PR, along with the 95th percentile; -
Number of human comments; -
How long a PR waits on a person.
Revert and incident rates are the guardrail. If these metrics increase, human time hasn’t been reduced — it’s just been relocated. That framing is worth borrowing directly: don’t only look at “how much faster is review,” look at “did reverts and incidents go up.”
A Change Passes Through Six Layers, Plus a Rollback Mechanism
What this section answers: What checks does a change actually go through from submission to production?
The Claude Code team designed review as multiple layers, not one gate. Each layer catches some bugs while missing others. Few bugs get through all of them, and if some do, there’s a rollback mechanism in place.
Image source: input file
Layer 1: Pre-PR Verification
Most review happens before a PR is created. They ask Claude to do something runnable — run tests, run the build, or compare a screenshot to the design. Instead of saying the task is done, they ask it to show the result. Then a subagent reviews the diff with fresh context.
Two key moves here:
Move one: Have Claude show verifiable results. Test output, build results, screenshot comparisons. Why does this matter? Because “said it’s done” and “proved it’s done” are different things. Without verifiable results, the rest of the review lacks a factual basis.
Move two: Use a fresh-context subagent to review the diff. A model in the same conversation tends to follow its earlier reasoning. Fresh context reduces the blind spot of grading its own work.
Before opening a PR, many team members also run a handful of internal skills: bug hunting, diff reduction, end-to-end validation, and checking UI changes against design guidelines. Boris Cherny, who created Claude Code, estimates that equipping Claude with a verification process improves the quality of its output by a factor of two to three.
The verification process varies by domain. Sometimes it’s a bash command. Sometimes it’s a test suite. Sometimes it’s testing the app in a browser or phone simulator.
If the automated reviewer consistently flags the same issue, don’t just fix that one spot. Fix it at the source — update the skill itself, add a lint rule, or update documentation files. The file mentions two documents:
-
CLAUDE.md: The project description file that gives Claude context about the project — tech stack, conventions, goals, non-goals. Claude Code pulls this file in for every single review, so keep it brief for large codebases and reference the rest of the documentation here. When code breaks a convention in this file, or an update makes something in it out of date, the reviewer flags it. -
REVIEW.md: Where code owners tell the reviewer what matters in their part of the code. They separately verify whether the reviewer is actually following these guidelines. Good ones are brief and focus on: defining project failure (the docs should not lie; the config should not misroute), limiting nitpicking, defining ignored paths, requiring file and line references instead of guessing filenames, and requiring a top-level summary with a count and a clear “no issues” statement.
Layer 2: AI Review on Every Pull Request
Every PR receives a Claude review before a human review. The diff is analyzed against the entire codebase and the intent of the PR as stated by the author. It checks three things: whether the change actually addresses the issue, whether it fits into the larger system, and whether it breaks other parts of the codebase. When reviewing a bug fix, the bot tries to find the root cause.
Their product, Code Review for Claude Code, is now available to all Team and Enterprise customers. There’s also a lighter local version: /code-review.
Since the research preview, the share of their internal PRs getting substantive review comments has gone from 16% to 54%. Code Review detects issues on the majority of PRs with more than 1,000 lines and returns clean results on most smaller PRs. Admins can configure repos to use Quick, Standard, or Deep modes. Deep is useful when the cost of missing a single bug is higher than the time spent reviewing.
Findings are vetted by multiple other agents before human review:
-
Multiple agents run in parallel to hunt for bugs; -
A separate vote decides whether a finding is valid or a false positive, confirming only findings with enough votes; -
Findings that are only style, diagnostics, or cleanup related are filtered out; -
The remaining findings are presented as inline comments, ordered by severity and marked as Important, Nit, or Pre-existing.
All findings must be addressed: either fixed or the thread is resolved with a reason. In many cases, an agent fixes the problem overnight so the author returns to a PR that’s already been through another review pass.
Layer 3: Security Review That Can Block
They also run an automated security review. No PR can be merged while there is an open finding from either the code review or the security review. The author can fix the issue or close the thread with a short reason. If a later commit addresses the problem, the finding is auto-closed.
You can set up the same thing with the open-source security review GitHub Action or the /security-review command.
Security issues are different from ordinary bugs. You can’t let them through because “the author thinks it’s fine.” There has to be an explicit blocking mechanism.
Layer 4: Automated Checks That Block
Standard checks include lint, type checks, tests on all platforms, and build. A typical CLI PR can have dozens of checks run before anyone looks at it. The PR template asks how the change was tested and how to revert it. Claude can answer those for you, but the author is responsible for reviewing the answers.
More automated checks isn’t always better, but the key ones can’t be missing. The “testing” and “revert” questions in the PR template make responsibility explicit: the author can’t just say “it’s done” — they have to say how it was verified and how to undo it.
Layer 5: Human Approval, Scaled by Risk
Some changes are riskier than others — a docs fix versus an auto-updater change — so they require different levels of review. The tier is determined by the change, not the author. One classifier determines the risk level based on the change. Another classifier determines if a particular change actually requires another approval, even if the tier doesn’t say it does. Some paths always require another approval: anything marked as sensitive by owners, and any CI workflow file.
Only authors on the repo’s trusted list receive relaxed review requirements — generally the team that owns the repo. Everyone else requires a second person to approve. Agent approvals don’t count as human approvals. Automated review can clear a low-risk change, but it can’t stand in for a human when one is required.
The author of the change is responsible for it. If an agent authors a PR, the operator of the agent is always counted as one of the required reviewers. A PR approval is only good for one commit. If a new commit lands that can’t be trusted — an agent pushed something, or someone resolved a merge by hand — the PR must be reapproved.
Layer 6: Merge Queue, Feature Flags, and Staged Rollouts
The merge queue ensures that all checks run on main with the change applied. This prevents merging two successful PRs into a broken main. New features typically roll out behind a feature flag, with Anthropic employees getting access first. Because they use the product extensively, they often notice regressions before users do.
When they roll out publicly, changes go to the latest channel first, and the stable channel trails behind.
Layer 7: Fast Feedback and Rollback
Some bad merges will inevitably make it through. This is the last line of defense, focused on identifying them as quickly as possible. Changes behind feature flags can be disabled without deploying.
Claude Code runs a weekly on-call rotation. Any incident review looks back to see which layer should have caught the problem. Beyond monitoring the revert and incident dashboards, the author and on-call are still responsible for noticing bad merges. They don’t yet have circuit breaker mechanisms that adjust approval requirements based on these metrics, but they’re looking into it.
One team member noted that slowing down and reducing output can improve accuracy, but mostly because the total amount of work decreases. Their priority is improving the ability to identify and correct issues quickly.
How the Reviewer Itself Gets Better
What this section answers: Automated reviewers make mistakes too — how do you make one that keeps improving?
The Claude Code team treats the review process as an ongoing cycle of improvement, with three main practices.
First, use incidents as an evaluation set. The team collects incident-causing PRs, their fix-forwards and reverts, and has engineers who understand the codebase verify the location and correctness of each bug. The review system is evaluated daily against this collection. Every incident adds to the collection, and every change to the review system is evaluated against the entire collection. It turns real incidents into test cases.
Second, measure noise. If you only chase the bug-finding rate, it’s easy to end up reporting lots of non-bugs. So they observe how humans react to review comments and categorize each one: fixed the issue, rejected it, clarified it as intentional, or decided it didn’t matter. They also run the review system on PRs known to be clean and observe how often it reports something that would have resulted in a harmful change.
Their stated priorities are first, detecting real bugs, and second, reducing the number of review cycles.
Third, make the loop converge. For an agent author, dealing with a review comment costs more. A human takes a second to dismiss a nit, but when an agent has to address it, that produces another commit and another review cycle. The review process must converge. They observed one PR in their CLI project cycle more than fifty times overnight due to back-and-forth between the agent author and the agent reviewer. The cycle was stopped manually, but it could have gone on indefinitely.
They ran git blame on what the review system kept flagging and found that about 59% was code that had been there since its first pass. In other words, the review system rarely found new bugs — it just found a few more old ones each cycle. The team started tracking the number of cycles-to-pass and updated re-review rules:
-
Limit the number of cycles. After three cycles, the review system asks the author to re-evaluate the approach. -
After the initial cycles, limit re-review to just the diff. -
Specify the class of bugs so the author can correct all of them, not just one line. -
Avoid re-reporting issues already observed. -
The review agents also run on the current codebase overnight, helping identify historical bugs before they propagate.
Image source: input file
What Humans in the Loop Actually Do
What this section answers: With most reading automated, what are humans still responsible for?
Having a senior engineer stop working to review a common error is expensive compared to automating that process. But human reviewers are still essential for some tasks:
-
Should we even build this? Deciding whether to build something, setting the vision, taste, and goals for the product. One team that claims to have solved the code review bottleneck still performs human review for changes from outside the team to ensure it’s the right thing to build. -
Auditing dangerous code, such as billing, auto-updaters, and CI workflows. -
Architecture review, because those choices set the conventions others follow. -
Verifying proofs, such as test output, commands run, screenshots, and reviewer comments. If you can’t describe what the checks would miss, don’t ask for a thumbs-up — you need a real review. -
Taking responsibility. A person answers for every change that ships, whoever typed it.
If Machines Do the Reading, How Do People Learn the Codebase?
What this section answers: If most reading is done by machines, how do people understand the codebase?
The Claude Code team has no formal mechanism for this. No member of the team has a full mental model of Claude Code in their head, nor do they think anyone needs one. When anyone wants to learn about a piece of the codebase, they ask Claude to generate an explainer about that exact slice. It takes a few minutes, and the explainer is always up to date. Some go a step further and have Claude generate a mini artifact that visualizes the area and teaches it in their preferred style.
This focuses human attention better than reading trivial diffs line by line. A one-line copy change teaches you very little. Creating an explainer about the module you’re going to change teaches you a lot. They also work in open Slack channels by default, so people can see what others are building.
“You Land It, You Own It”
What this section answers: If bad code gets merged, who’s responsible?
If you merge a small or medium change and something goes wrong, the general expectation is that you fix it yourself. This doesn’t spiral out of control for a few reasons:
-
Small changes are easy to review, debug, and revert. -
Everything can be reverted. Feature flags, reverts, and staged rollouts can reverse most mistakes in minutes. -
Blast radius sets the bar. More expensive code gets more eyes and validation. -
Regressions are surfaced quickly by telemetry and internal usage. -
It’s not a blame game. The person who fixes the issue owns it because they have the most context. Incident reviews consider the system. -
Much of the team shares responsibility by working in open channels. Anyone can see what others are building, join the conversation, or have Claude look for gaps.
How to Implement This on Your Team: A Phased Checklist
What this section answers: How do you bring this approach into your own team, step by step?
The file lays out implementation advice at the end. Here it is, broken down by phase.
Before the Pull Request
-
Give the agent a checklist of checks it can run. List these checks in a short CLAUDE.md file. The agent needs to know what counts as verified, or it may just say “done.” -
Set up the agent to call formatters and linters via hooks. Front-load mechanical checks to reduce noise in later review. -
Run /code-reviewand/security-reviewlocally, or have a new-context subagent review the changes. Finding issues before the PR is the cheapest time to fix them. -
Create a REVIEW.md and use it to track recurring review issues. If the same problem keeps coming up, the rules aren’t clear enough or the checks aren’t in place.
On Every Pull Request
-
Enforce CI. No merge without it. -
Update your PR template with “Testing,” “Risk,” and “How to revert.” These three questions force the author to state the verification method, risk level, and exit path. -
On one repo, add an AI reviewer — Code Review for Claude Code or the Claude Code GitHub Action — and iterate on your REVIEW.md for a few weeks before rolling it out to more repos. The reviewer needs tuning; a full rollout too early amplifies noise. -
Add an automated security review. -
Require that all review threads be resolved before merging. Unresolved threads are hidden debt. -
Apply review rigor according to risk. A quick pass for routine changes, a thorough review for high-risk areas. -
Limit the number of review rounds, and after a few rounds, just review the new diff. This prevents the agent author and agent reviewer from cycling forever.
Approval
-
Define risk levels based on the change, not the author. Start strict, and progressively relax as you see evidence. -
Reserve lenient approval paths for trusted authors. -
Bot approvals cannot satisfy a required human approval. Dismiss any approvals when new commits are pushed. -
Designate humans as the approvers for code and policies controlling auth, billing, CI, and release workflows, as well as installers. Use CODEOWNERS and branch protection for this.
Merging and Post-Merge
-
Set up a merge queue. -
Experiment with feature flags. -
Launch to internal users first. -
Roll out in stages. -
Create a one-step revert mechanism. -
Build a set of evals by logging incidents and reverts. -
Rescore the reviewer any time you change its prompts, tools, or model. -
Track human effort, using revert and incident rates as guardrails.
My Take: Where This Approach Has Limits
Reading this material, one thing stood out to me. The most transferable lesson from the Claude Code team isn’t a specific tool. It’s that they turned “review” from a single action into a set of layers. Each layer is responsible only for the problems it’s best at catching, and the layers don’t substitute for each other. That’s harder than buying an AI review tool, but it’s more sustainable.
The other detail that made me pause was the PR that cycled more than fifty times overnight. The agent author and the agent reviewer kept going back and forth. Without human intervention, it might have looped forever. Automation isn’t free — it introduces new failure modes. The Claude Code team’s response was to limit cycles, review only the new diff, and specify bug classes. Those rules aren’t complicated, but someone has to actually observe, measure, and change.
One more real constraint: they don’t yet have circuit breakers that automatically adjust approval requirements based on revert and incident rates. The guardrails currently rely on humans watching dashboards. They don’t hide that. For teams thinking about copying this, I’d suggest accepting that imperfection first: get it running, then add automation gradually.
Practical Summary and Action Checklist
-
The purpose of code review isn’t “someone looked at it.” It’s “what could go wrong, and which check is best suited to catch it.” -
Automate most reading. Reserve humans for high-risk judgment. -
Treat human time as a two-sided cost: review time plus bug-fixing time. -
Use revert and incident rates as guardrails, not just review speed. -
Six layers: pre-PR verification, AI review, security review, automated checks, risk-tiered human approval, merge queue and staged rollout — plus rollback. -
Use incidents as an eval set for the reviewer, measure noise, and limit review cycles. -
Humans in the loop handle: whether to build, auditing dangerous code, architecture review, verifying proofs, and taking responsibility. -
Small changes get fast review; large changes get more eyes. Approvals are tied to a specific commit. -
“You land it, you own it” works when reverts are fast, blast radius is small, and incident reviews look at the system.
One-Page Summary
| Item | Practice |
|---|---|
| Review goal | Find bugs + build shared understanding |
| Core shift | From “did someone read it” to “what could go wrong” |
| Human time | Two-sided cost: review + bug fixing |
| Layer 1 | Pre-PR verification, require runnable results, fresh-context subagent review |
| Layer 2 | AI review on every PR, multi-agent voting, filter style noise |
| Layer 3 | Security review can block merge |
| Layer 4 | Lint, type checks, tests, build can block merge |
| Layer 5 | Risk-tiered human approval by change, agent approvals don’t count |
| Layer 6 | Merge queue, feature flags, staged rollout |
| Backstop | Fast feedback + rollback mechanism |
| Reviewer improvement | Incidents as eval set, measure noise, limit cycles |
| Human responsibilities | Whether to build, dangerous code, architecture, verifying proofs, responsibility |
| Accountability | You land it, you own it; incident reviews look at the system |
FAQ
Q1: Does the Claude Code team really not review code line by line anymore?
They’ve automated most of the “reading code” work, but they haven’t canceled review. Humans still handle high-risk judgment, architecture decisions, dangerous code audits, and final responsibility.
Q2: What are the six layers specifically?
Pre-PR verification, AI review, security review, automated checks, risk-tiered human approval, and merge queue with staged rollout. There’s also a rollback mechanism as a backstop.
Q3: Can an agent’s approval count as a human approval?
No. The file states clearly that agent approvals don’t count as human approvals. Automated review can clear low-risk changes, but a human must step in when one is required.
Q4: Why limit the number of review cycles?
Because an agent author and an agent reviewer can loop indefinitely. They observed one PR cycle more than fifty times overnight. Limiting cycles and reviewing only the new diff makes review converge.
Q5: What do CLAUDE.md and REVIEW.md do?
CLAUDE.md gives Claude project context and is pulled in for every review. REVIEW.md tells the reviewer what matters in a given part of the code and tracks recurring review issues.
Q6: What role do revert and incident rates play in this process?
They’re guardrails. If they rise, human time hasn’t been reduced — it’s just been relocated. The team uses these two metrics to judge whether the review process is actually working.
Q7: What are humans in the loop still responsible for?
Deciding whether to build, auditing dangerous code, architecture review, verifying proofs, and taking responsibility. These are the five non-substitutable tasks the file lists.
Q8: Can small teams use this approach?
The file’s implementation advice is phased: add pre-PR checks first, then add an AI reviewer on one repo, iterate on REVIEW.md for a few weeks, then expand. You don’t need all six layers at once.

