Anthropic Details How Claude Writes 90% of Claude Code and Automates Code Review

·2026.10.15 09:00

Key point

Anthropic reports that shifting to AI-driven code review increased merged PRs by over 2x and reduced revert rates by more than 40% between June and September.

1 / 2

Details

Anthropic engineers reveal that Claude writes approximately 90% of Claude Code's own code, necessitating a fundamental shift in how code changes are reviewed and merged. By moving from human-centric review gates to continuous, machine-assisted verification, the team achieved a 2x increase in merged PRs and a 40%+ reduction in revert rates between June and September. Daily changes in the Anthropic monorepo surged from ~2,500 in May to over 30,000 in September.

The 7-Stage Review Lifecycle

The new process redefines code review not as a final gate, but as continuous feedback similar to spellchecking. The lifecycle includes:

  1. Pre-PR Verification: Claude runs tests, builds, and linters. A fresh-context subagent reviews the diff. Internal skills check for bugs, simplify diffs, and ensure UI guideline compliance.
  2. AI Review for All PRs: An AI agent analyzes the diff against the whole repo and PR intent. This increased substantive review comments on internal PRs from 16% to 54% after the research preview launch. Findings are tagged as Important, Nit, or Pre-existing.
  3. Security Review: A blocking check using open-source security review tools and /security-review commands. Open findings prevent merging.
  4. Automated Checks: CI runs linting, type checks, and tests across all platforms. PR templates require testing and undo instructions.
  5. Risk-Based Human Approval: A classifier determines the risk tier:
    • Low (Docs, flags): No human approval needed if automated checks pass.
    • Medium (Product changes): 1 human approver.
    • High (Critical code): 2 human approvers.
    • Constraint: Agent approvals do not count as human approvals; agents cannot approve their own work.
  6. Merge Queue & Staged Release: Changes go through a merge queue, are used internally by Anthropic staff, and released to latest before stable.
  7. Detection & Rollback: Feature flags allow quick disabling of features. Weekly on-call and incident reviews analyze which layer failed to catch issues.

Convergence and Efficiency Gains

A major challenge was convergence loops, where an agent author and reviewer would cycle indefinitely (e.g., one CLI PR had 50+ rounds). Analysis showed 59% of repeated reviewer comments were about pre-existing code, not new bugs.

To fix this, Anthropic implemented round caps (3 rounds max), diff-only re-reviews, and duplicate finding bans. Results for internal PRs:

  • Passing in 1 round: Increased from 65% to 78%.
  • 5+ rounds required: Dropped from 8.9% to 1.5%.
  • Average review rounds: Decreased from 2.08 to 1.32.

Human-in-the-Loop Responsibilities

Humans are no longer reading every diff. Instead, they focus on five areas where machines lack judgment:

  1. Strategic Direction: Deciding if a feature should be built (scope, taste).
  2. Risky Code: Billing, auto-updaters, and CI workflows.
  3. Architecture: Setting patterns for others to follow.
  4. Reading Evidence: Interpreting test outputs, screenshots, and complex reviewer findings.
  5. Ownership: Humans remain responsible for the outcome of all changes, regardless of who (or what) wrote the code.

Adoption Guidelines

Anthropic suggests other teams adopt this by:

  • Adding CLAUDE.md and REVIEW.md to define project conventions and review rules.
  • Using /code-review and /security-review locally.
  • Implementing risk-based approval tiers and strict branch protection for critical paths.
  • Using incident data to build eval sets for continuously improving AI reviewer performance.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.