A benchmark built from real deletions

Coding agents are measured almost entirely on what they can add. A new benchmark called RepoClean measures the opposite: whether an agent can safely take code out of a repository that no longer needs it.

The construction is neat. The authors took 34 popular open-source Python repositories and automatically reintroduced code that had been deleted somewhere in the project’s real history, putting it back into a newer version while keeping the current implementations in place. They kept the cases where previously passing tests then failed. That gives 200 tasks in which an agent must work out, from the repository’s interfaces and cross-file dependencies, which historical code to remove and which implementation to preserve — without writing any new functionality.

Bales of compressed cardboard and paper stacked at a recycling yard
The benchmark reinstates code deleted in a repository's real history and asks the agent to find it. Alex Fu · pexels · Pexels License

Seven models, one result

Seven models were evaluated. The best of them, GPT-6 Astra, resolved 23% of the tasks. The paper does not report the rest of the table in its abstract, but the headline number is the ceiling, not the average.

The second finding is arguably the more useful one for anyone running agents on a live codebase: the authors report that agents remove substantially less obsolete code when cleanup is not explicitly requested. An agent asked to fix a bug will fix the bug and leave the dead branches where they are.

Why removal is harder than addition

Adding code is a local act with a clear success signal: the new test passes. Removing code is a global one. To delete safely an agent has to know what else reaches into the thing it is deleting, which means reading across files rather than within one, and it has to distinguish between two implementations of the same behaviour where only one is current.

The failure mode is also asymmetric. A redundant addition is waste; a wrong deletion is an outage. An agent that is uncertain has every incentive to leave the code alone, which is exactly the behaviour the second finding describes.

Wooden spools of steel wire rope stacked against a shutter
Agents removed substantially less obsolete code when cleanup was not explicitly requested. Andrew Durkin · pexels · Pexels License

What it means for maintenance

The practical reading is that the current generation of coding agents makes repositories bigger. They are competent at the part of software maintenance that adds lines and weak at the part that removes them, and left to their own judgement they do not volunteer for the second.

That matters because obsolete code is not inert. It raises the cost of every future change, and the paper notes it can introduce functional problems of its own. A benchmark that isolates cleanup gives model developers something to optimise against, which is the point of releasing one. The number to watch is whether 23% moves, and whether agents start proposing deletions without being told to.