Definition
Deletion avoidance is a documented failure mode in which code-generating models are reluctant to actually remove code, even when a prompt explicitly asks them to delete a function, dead branch, or unused block. Instead of producing a clean diff, models tend to leave the offending code in place, comment it out, or make superficial edits around it, suggesting an inductive bias toward preserving prior output rather than performing the requested edit. It matters because it undermines trust in agentic coding tools for refactoring and cleanup tasks, where correct behavior is defined by what disappears from the codebase, not just what gets added.