Does Code Cleanliness Affect Coding Agents? A Controlled Minimal-Pair Study
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
As autonomous coding agents see rapid adoption, their evaluation has primarily focused on task completion rates holding the target codebase fixed. This leaves a critical question unanswered: does the structural and stylistic quality, or ``cleanliness'' of the underlying code affect an agent's ability to navigate and modify it? To isolate the effect of code cleanliness from agent capability, we introduce an evaluation protocol built around minimal pairs: repositories that match on architecture, dependencies, and external behaviour, but differ on static-analysis rule violations and cognitive complexity. The pairs are constructed in both directions, by agent pipelines that either degrade a clean repository or clean a messy one. We author 33 tasks across six such pairs, evaluated through hidden tests at the application's public surface. Across 660 trials with Claude Code, code cleanliness does not change the agent's pass rate. However, it substantially alters the agent's operational footprint: agents working on cleaner code use 7 to 8% fewer tokens and reduce file revisitations by 34%. Our findings suggest that traditional maintainability principles remain highly relevant in the era of AI-driven development, shaping the computational cost and navigational efficiency of coding agents. Code cleanliness joins model choice, harness, and prompting as a factor that materially affects agent behaviours.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 10 of its 15 references that are in the map. First posted on arXiv 19 May 2026.
Builds on
10 of 15 references.
Closest ancestors · 5
Same direction, newest first
- 2026SlopCodeBench: Benchmarking How Coding Agents Degrade Over Long-Horizon Iterative Tasks25 Mar
- 2026Agentic Much? Adoption of Coding Agents on GitHub26 Jan
- 2026Tokenomics: Quantifying Where Tokens Are Used in Agentic Software Engineering20 Jan
- 2025SWE-Effi: Re-Evaluating Software AI Agent System Effectiveness Under Resource Constraints11 Sep
- 2023ChatDev: Communicative Agents for Software Development16 Jul
Other references · 5
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
- 2026How Do AI Agents Spend Your Money? Analyzing and Predicting Token Consumption in Agentic Coding Taskscited by 28
- 2025When Names Disappear: Revealing What LLMs Actually Understand About Codecited by 4
- 2025Measuring how changes in code readability attributes affect code quality evaluation by Large Language Modelscited by 1
Built on by
Citing papers per year: 2026: 1.
1 paper.
- 2026Can Agents Design Libraries for Agents?cited by 0
- 2026Can Agents Design Libraries for Agents?29 Sep 2026
Similar, not cited
Close in wording, no citation either way
- 2026Is Agent Code Less Maintainable Than Human Code?
- 2026SWE-Touch: Benchmarking Coding Agents When Users Touch the Code
- 2026Are We All Using Agents the Same Way? An Empirical Study of Core and Peripheral Developers Use of Coding Agents
- 2026The End of Code Review: Coding Agents Supersede Human Inspection
- 2026Compact Documentation for Coding Agents: A Benchmark, an Optimizer, and Why It Does Not Transfer
- 2026TRIM: Reducing AI-Generated CodeSlop via Agent Trajectory Minimization
- 2026From Agent Behaviour to Agent-Friendly Documentation: An Empirical Study of How Coding Agents Discover, Read, and Write Technical Documentation
- 2025Agent READMEs: An Empirical Study of Context Files for Agentic Coding