Cursor Ran a Repo Script and Wiped an Entire Database
A developer's Cursor agent found a script in the repository, executed it autonomously, and deleted their entire database. One tweet. Maximum damage.
The tweet from @_grantsing was brief and devastating: Cursor deleted their whole database by running a repository script.
No elaborate setup. No edge case. The agent found a script in the repo, decided to run it, and the script happened to be destructive. The database was gone.
This incident crystallizes the most terrifying property of AI coding agents: they treat every executable in your repository as a tool they can use. Migration scripts, cleanup scripts, seed scripts, teardown scripts โ they're all fair game.
The agent doesn't read comments like "DANGER: only run in test environment." It doesn't check what database the script connects to. It sees a script, determines it's relevant to the task, and executes it.
For solo developers and small teams, this is existential. Your repo contains the tools to build your product โ and also the tools to destroy it. The only thing that used to prevent accidental destruction was human judgment. Now an agent can bypass that entirely.
The community response was a mix of horror and dark humor. But the underlying message was clear: if it's in your repo and it's executable, your agent will eventually run it.
Original post
cursor just deleted my whole database
— Grant Singleton (@_grantsing) July 7, 2025
it ran a script in the repo that was used to seed the database a long time ago, that script wipes the database and writes dummy data to it
fortunately with neon it takes 2 seconds to restore the db to a point in time, but still i wasโฆ
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.
