How the Claude Code team does code review
Anthropic's Claude Code team reviews agent code in six automated layers plus rollback; merged PRs doubled and reverts fell over 40% from June to September.
By Dillip Chowdary • Oct 17, 2026 • Source: claude.dev
Contents
Claude writes about 90 percent of Claude Code's own code, so Anthropic's Claude Code team had to answer an awkward question: who reviews code at the volume an agent produces it? In an engineering post on the claude.dev blog published October 15, Addy Osmani, Morgan Westlee Lunt and Qing Wang describe the answer. Most of the reading moved to machines, human attention is spent where risk is highest, and mistakes are made cheap to undo.
The results they report: from June to September, merged pull requests to Claude Code's codebase more than doubled, while the share that had to be reverted fell by more than 40 percent. This piece walks through the review layers, the risk tiers that decide when a person must approve, how the team measures its AI reviewer, and the checklist it offers other teams.
01Why code review had to change
Agent-written code arrives fast. In Anthropic's monorepo, changes landing per day went from about 2,500 in May to more than 30,000 in September. Claude Code lives in its own repository, separate from the monorepo, but faces the same pressure, and the team says manual line-by-line review at that pace is close to impossible.
The authors split review into two jobs: finding and fixing issues before they ship, and building shared understanding of the codebase. They argue that "did a human read the code?" is a weak proxy for the real question: what could go wrong with this change, and which check, automated or human, is the right one to catch it? Review is no longer a single gate at the end. It runs continuously, "more like spellcheck while you write," and most changes have been reviewed and fixed by Claude at least once before a person is asked to look.
The target is explicit. Most pull requests in the Claude Code repos (the CLI, the desktop and web apps, and the mobile apps) should merge with at most one human in the loop, who can be the author, with no rise in reverts or incidents. The team tracks human approvals per PR at the median and 95th percentile, human comments, and how long a PR waits on a person. Revert and incident rates are the guardrail: if they rise, the authors write, human time was not saved, only moved.
02The review layers, step by step
The post's diagram shows six layers of checks with rollback underneath. Each layer catches some problems and misses others, few defects get through all of them, and rollback handles the rest.
- Verified before anyone looksClaude gets something it can run, such as tests, a build or a screenshot to compare with the design, and must show the output rather than claim it is done. A subagent then reviews the diff with fresh context. Many engineers also run internal skills that hunt for bugs, simplify the diff and check behavior end to end.
- AI review on every pull requestClaude reads the diff against the whole repository and the PR's stated intent. Several agents look for bugs in parallel, then a separate group votes on each finding, and only findings enough of them agree on are posted. Comments are tagged Important, Nit or Pre-existing.
- Security review that can blockA PR cannot merge while any bug or security finding is open. Authors fix it or close the thread with a short reason, which is how false positives are cleared.
- Automated checks that blockLint, type checks, tests on every platform and a build. A typical CLI pull request may run dozens of checks before anyone looks at it.
- Human approval, scaled by riskA classifier reads the change and picks its risk tier; a second classifier asks whether this specific change needs another person anyway.
- Merge queue, flags and a gradual releaseThe queue re-runs every check against main with the change applied. New behavior usually ships behind a flag to Anthropic employees first, then to the latest channel, with the stable channel trailing.
- Fast detection, fast rollbackFlags turn off without a deploy, Claude Code has a weekly on-call rotation, and incident reviews ask which layer should have caught the issue.
The public version of the PR reviewer, Code Review for Claude Code, is generally available on Team and Enterprise plans. When Anthropic launched its research preview, the share of internal PRs with substantive review comments rose from 16 percent to 54 percent. Most PRs over 1,000 lines get findings, and most small ones come back clean. Admins set each repository to Quick, Standard or Deep; the team says Deep is worth it where one missed bug costs more than the extra review time.
Two smaller tools run the same checks locally:
Approval tiers are set by the change, not the author:
| Risk | Examples | Human approvals |
|---|---|---|
| Low | Docs, copy, internal-only features, additive changes behind a flag | None once automated review and security checks are green |
| Medium | Ordinary product changes, plus sensitive areas such as caching, the auto-updater or system prompts | One person |
| High | The highest-risk code and a small set of paths that always need two people | Two people |
Only authors on a repository's trusted list, mostly the owning team, get the lighter paths. An agent's approval never counts as a person's. On an agent-written PR, the person directing the agent counts as one of the required reviewers. Approvals cover one specific commit, so an agent's push or a hand-resolved merge means approving again.
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
03How the team keeps the reviewer honest
Past incidents became the eval. The team collected PRs that caused incidents, along with their fix-forwards and reverts, had engineers who know that code confirm each bug and where it lived, and runs the reviewer against that set every day. Every change to the reviewer is scored against all of it.
Noise is measured by what people do with comments: whether the author fixed the finding, called it wrong, said the behavior was intentional, or decided it didn't matter. The team also runs the reviewer on PRs known to be clean and counts how often it reports something that would have led to a harmful change. The written priority is catching real bugs first and cutting review rounds second. Noise matters more with agent authors, because a person can wave off a nit in seconds while an agent fixes it, which means another commit and another review.
Review also has to converge. One CLI PR went through more than fifty rounds of review and fixes overnight before its author stopped it. When the team ran git blame on what the reviewer kept flagging, about 59 percent was code that had existed since the reviewer's first pass. It was finding a few more old bugs each round, not new ones. The fixes:
- A round cap: after three rounds, the reviewer asks the author to step back and reconsider the approach.
- Diff-only re-review after the first few passes.
- Flag the class of bug, so the author fixes every instance rather than one line.
- No repeats of findings already posted.
Review agents also run nightly over existing code to catch old bugs before they surface elsewhere. When the reviewer keeps flagging the same thing, the team fixes it at the source: in a skill, a lint rule, CLAUDE.md (the stack, conventions, goals and non-goals, loaded by every review) or REVIEW.md, which code owners write to say what failure looks like in their part of the code, cap nits, list paths to skip and demand a file and line as evidence.
04Where humans stay in the loop
People on the team still decide whether to build something at all, review risky code such as billing, the auto-updater and CI workflows, and review architecture that sets a pattern others will copy. They read the evidence (test output, the command that ran and what it returned, screenshots, the reviewer's findings) and own the outcome: a person is accountable for every change that ships, whoever typed it.
"Verification looks different for each domain. It might be as simple as running a bash command, or running a test suite, or testing the app in a browser or phone simulator."
Boris Cherny, creator of Claude Code, who estimates that giving Claude a way to verify its work makes the result two to three times better
On the second job of review, spreading codebase knowledge, the team admits it has no formal process. Nobody keeps a complete mental model of Claude Code, and the authors don't think anyone needs to. Engineers ask Claude for an explainer of the slice they are about to change, and some have it build a small visual artifact. Open Slack channels show what others are building while they build it.
The norm is "you land it, you own it": whoever lands a small or medium change usually fixes what breaks. It works, the authors say, because changes are small, flags, reverts and staged releases undo most mistakes in minutes, expensive code gets more people and checks, regressions surface quickly through telemetry and internal use, and incident reviews look at the system rather than blame. Because agents make code cheap to write, closing a PR after someone questions the direction does not feel like a loss.
05How to adopt the process
The post ends with a checklist for teams that let agents open pull requests.
Before the pull request
- Give the agent checks it can run, listed in a short CLAUDE.md, plus hooks that run formatters and linters.
- Run /code-review and /security-review locally, or a fresh-context subagent review.
- Add a REVIEW.md and move repeated review comments into it.
On every pull request
- Require CI, and add "Testing", "Risk" and "How to revert" to the PR template.
- Add an AI reviewer (Code Review for Claude Code or the Claude Code GitHub Action) on one repo, tune REVIEW.md for a few weeks, then widen.
- Add automated security review and require every review thread resolved before merge.
- Match review effort to risk, and cap review rounds; after the first few, re-review only the new diff.
Approval, merge and after
- Write down risk tiers set from the change rather than the author; start strict and loosen with evidence.
- Use CODEOWNERS and branch protection so auth, billing, CI and release workflows, and installers always need a person.
- Never let a bot's approval replace a required human's, and dismiss approvals on new commits.
- Use a merge queue, feature flags, internal use first, staged releases and one-step rollback.
- Turn incidents and reverts into an eval set, and measure human time with revert and incident rates as the guardrail.
06Open problems the team names
The authors flag what is still missing. Noticing a bad merge depends on the author, on-call and the revert and incident dashboards; there are no circuit breakers yet that tighten approval when those numbers move, and engineers want them before more code moves to zero-human merges. One colleague is quoted as saying slowing down does lower the error rate, mostly because you do less of everything; the team would rather get faster at noticing and fixing problems.
The product and the internal process also differ. Code Review's announcement said approving a pull request is still a human call, and the product posts findings, not approvals. Anthropic's own repos go further, letting owners decide which low-risk changes merge on automated checks alone, and the authors say that line keeps moving. When a review misses something, the team asks what the model did not have in front of it and puts the fix into a CLAUDE.md, a skill or a new check.
Claude Code code review FAQ
How does the Claude Code team review AI-written code?
Every change passes six layers of checks with rollback underneath: verification before a PR exists, AI review on every PR, a blocking security review, blocking CI checks, human approval scaled by risk, and a merge queue with flags and staged releases.
Is Code Review for Claude Code available on every plan?
No. Code Review for Claude Code is generally available on Team and Enterprise plans. The /code-review command runs a lighter version locally.
How does the AI reviewer avoid false positives?
Several agents look for bugs at the same time, then a separate group votes on each finding, and a finding is only posted if enough of them agree it is real. Style-only, diagnostic and cleanup findings are dropped.
When does a Claude Code pull request need a human approval?
A classifier sets the risk tier from the change, not the author. Low-risk changes need no human approval once automated checks are green, ordinary and sensitive-area changes need one person, and the highest-risk paths need two.
What are CLAUDE.md and REVIEW.md used for?
CLAUDE.md describes the project's stack, conventions, goals and non-goals and is loaded by every review. REVIEW.md, written by code owners, tells the reviewer what matters in their part of the code, caps nits, lists paths to skip and asks for a file and line as evidence.
Sources
- Original engineering post: claude.dev Blog, "How the Claude Code team does code review" (Oct 15, 2026)
- Hacker News discussion
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement