TechBroz · techbroz.com35 incidents on record · updated as they happen
← Hall of Shame

Rank #18 of 35·Data loss·21 Oct 2025·Claude Code

Claude Code's 'rm -rf tests/ patches/ plan/ ~/' deletes a developer's home directory

Generic terminal screen.
Generic terminal screen. Photo: Jason Scott, CC BY 2.0, via Wikimedia Commons; cropped, text overlaid.

“One trailing slash. Years of work. Slash and burn.”

Incident reportData lossmacOS
Agent / toolClaude Code
CompanyAnthropic
DamageEntire home folder
Time to detectSeconds (machine unusable)
StatusNo recovery reported
Chaos8.0 / 10
  • Asked to tidy an old repo, Claude Code built an rm -rf for three folders
  • It appended ~/, which expands to the user's home folder
  • Similar GitHub reports show the same failure in other forms

Two characters at the end of one command were all it took to erase a developer's whole Mac.

What happened

On 8 December 2025, a Reddit user said they had asked Claude Code to tidy up an old repo. The agent built a delete command for three project folders and tacked ~/ on the end. On a Mac, ~/ means your entire home folder, so the command recursively deleted everything in it.

The damage

Desktop, documents, app data, keys and config all disappeared in seconds. The post, titled "Claude CLI deleted my entire home directory! Wiped my whole mac," passed 1,500 upvotes and was shared widely. Docker's write-up links it to similar GitHub reports: in one, an agent deleted from the root of a Linux system, and in another an unquoted ~ expanded to the real home folder.

How it was caught, and what happened next

Simon Willison shared the post on X, and Japan's Gigazine covered it on 16 December. It wasn't a one-off. In October, developer Mike Wolak filed GitHub issue #10077 after Claude Code ran an rm -rf from the root on Ubuntu/WSL2, even though he hadn't used the skip-permissions flag. On 28 November, issue #12637 described an agent that had made a folder literally named ~, then deleted the real home folder while cleaning it up.

Lesson for builders

Run agents in a sandbox scoped to the project, so a bad command can only damage the workspace.

More chaos