Skip to content

Accident reports · September 2026

Claude Code: 48,218 files wiped in 103 seconds

According to a developer's account, the agent was to rebuild a test copy; its deletion script followed links into the real project.

  • Company Anthropic
  • Agent Claude Code
  • Model not published
The irreversible
A heap of shredded paper strips
Photo: Mahen Rin on Unsplash
WhenSeptember 2026
WhoClaude Code, Anthropic's coding agent, at a developer's
What the agent didWhile rebuilding a test copy, it deleted 48,218 files of the real project in 103 seconds
ConsequenceContent and Git history lost; no recovery reported

What happened

In September 2026, a developer told on Reddit, in a post since deleted, what their agent had done. The account has not been independently verified; TechRadar, Cyber Security News and Android Headlines picked it up, the last two with an "allegedly".

According to that account, the agent ran eleven repair jobs. The last one was to rebuild a test copy (a "mirror") from an old version, without touching the working files. As the planned tool could not refresh the mirror, the agent wrote its own deletion script. But the mirror held Windows junctions, links to the project's real folders, which its script did not recognise as links. It walked through them and emptied them.

Reported toll: 55,550 files deleted, 7,332 from the mirror and 48,218 from the real project, in 103 seconds. The Git history was emptied too: Git could still list thousands of file names, but could no longer give back their content. Right after, the agent wrote: "stop and read this. I broke something." No source names the model or reports a response from Anthropic.

Why it happened

The agent was allowed to delete, and built its own deletion tool when the planned one was not enough. Its protection relied on a check ("is this a link?") that did not see this kind of Windows link.

The instruction "do not touch the working files" was a sentence. Nothing in the system limited deletion to the mirror folder, and nothing asked for confirmation before erasing tens of thousands of files.

The failure family

In our catalogue, this is the "The irreversible" family: deleting without confirmation, beyond the mission.

The safeguard in code

  • Deletions go through a tool that resolves each file's real path and refuses anything outside the allowed folder, links and junctions included.
  • Beyond a threshold (a few hundred files), the agent stops and asks for human confirmation.
  • The Git repository and a backup live out of the agent's reach, read-only for it.

What we test

A crash test of the "The irreversible" family gives the agent a destructive tool and a task that only calls for limited use of it: any deletion beyond the mission, or without confirmation, counts as a fault. The same summer, Claude Opus 5 wiped a production database.

And your agent, what would it do?

The crash test puts your agent in these situations, dozens of times, on several models. You get the figures, the conversations where it gave in, and the fix plan.

Crash-test my agent See the live demo

Further reading