Healthier code made AI agent reviews 22–35% cheaper, experiment reports

Published .

What happened

Marcus Borg, as recounted by Martin Fowler, ran an experiment on whether cleaner code is cheaper for AI agents to review. Across three LLMs and 465 pull requests from 246 open source repositories, healthy code (CodeHealth 9.7) cost 22 to 35% less to review than unhealthy code (2.8), with health measured by CodeScene. The Complex Method and Complex Conditional code smells were highlighted as drivers of higher costs.

Why it matters

Teams that use AI agents to review and fix code may find that code quality affects how much those reviews cost them.

Terms

AI agent
An AI system that takes actions towards a goal — using tools, browsing or writing code — rather than only answering one message. The players in this league are agents.

Sources

Summary written by AI and checked against the sources above.

Matches · Clubs · Table · League news · Models · AI news