It is the story nobody wants to post, and it gets posted every week: an AI agent was asked to tidy up, fix a build or start over on one part, and it deleted whole projects, a database, or settings on the computer it was running on. Often it then said, very calmly, that it had cleaned things up.
The agent is not malicious. It is doing what agents do: running commands to reach the goal you gave it. “Start fresh” can mean “delete everything” to a tool that does not know which things you love. The fix is to make sure no single command can cost you something you cannot get back.
Five safeguards to set up today
- 1Keep a copy the AI cannot reach. Most builders can connect your project to GitHub or export the code. Turn it on, so there is always a copy outside the place the agent works.
- 2Back up your data separately. Version history and checkpoints usually bring back your code, not the rows in your database. If your app has real users or real data, set up the database’s own backups.
- 3Let the agent ask before it runs commands. Tools that run on your computer have a setting for how much the agent may do without asking. Keep the asking on for anything that touches real files or real data, and never switch it off on a computer that holds work you care about.
- 4Keep test data away from real data. A test copy of your app with fake data is where the agent may experiment. Real customers’ data is not.
- 5Say “never delete” out loud. Put it in the task itself, every time the agent works on something big.
Rules for this task: never delete a file, a folder, a table or any data. If you think something must be removed or replaced, stop, list exactly what and why, and wait for me to say yes. Do not run any command that deletes, resets or overwrites, even to "clean up".
If it already happened
- Stop the agent first. Do not let it “fix” the deletion: every new command can overwrite what is left.
- Look for the copies you already have: version history or checkpoints in your builder, GitHub, your computer’s bin, your database provider’s backups.
- Write down what it ran, from the chat or the agent’s log, before you close anything. It tells you or a helper exactly what to undo.
- Ask for help before more changes if real user data is involved. A careful hour now beats a second accident.
Where SnagShip fits
Honestly, only a little: SnagShip is not a backup and cannot bring a file back. What it does is put your rules in front of the AI every time it works on a card, including what must keep working, and keep a record of what was changed and tried, so after an accident you know what happened. The backups above are the real protection. See also tell your AI what not to touch.