Paper Reveals LLMs Avoid Code Deletion, Increasing Maintenance Costs
centre-for-swe · hf · 2026-08-05
A study on the top five models on the SWE-bench leaderboard reveals a significant "deletion avoidance" tendency when LLMs repair code. Even when the correct file is identified, models often hesitate to remove obsolete code, instead wrapping it in guards or fallbacks (a pattern termed Guard-and-Go).
The researchers curated CanItDelete, a benchmark specifically for deletion tasks. Results show that if tests strictly require the targeted code to be removed, the pass rate of frontier models drops sharply from 63.2% to 41.9%. The study suggests that explicitly teaching models "how to delete" during post-training can mitigate this issue and improve overall code-editing performance.
More from coding & agent
- Agent Search Workflow for Obsidian: Semantic Meets Keyword — dSebastien · 2026-08-05
- NeurIPS 2026 Call for Papers: Focus on Responsible Meta-Agents — RobertTLange · 2026-08-05
- Spring Evals: Benchmarking LLMs on Real-World Spring Boot 4 Code with Hidden Tests — therealdanvega · 2026-08-05
- Navigating SAP's Agent Architecture: MCP for Tool Execution, A2A for Orchestration — SillyDot3305 · 2026-08-05
- YC's Multiplayer Agent Harness: Great Decoupled Architecture, But It Kills KV Cache — Instance_Not_Found · 2026-08-05
- The 'oh-my' Configuration Trend in Open-Source Coding Agents — HarveenChadha · 2026-08-05