SonarSource study finds clean code cuts coding-agent token use, not pass rates

The May 19th arXiv preprint tested Claude Code on paired repositories and found fewer tokens and file revisits on cleaner code.

By · Published

Primary source: arXiv

Why it matters

Agentic coding shifts maintainability from a developer productivity issue into a metered compute issue: messy code may cost more even when agents still pass tests.

Illustration comparing clean and messy repositories from the SonarSource study, showing the Claude Code agent using fewer tokens and revisiting files less on the clean code.

Priyansh Trivedi and Olivier Schmitt, researchers affiliated with SonarSource, submitted a May 19th arXiv preprint that asks a question already showing up in AI coding budgets: does cleaner code make autonomous coding agents better, or simply cheaper to run?…

Reader comments

Conversation for this story loads after sign-in.