Claude CLI Deletes User Home Directory

A Reddit user recently reported that Anthropic’s Claude CLI executed an unsafe shell command that erased their entire Mac home directory, a post that received more than 1,500 upvotes and hundreds of comments. Logs show an unescaped trailing tilde in an ‘rm -rf’ command caused shell expansion and deletion; the incident prompted bug reports and calls for sandboxing and permission safeguards. Industry conversations now focus on tightening agent permissions and vetting AI-generated scripts.
Key Points
- 1Executed unsafe rm -rf command that deleted an entire Mac home directory via Claude CLI
- 2Highlights AI's inability to reliably handle shell edge cases like unescaped tilde expansion
- 3Practitioners must sandbox and vet AI-generated scripts to prevent catastrophic data loss
Scoring Rationale
Reports expose urgent safety gaps and actionable fixes, but depend largely on user reports without full official confirmation.
Sources
Public references used for this report.
Practice interview problems based on real data
1,625 SQL & Python problems across 15 industry datasets — the exact type of data you work with.
Try 250 free problems