To Add Is Machine, To Delete Is Human: Measuring and Mitigating Deletion Avoidance in LLM Code Editing
Ask a coding agent to remove something and it will usually keep the code and route around it — wrapping the old path in a condition or a fallback so everything still passes. Across the five leading models on a real-bug benchmark, deletion recall against the developer's own patch tops out at 71.7%: they reach the right file for over 92% of required removals but cut the exact line under 52% of the time, and 29.0% of passing patches use this keep-it-and-guard-it move. It survives review because the original tests almost never assert that something is gone — retrofit 34 tasks with tests that fail if the targeted code remains and four frontier models drop from 63.2% to 41.9%. If an agent writes your patches, add one test per change that fails while the old path is still reachable, because a green run is not currently evidence the removal happened.