AI & Tech··1 sources verified
Study Finds Healthier Code Cuts AI Review Token Costs by 22-35%
Summarised by Relevant News AI · Read time: 3 min
An experiment reported by Martin Fowler tested whether cleaner code is cheaper for AI agents to review. Across three LLMs, 465 pull requests from 246 open source repositories went through a five-agent review and fix pipeline, using CodeScene's CodeHealth scores. Typical unhealthy pull requests (score 2.8) cost 22-35% more to process than healthy ones (score 9.7), and Complex Method and Complex Conditional smells were the costliest.
Why it matters: Teams running LLM code review or agentic coding pipelines can reduce token spend by fixing complex methods and conditionals before review, not only after.
All sources