Most teams think of AI code review as something that happens after a PR is opened.
That's too late.
The Claude Code team at Anthropic does something I think more teams should straight up steal:
- Claudey A (my pet name for Claude) writes the plan.
- Claudey B reviews it as a "staff engineer" — skeptical, looking for edge cases, questioning assumptions.
Two agents. Different roles. The writer doesn't review its own work.
Think about why this matters. When you let the same agent that wrote the code also validate it, you're literally asking the student to grade their own test. Of course it looks correct — it was designed to look correct.
📝 The key insight that changed how I work: When it's time to review, I kill my session and start a brand new one — fresh context window, zero contamination from the implementation. It's like getting a second opinion from a completely different engineer. Issues that used to show up days later in PR review now get caught before a PR even exists.
Layer it: AI review during dev. AI review at the PR level via CI. Humans for judgment calls.
Don't let the agent grade its own homework, unless you're spidey. 🕷️
Related: Stop Reading Every Line of Code → — the full essay on rethinking code review for the AI era.
Top comments (1)
This is the right instinct, and I'd push it one floor lower. Killing the session decorrelates the context, but Claudey B is still Claude. Two instances of the same model share priors, so they share blind spots. Fresh-context review beats self-grading, no question. But it's the same student in a different room, not a different examiner. The misses that survive are the ones baked into the model, and a second instance is most likely to wave those through.
The teeth come from a verifier the writer can't influence: a held-out test it never saw, CI throwing adversarial inputs, prod. "Different role, same weights" catches sloppiness. "Different role, exogenous check" catches the confident-and-wrong cases. Layering AI-in-dev → AI-on-PR → human is good precisely because each layer is less correlated with the writer than the last. Worth naming that axis directly: review value scales with how independent the reviewer is from the author, not just how fresh its context.