# What Anthropic’s 90% agent-written codebase reveals about breaking review loops in AI agents — retained record

> Retained reddit record from reddit:AI_Agents.

Canonical: https://highsignal.app/data/records/82cbeb4b7ffadedb

[← sources](https://highsignal.app/data)


source: [reddit](https://highsignal.app/data/reddit) (reddit:AI_Agents)  published 2026-10-17 17:46 ingested 2026-10-18 02:37

[original source ↗](https://www.reddit.com/r/AI_Agents/comments/1x8gfxl/what_anthropics_90_agentwritten_codebase_reveals/)

## retained text



```
Letting an AI coding agent generate code is easy; preventing an automated review

loop from spiraling into fifty turns of pedantic nitpicking is where the real engineering

begins. Anthropic's breakdown of how Claude writes ninety percent of Claude Code's

own repository highlights three architectural constraints every builder deploying

coding agents needs to implement.



When you scale code generation past toy prototypes, three specific guardrails keep

velocity from collapsing:

● Fresh-context review agents: The agent reviewing a pull request must never

share the execution history of the agent that wrote the patch. Spawning a fresh

context window to evaluate the isolated diff prevents prompt priming and

eliminates self-confirmation bias.

● Hard iteration caps: Autonomous agent-on-agent review loops suffer severe

diminishing returns. Capping automated review passes at three rounds forces

the generator to address substantive architectural issues up front rather than

cycling endlessly on formatting.

● Risk-tiered approval gating: Zero-human auto-merges only work when

changes pass strict classifiers. Low-risk documentation or test updates can

merge automatically, while core schema and permission changes route directly

to human reviewers.

Most teams building internal coding agents assume the bottleneck is model

intelligence. In practice, the bottleneck is pipeline design: running parallel linters

before LLM inspection, voting across multiple reviewer calls, and treating automated

code generation as an asynchronous queue rather than a live conversational session.



For teams running autonomous coding agents in production repositories, what

thresholds or heuristics are you using to decide when a PR requires human eyes?

TL;DR: Scaling agent-generated code requires fresh-context reviewer agents, hard

iteration caps, and risk-classified human approval gates.
```



document fetched 2026-10-18 00:19 · canonical https://reddit.com/r/AI_Agents/comments/1x8gfxl/what_anthropics_90_agentwritten_codebase_reveals
