AI Pays a Tax on Bad Code: Generating Tests for 25K Files Costs 35-45% More Tokens
blaizedsouza · x · 2026-11-05
An experiment by CodeScene's research team: a model generated tests for 25,000 files across C++, Java and Python, and needed 35-45% more tokens to complete the same work on lower-quality code — what the author calls "a tax on bad code."
The article, titled "Let the Agents Take the Night Shift," argues that AI coding cost is directly tied to code quality: bad code slows down human developers and inflates AI token spend alike, and autonomous agents are well suited to take over batch-style development work overnight, freeing daytime for humans.
More from coding & agent
- Spring creator Rod Johnson launches Embabel Worlds, an AI platform that auto-builds knowledge graphs — springrod · 2026-11-05
- Full walkthrough: editing videos with Claude Code and Opus 5.5 — aakashgupta · 2026-11-05
- Claude Code can now edit your videos with a single command — aakashgupta · 2026-11-05
- Weaviate Podcast: Forgetting Is the Key to Scaling Agent Discovery, With Berkeley's Shangyin Tan — CShorten30 · 2026-11-05
- Dots Team Recruits to Build Out Persistent Agents — sherwinwu · 2026-11-05
- Managing agent workstreams as infrastructure-as-code in production — JoshPurtell · 2026-11-05