660 Claude Code trials. Clean vs messy codebase. Same pass rate. But clean code → 8% fewer tokens, 34% fewer file revisits. The AI was burning tokens wading through junk. youtu.be/3dLE7tFoG4o
"Researchers at SonarSource just ran 660 trials with Claude Cote to answer one question, does clean code actually help AI agents do their job? They built 6 pairs of identical code bases. One clean, one messy, same architecture, same behavior, same 33 tasks on both. The result? Clean code did not improve the pass rate. Messy code got the exact same results. But here's what did change. Clean code capped token usage by 8% and file revisitations by 34%. The AI wasn't smarter. It was burning tokens wading through junk. For anyone building with agents, cleaner code means smaller builds for the same output. Model matters, prompt matters, and now the study proves your code base matters too. Your AI agents are only as efficient as the code they're working in. Free community at andrewdarias.com slash school."
💬 Discussion
660 Claude Code trials. Clean vs messy codebase. Same pass rate. But clean code → 8% fewer tokens, 34% fewer file revisits. The AI was burning tokens wading through junk. youtu.be/3dLE7tFoG4o