Agent Horror Stories

Viewer discretion advised ยท Updated nightly

โ† Back to the feed
Curateddata lossยท

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.

Horrifying

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