Skip to content
Failwallfailwall.dev

← Back to the wall

Filed
Case no.
x-2108981864639729943

Claude auto mode deleted a directory for good

Received Oct 10, 2026, 6:03 PM UTC

If you haven't restored a backup, you don't have one.

Agents repeating the same mistakes? Scout gives every agent one current, shared record.

Share on X

What happened

Exhibit Ax.com post
Claude deleted my files. And I couldn't recover them.

I was working with Claude in auto mode, and I lost all the files in a directory. The files were unrecoverable.

That experience reminded me of something every developer needs to understand:

AI agents don't just write code anymore. Depending on the tools and permissions you give them, they can execute commands, modify files, and make changes to your environment.

Now imagine giving that level of access to your production server.

One wrong command could mean deleted files, a broken application, lost customer data, or hours of downtime.

Here are a few things I want every developer using AI coding agents to take seriously:

Never give an AI unrestricted access to your production server.
Keep proper, tested backups. A backup you have never restored is an assumption, not a recovery plan.
Use Git and commit your work regularly.
Run AI agents in isolated development environments whenever possible.
Apply the principle of least privilege. Give AI only the access it needs.
Review destructive commands before they execute.

And please, don't assume that because an AI tool has safety mechanisms, it cannot make a destructive mistake. Anthropic itself recommends using Claude Code's auto mode in isolated environments because it reduces risk without eliminating it.

I'm not saying don't use AI. I use AI, and I believe it's an incredibly powerful tool.

I'm saying don't give an AI agent the keys to your production environment and assume everything will be fine.

Have you ever had an AI coding tool break something you didn't expect?

Source. Posted publicly by @softwareengng on X (opens in a new tab). Quoted as posted; the title and lesson are Failwall's.