← In the News

Models systematically avoid deleting code, and the tests that pass them do not check

To Add Is Machine, To Delete Is Human: Measuring and Mitigating Deletion Avoidance in LLM Code Editing · Amir M. Ebrahimi, Mohammed Mehedi Hasan, Aaditya Bhatia, Gopi Krishnan Rajbahadur, Ahmed E. Hassan · arXiv:2607.28887v1 [cs.SE], 30 July 2026

Machine-readable Download Markdown

This item is written from the paper's abstract. The body is unread by this edition. On that basis: the authors name "deletion avoidance, the systematic tendency to retain code that an intended edit requires removing." Across the five leading models on the SWE-bench Verified leaderboard, deletion recall against the developer patch reaches at most 71.7 percent even on tasks all five solve, and models find the right file for over 92 percent of required deletions while cutting the exact line in under 52 percent of cases. Instead, they report, "29.0% of passing patches wrap the targeted code in a guard or fallback, a pattern we call Guard-and-Go." Retrofitting 34 Verified tasks with tests that fail if the targeted code remains drops four frontier models from 63.2 to 41.9 percent. A new 200-task benchmark, CanItDelete, is mined from commits whose entire required edit is a deletion; the best model still fails one in five.

Why it matters: If it holds up on a full read, this is a verification-loop finding before it is a model finding. A green suite is being read as "the edit was made" when it only establishes "the new behaviour works." Anyone running agents against a test oracle has a concrete thing to add: an assertion that the removed thing is gone. Affiliations are not on the abstract page and this edition did not establish them.