Case Studies

Inside Anthropic’s AI-Assisted Code Review Workflow

Anthropic has documented how the Claude Code team uses AI to accelerate code review without replacing human judgment. The workflow, prompts, and limits of automation offer a practical model for engineering teams adopting reviewer Agents.

Font size

On August 24, Anthropic published How the Claude Code team does code review on claude.dev/blog. It reached 39 points and 29 comments on the HN front page. Rather than offering another generic claim that “AI changes everything,” the post reveals the internal review workflow the Claude Code team had been refining for several months.

For developers building AI Agents, the post is worth reading because it shows what an LLM can realistically handle inside a real software development process.

How Anthropic Reviews Code

The approach can be summarized in one sentence: instead of asking humans to inspect the entire PR diff, Anthropic uses Claude Code to run a reviewer Agent that treats the diff as an entry point into an unfamiliar codebase.

The workflow works as follows:

  1. When a PR is submitted, a GitHub Action automatically invokes @claude and leaves a PR comment containing a summary, the key changes, and potential risks.
  2. Reviewers do not need to read the code from scratch. They can start with the AI-generated summary, then select areas of concern for closer inspection.
  3. Every 30 minutes, the AI Agent checks the PR for new comments, answers questions, and makes code changes when appropriate.
  4. A human must give an LGTM before the PR can be merged.

The most important detail is that Anthropic also published part of its prompt. The post includes the core prompt for a reviewer Agent:

You are an expert code reviewer. Analyze this PR as if you're joining a new team and need to understand:
1. What does this PR do in plain English?
2. What files are changed and why?
3. Are there any obvious bugs, race conditions, security issues?
4. What's missing? Tests, error handling, logging?
5. Flag any concerns but don't make up issues.
If unsure, say "I'm not sure" rather than invent problems.

The final instruction—“don't make up issues”—reflects a principle Anthropic repeatedly emphasizes in AI-assisted reviews.

Not a Replacement: More Boxes Checked by Reviewers

Many readers interpreted the post as an example of AI replacing developers as reviewers. In reality, Anthropic divides review work into two layers.

What the AI handles:

  • Syntax and style checks that a linter can perform
  • Test coverage scans
  • Interface contract checks, including type and signature changes
  • Changes to defaults, error handling, and logging
  • A one-line diff summary that lets a reviewer understand the PR in five seconds

What humans review:

  • Architectural decisions
  • Whether the API design makes sense
  • Edge cases and business logic
  • Whether anyone will still be able to maintain the code six months later

Anthropic states the rationale directly:

“We're using AI to handle the parts that humans find tedious, so humans can focus on the parts only humans can do.”

This is very different from treating AI as an all-purpose reviewer. AI does not sign off on the PR. That responsibility stays with an engineer.

What the HN Debate Centered On

The thread accumulated 39 points and 29 comments, with opinions on both sides. The original discussion focused on three main concerns.

1. Who Is Responsible for a Review?

The most upvoted objection asked what happens when an AI-generated summary says a PR looks fine, the human reviewer gives it only a cursory glance, and the change later causes an incident.

This argument, which reached the first page of the discussion, invokes “automation bias”: people become less rigorous when an automated system appears to have already checked the work. Anthropic acknowledges the risk, which is why a human LGTM is mandatory.

2. Will AI Patches Be Misused?

Another question asked when the AI would stop reviewing and begin submitting fixes directly within a PR.

Anthropic’s answer was that this is already happening. The AI Agent can leave fix suggestions on a PR, but a human must select “apply” before any code changes are made. This is very different from enabling automatic merging.

3. Smaller Teams Cannot Replicate the Setup

One comment captured the concern bluntly: “Anthropic has 50 reviewer Agents running, and an ordinary team cannot afford even one.”

The observation hits a real pain point. Claude Code itself is not expensive on a token-based pricing model, but teams still need prompt templates, carefully tuned thresholds, and fail-safes. Not every organization already has the engineering capacity to support that infrastructure.

Three Practices Teams Can Adopt

Teams do not need to copy the entire workflow, but three practices are straightforward to borrow.

1. Split Review Into Two Layers

Do not expect AI to complete the entire review. Document which tasks belong to the AI and which require human judgment. Small teams can use AI for linting, coverage checks, and interface-change scans while reserving design and edge-case review for developers.

2. Tell the Model “Don't Make Up Issues”

This constraint is essential to making the system reliable. LLMs can present invented problems with complete confidence. Adding this instruction to a reviewer Agent is more useful than adding a complex scoring mechanism.

3. Review from the Perspective of a Stranger

Anthropic repeatedly frames the Agent as working “as if you're joining a new team.” That perspective matters. A reviewer should not merely repeat the author’s explanation; they should ask the questions a newly hired engineer would ask.

A prompt that begins with “Assume you are a new engineer joining the project and need to understand this PR” is far more useful than “Please evaluate the quality of this code.”

The post also includes a checklist that can be adapted directly:

- [ ] PR summary 一句话能讲清楚干嘛
- [ ] Diff 按文件分组,标注风险等级
- [ ] Tests 是否新增?覆盖率变化?
- [ ] 是否有 backwards-incompatible 变更?
- [ ] Error handling / logging 是否补齐?
- [ ] AI 不确定的地方必须标注 "Not sure"

Editorial Takeaways

The most important aspect of this story is not which AI tool Anthropic uses. It is that Anthropic opened up part of its engineering culture.

Large technology companies often keep their development processes private, fearing imitation, employee recruitment losses, or unfavorable comparisons. Anthropic’s decision to document the Claude Code team’s review workflow, including sample prompts, is unusually transparent for the AI industry. It offers more useful lessons than a standard announcement claiming that AI has “revolutionized” a particular function.

A contrarian observation: when most teams learn to build AI applications, they focus on prompt engineering and Agent orchestration. The real advantage often comes from workflow design. That is what Anthropic documented here.

There is also a limitation worth emphasizing. Anthropic developed this workflow inside the Claude Code team, whose engineering standards, product requirements, and review habits are unusual. Copying it directly into another environment, such as a 10-person SaaS company, may not work. The main lesson is not to copy the prompts verbatim, but to adopt the workflow’s layered structure.

Source: claude.dev/blog/solving-code-review-at-anthropic | HN discussion: news.ycombinator.com/item?id=50122951

Source: https://claude.dev/blog/solving-code-review-at-anthropic/