SecurityOnlineDdos
Data Disaster: Claude AI Executes rm -rf ~/ and Wipes Developer’s Mac Home Directory
A recent cautionary tale highlights how Claude AI’s command line interface can cause extensive data loss when a trailing tilde is expanded to a user’s home directory. According to the piece, a developer using Claude CLI to clean up an old repository triggered a system‑wide deletion with the command rm -rf tests/ patches/ plan/ ~/, erasing large swathes of data including the Desktop, Documents and Downloads folders, the Keychains directory, Claude’s credential store, and effectively everything under /Users.
The incident, discussed on Reddit, is attributed to a root cause described as a malformed command that allowed Claude CLI to access and delete across the home directory, underscoring concerns that Claude CLI’s working directory was not properly constrained. The report notes the recoverability of such wipes is highly challenging and mentions proposals to run Claude CLI inside a Docker container to isolate the host system and prevent file obliteration.
It concludes with a broader warning that unconstrained AI tools can pose serious risks to developer environments, urging containment and safer deployment practices.