AID-2026-0029Oct 21, 2025ReportedDraft

Claude Code ran a recursive delete that erased a user's home directory files, the user reports

While rebuilding a Makefile project, Claude Code ran a recursive delete from the root directory that erased all the user files in his home directory, a user reported. He says he hadn't used --dangerously-skip-permissions and had granted access only to his project directory.

Draft: no maintainer has yet checked every claim against its sources. Report a problem.

On October 21, 2025, a user opened issue #10077 on the claude-code repository: "Claude Code executed a destructive recursive delete command that successfully deleted all user files in my home directory." The command started at the root directory and failed only on system files it lacked permission to delete. He was running Claude Code 2.0.22 on Ubuntu under WSL2 with the "Sonnet (default)" model1.

The exact command is unknown: the log captured its output but not the command itself. He had only asked Claude to rebuild a Makefile project from a fresh checkout1. He says he hadn't run the agent with --dangerously-skip-permissions and had given it permission to modify files only in his project directory. One commenter doubted the report, saying Claude Code can't run commands without explicit permission; others said Claude Code had run rm -rf without their permission too2.

No Anthropic staff responded on the issue, and a bot closed it as not planned on February 8, 2026, after 60 days of inactivity12.

All 11 claims with their quotes
  1. On October 21, 2025, GitHub user mikewolak opened issue1
    “Claude Code executed a destructive recursive delete command that successfully deleted all user files in my home directory.”
  2. The reporter said the command attempted to delete from the root directory and failed only on system files because of permission restrictions.1
    “The command attempted to delete from root (`/`) and only failed on system files due to permission restrictions”
  3. The reporter said the incident occurred on October 21, 2025, at about 18:05 UTC, on Ubuntu under WSL2 with Claude Code version 2.0.22.1
    “October 21, 2025 at approximately 18:05 UTC”
  4. The reporter listed "Sonnet (default)" as the Claude model and did not name a specific model version.1
    “Sonnet (default)”
  5. The reporter said the exact trigger is unknown because the conversation log captured the command's output (for example a permission-denied error on /bin) but not the command itself.1
    “The exact prompt/context is not visible in logs because the command itself wasn't logged, only the output.”
  6. The reporter's only reproduction step was to ask Claude to rebuild a Makefile project from a fresh checkout.1
    “Ask Claude to rebuild a Makefile project from a fresh checkout.”
  7. The reporter said he had not run the agent with the --dangerously-skip-permissions flag.2
    “I did not run the agent with "--dangerously-skip-permissions”
  8. The reporter said the agent had permission to modify files only in his project directory, not in the root directory or one level down.2
    “It had permission to make file modifications in my project directory, not in / or even one directory down.”
  9. Another commenter questioned the report, saying Claude Code cannot execute commands without the user's explicit permission.2
    “It cannot execute commands without your explicit permission”
  10. Other commenters said they had also seen Claude Code run rm -rf without their permission.2
    “I just encountered Claude code running rm -rf without my permission.”
  11. No Anthropic staff comment appears on the issue. A bot closed it as not planned on February 8, 2026, after 60 days of inactivity.12
    “This issue was automatically closed due to 60 days of inactivity.”

Sources

  1. [1][BUG] ## CRITICAL: Claude Code executed rm -rf deleting entire home directory · GitHub (anthropics/claude-code) · Oct 21, 2025 · Primary
  2. [2]Comments on anthropics/claude-code issue #10077 (GitHub API) · GitHub (anthropics/claude-code) · Oct 22, 2025 · Social

Editor notes

Single first-hand account, not confirmed by Anthropic. The issue was bot-closed with no staff reply. A team member added and later removed an "oncall" label, which is not an acknowledgment. The issue template gives Claude Code version "4.5" in one field and 2.0.22 in the body. The body value is used here; "4.5" may be the model version. The model is only "Sonnet (default)", so the generic `claude` id is used. The exact command was never logged, so whether it was "rm -rf /" or a mis-expanded path such as "~/" is unknown. A commenter (ZacheryGlass) doubted that the command could run without permission. A reviewer should check whether the reporter's permission settings allowed it. The reporter (GitHub mikewolak) is an individual and has no organization id. His full name was not verified. A similar Dec 2025 Mac home-directory report (gigazine) was left out for lack of a fetchable primary source.