The infinite loop between coding agents and AI reviewers is costing engineering teams real money in CI time and missed bugs. A new analysis from the Anthropic Claude Code team reveals that 8.9% of internal pull requests required five or more review rounds before stopping, with one outlier running for over fifty rounds overnight. The root cause? The agents treat every comment as an instruction, fixing style nits and pre-existing issues that have nothing to do with the current change.
The Flaky Test Analogy
The article draws a sharp parallel to "retry until green" strategies in flaky test suites. When a job stops at the first green run, noise decides when it ends, and a single pass proves little. Similarly, an agent and reviewer loop stops at the first review with nothing to fix. This approach is dangerous because a single clean review is weak evidence when the reviewer misses half the bugs on any one pass. The data shows that 59% of what reviewers flagged in later rounds was code that existed before the change.
The Two-Clean-Pass Gate
The proposed fix requires a fundamental shift in how blocking findings are defined. Only new, important findings on lines the pull request actually changed should block the merge. The loop must stop only after two consecutive clean reviews, not one. In simulations, this gate cut agent fix rounds from 2.07 to 1.01 per pull request, eliminating the five-round tail entirely. Crucially, bug escape rates remained stable at 13.1%, proving that the extra rounds in the noisy loop were merely accidental second looks, not valuable safety nets.
Implementation for Zero-Cool Ops
Implementing this requires three specific roles: configuring the reviewer to tag only important findings, setting up a CI gate that tracks clean passes and fix rounds, and instructing the agent to ignore nits and pre-existing issues. The gate logic must deduplicate findings by file, line, and rule to prevent the same issue from restarting the loop. If the fix rounds exceed three, the pull request must escalate to a human. Without explicit instructions in files like CLAUDE.md, agents will continue to fix nits, wasting commits and CI cycles on cosmetic changes.
Key Takeaways
- 8.9% of Claude Code internal PRs hit five or more review rounds due to inefficient stop rules.
- 59% of reviewer flags in later rounds were pre-existing code, not new bugs.
- Requiring two clean passes reduces fix rounds by 50% without increasing bug escapes.
- Agents must be explicitly instructed to ignore 'Nit' and 'Pre-existing' findings to break the loop.
The Bottom Line
Stop treating every AI reviewer comment as a command. By filtering out nits and pre-existing code and requiring two clean passes, you can cut CI waste in half without letting more bugs slip through the cracks.