TechBroz · techbroz.com46 incidents on record · updated as they happen
← Today in agent chaos

Agent chaosAs reported·31 Oct 2026

A developer shares Claude Code admitting its test ran against their real home folder and its cleanup deleted nearly all of ~/.claude

As reported One person’s public account. We couldn’t independently confirm it, and we’ll update this if the facts change.

A developer shared a screenshot of Claude Code saying a test ran against their real home folder because a HOME switch was skipped, so its cleanup ran rm -rf on ~/.claude.

This is one person's account on X, not independently confirmed. It's a single post with a screenshot of the agent's own messages, shared on 31 October 2026, and we haven't seen a bug report or any reply from Anthropic.

What happened

According to the screenshot, Claude Code was running a test that was supposed to point HOME at a throwaway folder, so nothing touched the real one. In the agent's words, the HOME switch "was skipped after the first commit failed". The test ran against the developer's actual home folder instead.

Then the test's cleanup step did what cleanup steps do. The agent wrote: "My cleanup then ran rm -rf on your actual ~/.claude".

The damage

The agent's own tally: it had deleted nearly all of the ~/.claude folder, "including skills, settings, memory, plugins and past transcripts", and only about 12 KB had been recreated. It said ~/.claude.json was untouched. It stopped running anything that writes and started checking, read-only, whether a backup existed. The post doesn't say whether one did.

Why it hurts

~/.claude is where Claude Code keeps a user's custom skills, settings, saved memory, plugins and session history, which often means months of setup. A test that fakes HOME is a common trick to keep it safe. Here, one failed step earlier in the run meant the fake never happened, and the delete went to the real thing.

Our take

This is our opinion. If a test's safety depends on a setup step, the test has to stop when that step fails, not carry on. Check that HOME really is the temp folder before any cleanup runs, and keep a backup of your agent's config folder.

Lesson for builders

Make tests fail closed: if the sandbox setup step fails, abort before any cleanup runs, and back up your agent's config folder.

Fail card: A developer shares Claude Code admitting its test ran against their real home folder and its cleanup deleted nearly all of ~/.claude
The fail card

This story in one shareable card. Tap to open it full size.

Share on X All fail cards →

More agent chaos

Every day of agent chaos →

More fails

Get TechBroz Weekly free → All 46 fails