Evaluating Code Slop in Long-Horizon Coding Agents
Coding-agent evaluations typically measure whether an agent solves a task and ignore the code it leaves for humans to review and maintain. We call unnecessary code volume, control-flow complexity, and maintainability debt beyond task requirements code slop, and operationalize it as trajectory-induced changes in three static-analysis metrics. Across a 2,268-run evaluation covering 42 SWE-EVO tasks, three coding models, three seeds, and six cleanup settings, we measure functional outcomes alongside code slop. Aggregate functional utility stays within a narrow band (70-76%), yet code-volume deltas range from -14.3 to -79.3 across policies, with substantial differences in complexity and debt. A single final cleanup pass barely reduces slop. Periodic in-trajectory cleanup reduces slop but is costly and requires a fixed cadence, whereas a monitor-triggered policy gives the largest reduction on all three slop metrics and costs about 25% less than the strongest periodic schedule. The reduction holds across most runs and does not depend on a few outliers. It is largest for weaker models; the strongest model already writes compact code and changes little. We therefore argue that coding…
- arXiv
- 2612.01914
- Authors
- Shubham Gandhi, Shyam Agarwal, Nachiket Kotalwar, Atharva Naik
- Categories
- cs.SE · cs.AI