← News

Agents & MCPSources: arXiv · 2 Dec 2026

Researchers propose measuring "code slop" left behind by coding agents

An arXiv paper argues agent evaluations should track the maintainability of generated code, not just task completion, and finds monitor-triggered cleanup cuts slop most efficiently.

In plain words

Coding agents are usually judged only on whether they finish a task, not on the messy code they leave for humans. The paper's authors define "code slop" as unnecessary code volume, complexity, and maintenance debt beyond what a task needs. They tested cleanup strategies and found one triggered by a monitor reduced slop most while costing about 25% less than the best fixed schedule.

What was announced

The authors, writing on arXiv, define code slop as unnecessary code volume, control-flow complexity, and maintainability debt beyond task requirements, and measure it as changes in three static-analysis metrics across an agent's trajectory. Their evaluation spanned 2,268 runs over 42 SWE-EVO tasks, three coding models, three seeds, and six cleanup settings. Functional utility stayed in a narrow 70-76% band, yet code-volume deltas ranged from -14.3 to -79.3 across policies, with large differences in complexity and debt.

On remedies, a single final cleanup pass barely reduced slop. Periodic in-trajectory cleanup helped but was costly and needed a fixed cadence. A monitor-triggered policy gave the largest reduction on all three metrics at roughly 25% lower cost than the strongest periodic schedule, and the effect held across most runs rather than a few outliers. Gains were largest for weaker models; the strongest model already wrote compact code and changed little. The authors conclude that agents should be judged on maintainability as well as task completion.

What it does not show

  • Evidence is limited to the paper's abstract; full methods, baselines, and caveats are not available for verification.
  • The reported gains come from the authors' own benchmark setup and have not been independently confirmed.
  • The abstract does not specify which models or tasks drive the weakest results, nor how the monitor policy is implemented.

Sources

Source-support review completed 5 Dec 2026. This story was drafted with AI assistance and checked against retained source passages. Automated checking is not independent verification.

Coverage: arXiv: abstract.

Updates and corrections

No corrections so far.

First published 5 Dec 2026

New to the subject? AI from the Ground Up starts from the beginning.