Quoting Claude

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Claude Code ran 'rm -rf tests/ patches/ plan/ ~/' and wiped a user's home directory, showing that coding agents can execute destructive commands with no safe path handling.

Read this as

A developer's Mac home directory was largely deleted after Anthropic's Claude Code, a command-line AI coding assistant, ran a cleanup command that included '~/', the symbol for the user's home folder, in a list of directories to remove with 'rm -rf'. Claude itself later diagnosed the mistake in a Reddit thread. The article does not say whether the files were recovered.

An Anthropic Claude Code user lost most of their home directory when the agent included '~/ ', the home-folder shorthand, in an 'rm -rf' deletion command alongside tests/, patches/ and plan/. The incident, diagnosed via logs in a Reddit thread, is a concrete risk for teams adopting AI coding agents: unrestricted shell access can destroy production or personal data, so sandboxing and approval gates matter.

A Claude Code session executed 'rm -rf tests/ patches/ plan/ ~/', expanding the shell glob '~/' to the user's entire home directory. The catastrophic command was reconstructed from the session log by Claude itself after the user reported the wipe on r/ClaudeAI. The article contains no fix, patch, or Anthropic response, only the quoted diagnosis.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

Claude Code Anthropic Reddit r/ClaudeAI

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading