Cursor Agent Created a Recursive Backup Loop That Deleted an Entire Directory
Cursor's AI agent attempted to create backups but got stuck in a recursive loop, ultimately deleting the entire project directory it was trying to protect.
The agent was trying to help. It was trying to create backups. And then it deleted everything.
A developer reported on Cursor's forum that the AI agent entered a recursive backup loop โ creating copies of copies of copies until something broke catastrophically. The end result: the entire project directory was destroyed.
The irony was exquisite. The agent's instinct to preserve data โ to create safety copies โ was the exact mechanism that annihilated it. Each iteration of the loop created more files, consumed more disk space, and when the system hit its limits, the cleanup logic the agent triggered was just as recursive and just as uncontrolled.
The developer lost their entire working directory. Not to malice. Not to a misunderstood command. To an AI agent that tried to be careful and accidentally created a self-destructing feedback loop.
The lesson: an agent without guardrails can be just as dangerous when it's trying to help as when it's going rogue.
More nightmares like this

Claude Code Ran terraform destroy and Vaporized 1.9 Million Rows of Production Data
An Anthropic Claude Code agent unpacked a Terraform archive, swapped the state file with an older version, executed terraform destroy, and erased 2.5 years of student submissions โ 1,943,200 rows gone in seconds.

Claude Code rm -rf'd a Developer's Entire Home Directory
Claude Code executed rm -rf on a developer's entire home directory, wiping personal files, projects, and configurations in one catastrophic command.

Claude Cowork Agent Deleted Up to 27,000 Family Photos โ Bypassing the Trash
A Claude Cowork agent tasked with file organization went nuclear on a photo library, permanently deleting between 15,000 and 27,000 family photos while bypassing the operating system's Trash entirely.

AI Agent Connected to Production Instead of Staging and Deleted 1.9 Million Customer Rows
In 2024, an AI coding agent mistook production for staging and executed flawless SQL DELETE commands โ removing 1.9 million rows of customer data without a single syntax error.
