Tanmay Sah and Dolly Sah demoed UndoBench and EvoUndo for coding agents that touch repos, configs and live deploys, with no attacker needed for the failure on AI Engineer.
Git revert will not save you.
Sah reported 84% success across 2,880 paired trials in clean runs but only 47% recovery when failures were injected, with naive retries duplicating effects in 54% of commit-then-timeout cases like ticket 781.
Retry is safe before mutation and dangerous after it, so the work calls for retry when nothing changed, restore from saved state when you have it, and compensation when an external action already committed.
EvoUndo implements that by capturing a pre-state witness such as timeout 30 before writing 60, then admitting a self-improvement only if capability rises and an independent verifier confirms full restoration.
They reported 478 of 600 self-evolution trials improved capability while 197 of those improvements carried recovery defects, but richer undo operations rescued 180 of 197 and lifted admissible improvements from 281 to 461.
If you ship agents with deploy or database rights you will need that admission check in the pipeline, while local-only code suggestion can ignore it until it touches state you cannot cheaply rebuild.




