A new study by Priyansh Trivedi and Olivier Schmitt from SonarSource, published on arXiv, examines how the cleanliness of code affects autonomous coding agents. The research, submitted in May 2026, investigates whether structural and stylistic quality of code influences an agent's ability to navigate and modify it, beyond just task completion rates.
The study uses a controlled minimal-pair methodology to isolate the effect of code cleanliness from the capabilities of the coding agents themselves. By comparing agents' performance on clean versus less clean codebases, the researchers measured how code quality impacts the agents' effectiveness in completing programming tasks. This approach allowed them to pinpoint cleanliness as a significant factor in agent success.
This research is important as autonomous coding agents are increasingly adopted in software development, yet prior evaluations focused mainly on whether agents could complete tasks without considering code quality. The findings highlight that cleaner codebases improve agent performance, suggesting that maintaining high code standards benefits both human and AI collaborators. This insight could influence how development teams prepare code for AI-assisted programming.
The full paper, titled "Does Code Cleanliness Affect Coding Agents? A Controlled Minimal-Pair Study," is available on arXiv under the identifier 2605.20049. It provides detailed experimental results and analysis on the relationship between code cleanliness and autonomous coding agent performance.