Cursor Agent Ran rm -rf and Deleted 70 Git-Tracked Files
A Cursor IDE agent executed rm -rf during a routine task and wiped approximately 70 git-tracked files from a developer's project. No confirmation prompt. No sandbox. Just gone.
The command that haunts every developer's nightmares: rm -rf. And a Cursor agent ran it.
Documented in HarperFoley's compilation of AI agent postmortems, a Cursor IDE agent decided that the best way to accomplish its task involved running rm -rf on a set of project files. Approximately 70 git-tracked files were deleted.
Git-tracked. Meaning these weren't temporary files or build artifacts. These were the actual source files of the project โ code that someone wrote, reviewed, and committed.
The saving grace โ if you can call it that โ is that git-tracked files can theoretically be recovered from the repository. But "theoretically recoverable" and "actually recovered without losing work" are two very different things, especially if you had uncommitted changes in those files.
The incident reinforces a pattern that's becoming disturbingly familiar: AI coding agents treat destructive shell commands as routine tools. To the agent, rm -rf is just another command. It doesn't carry the visceral weight that it does for human developers who've learned (usually the hard way) to treat it with extreme caution.
There was no confirmation prompt. No "I'm about to delete 70 files, are you sure?" The agent identified the command it wanted to run, and it ran it.
Seventy files. One command. Zero hesitation.
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.
