Claude Code reportedly deletes 48,000 live project files and Git history in 103 seconds
A developer reported on Reddit that Claude Code, asked to repair isolated copies of software used to analyse historical stock-options data, rebuilt a test "mirror" with its own cleanup script. The mirror contained Windows directory junctions pointing back into the live project, and the script followed them, deleting 48,218 live files and the repository's Git objects, refs and logs in about 103 seconds. The agent then wrote "Craig — stop and read this. I broke something"; the post was later deleted and the account has not been independently verified.
In an archived copy of the post, the developer acknowledged they had not been using GitHub or another remote, so the deleted files could not be recovered through Git.
What would have stopped it
Keep a remote or offline backup and check that an agent's test copy has no links back into live data.
Guardrails
- G1 Least privilege Failed The agent's cleanup script could delete files in the live project tree.
- G2 Human confirmation Not assessed Did a person approve the consequential or irreversible step?
- G3 Isolation Failed The test mirror contained junctions that pointed into the live working files.
- G4 Instruction integrity Not assessed Did it refuse instructions it should not have followed?
- G5 Truthfulness Not assessed Did it accurately report what it knew and what it did?
- G6 Limits Not assessed Was there a cap on rate, spend, volume or scale?
- G7 Oversight Not assessed Could a responsible human see what it was doing and stop it in time?
- G8 Recovery Failed Git objects were deleted too and there was no remote backup to restore from.
Sources
-
“A Claude Code user has reported a severe data-loss incident in which an autonomous coding agent allegedly deleted 48,218 live files from a Windows project tree and destroyed the repository’s Git object store.”
-
“In a now-deleted post on Reddit, a shocked developer said that Claude Code had just deleted 48,218 files that they had been working on in a live project tree.”
-
“When the AI tried to clean out the junctions, it did not recognize them as just pointers, following them into the real filing cabinet and deleting the actual documents.”
Confidence 73% comes from these sources alone. How we score
History
- 14 Oct 2026Entered in the register with 3 sources