August 21, 2025
The day Claude deleted my project file
Three weeks into building HomelabARR, my AI coding partner ran a destructive git command without a dry run and wiped my project config. Here is what I lost, how I got it back, and the guardrails I put in afterward.
10,475 pending changes

It started with VS Code showing 10,475 pending git changes. That number is not a typo. I had a backup directory nested inside the repo, .claude/Working Backup From 8.19.2025/, and the nested files had paths long enough to break Windows's filename limits. Git couldn't process them, VS Code couldn't display them, and the whole source control panel was unusable.
I asked Claude to clean it up. I already had a zip of the backup, so the directory could go. Remove the backup folder, get git back to a working state, a simple task.
11:40 AM
Claude ran git clean -fd.
Not git clean -fdn, the dry run. Not "here's what I'm about to delete, does this look right?" Just the live command, the one that deletes everything untracked without asking.
The pending changes dropped from 10,475 to 388 to 0. Clean repo. And CLAUDE.md was gone with it.
CLAUDE.md is the project config file. It holds every instruction Claude needs to work on the codebase: architecture decisions, file locations, coding standards, safety rules. Three weeks of accumulated context about how the project works and how I want it built. It is the most important file in the repo, because without it Claude starts from zero every session.
The recovery
I caught it immediately, and not because I was monitoring file changes. CLAUDE.md was pinned in my editor and the tab went blank. "Wait we need to get that claude md back immediately."
Restored from git history in thirty seconds.
Then I found the second problem. My 18 agent configuration files, the specialized agents that handle different kinds of tasks, had been swapped back to old versions during the cleanup. The consolidated files I'd spent a day building were gone, reverted to whatever was in the last commit. I had to pull the correct versions from a manual backup I kept on my desktop, outside the repo.
Total recovery time was about thirty minutes. Total data loss was none, because I had git history and an external backup. My trust in AI-automated cleanup commands afterward was zero.
What I did next
I made CLAUDE.md read-only. Windows attrib flags on the file and on the whole .claude folder. Now if Claude wants to change its own config, it has to ask me to clear the read-only flag first, and the friction is deliberate.
Then I wrote a rule: a dry run before any destructive command. git clean -fdn before git clean -fd, every time, no exceptions. Show me what is about to be deleted and wait for confirmation.
Then I wrote an RCA. A real root cause analysis, the same format I used for production incidents back when I was managing twelve Scrum teams at Neptune. Timeline, impact, root cause, contributing factors, action items. I filed it in Confluence with the rest of my project docs, because that is what you do when something breaks. You write it down so it doesn't break the same way twice.
Writing a formal RCA for an incident my AI partner caused on a solo project feels absurd, and it also feels right. The habits I built running enterprise incidents are the same habits that keep this project from losing work.
What I'm learning
Working with Claude feels less like pair programming and more like managing a very fast junior dev who never gets tired and never hesitates. The speed is the whole point, and it is also the risk. Claude will do exactly what you ask, including the part where it deletes the thing you need, and it will do it instantly and with full confidence.
So the hesitation has to come from me. The dry run, the "wait, show me what you're about to do," the read-only flag on the file I can't afford to lose. Three weeks in and I'm already building safety scaffolding around a tool that doesn't know it needs any.
Read-only flags on critical files. A mandatory dry run before anything destructive. Explicit confirmation before a delete. Backups that live outside the repo. None of this is paranoia. It is the stuff you build the first time your own tools destroy something.
I recovered in thirty minutes because I had backups. I won't always be that lucky. There will be a next time, and the guardrails I'm putting in today are what catch it when it comes.