STUPID-2026-0128
Claude Code's rm deleted ~200GB of a user's home directory with no approval prompt — SSH keys, AWS, GitHub CLI and Turso credentials all destroyed, and the one session transcript that might show causation was wiped along with everything else (GitHub #83058)
Why 9/10
About 200 GB of a home directory, including SSH, AWS and GitHub credentials, was destroyed. Which session issued the command is unproven.
- Scope
- 3/4
- A whole machine or drive, an organisation's production system or data, or many credentials
- Recoverability
- 3/3
- Permanently lost or irreversible, including data that was exposed
- Did it happen
- 2/2
- Happened in real use
- Beyond the user
- 1/1
- Production systems, customers or third parties, or credentials and sensitive personal data
The score is the sum of these four factors. How each factor is scored · scored 2026-10-29
Status and what to do
- Affected
- Claude Code 2.1.220 with two concurrent sessions; the OS is not stated in the record.
- Fix status
- No fix linked · The GitHub issue was closed as not planned by the stale bot on 7 October 2026 with no maintainer response.
- Mitigation
- Claude Code's sandbox (macOS, Linux, WSL2) limits sandboxed shell writes to the working directory, a temp directory and folders you add, per its docs. Keep credentials such as ~/.ssh and ~/.aws backed up separately. Source
- Last reviewed
- 2026-10-29 · Report a correction to this record
Instruction given
Unknown. The user's GitHub issue does not quote the prompt sent in the triggering session — only that a message was sent at 22:47:02 UTC+8 immediately before one read-only Bash call, and the destructive `rm` began seventeen seconds later. The user was working in a project directory at Documents/WORK/brain-battle with two concurrent Claude Code sessions open in the same workspace.
Expected behavior
A Bash tool call whose delete resolves outside the active project working directory should require explicit confirmation even under permissive permission settings, and should never be allowed to reach Desktop, Downloads, or credential stores like ~/.ssh, ~/.aws and ~/.config/gh regardless of what triggered it.
Actual behavior
Starting at 22:46:11 (UTC+8) on July 29, 2026, files began disappearing from the user's home directory on macOS 26.5.2. `~/.claude-mem/claude-mem.db` was unlinked while still open, `/bin/rm` (pid 68042) then emptied `~/Desktop`, deleted `~/.turso/turso`, and reduced the active project directory to a bare `.DS_Store`. No permission or approval prompt appeared at any point, despite the delete escaping the project working directory and walking the entire home folder. The user noticed at 22:52:08 and asked the session what had happened; the deletion was still running through `~/Downloads` as of 22:56:54. The user rebooted the machine at 22:57:27, interrupting the sweep before it reached ~/Library, ~/Movies and ~/Pictures.
Damage
Roughly 200GB destroyed, including the project directory, most of ~/Desktop, part of ~/Downloads, and the credential stores ~/.ssh, ~/.config/gh, ~/.aws, ~/.turso and ~/.cargo, plus local session records under ~/.claude-mem and ~/.zsh_history. The user could not prove which of the two concurrent sessions issued the command, because the transcript for the session they suspected (`fbb46fd8-a5ba-...`) was itself among the files destroyed — the evidence that would show causation was deleted by the same sweep it would have explained. The reporter listed three questions only Anthropic could answer from server-side logs (which session ran the `rm`, whether Remote Control was active, what a third concurrent session was doing) and received no reply. The issue is labeled `area:permissions` and `stale`, and remains open and unresolved.
Full write-up
On August 1, 2026, a Claude Code user (username Keni-Dev) filed anthropics/claude-code issue #83058 describing a rm sweep that destroyed roughly 200GB of their home directory three days earlier, on macOS 26.5.2 running Claude Code 2.1.220 with claude-opus-5. The user had two Claude Code sessions open in the same VS Code workspace, working out of Documents/WORK/brain-battle. At 22:46:11 local time, a database file under ~/.claude-mem was unlinked while still open — the first sign anything was wrong. A /bin/rm process then emptied ~/Desktop, deleted the Turso CLI's config directory, and reduced the active project to a bare .DS_Store, all without a single permission prompt appearing, despite the delete reaching well outside the project's working directory.
The user noticed at 22:52 and asked the session directly what had happened, but the deletion kept running — by 22:56 it was still working through ~/Downloads. They rebooted the machine a minute later, which cut the sweep off before it reached ~/Library, ~/Movies or ~/Pictures, sparing those folders. What was already gone included ~/.ssh, ~/.config/gh, ~/.aws, ~/.cargo and the local Claude Code session logs themselves.
The issue is unusually explicit about what it cannot prove: with two sessions running concurrently and no permission prompt or audit trail pointing to either one, the user could not say with certainty that Claude Code issued the rm rather than some other process in the same shell — and the one piece of evidence that might have settled it, the transcript for the session they suspected, was destroyed in the same sweep. The report ends with three questions addressed directly to Anthropic (which session ran the command, whether Remote Control was active, what a third concurrent session was doing) that only server-side logs could answer. No maintainer ever replied; the issue carries the area:permissions label and has since been marked stale.
Classification
- Agent
- Claude Code
- Failure mode
- Destructive Action
- Root cause
- Scope Misunderstanding
- Domain
- Infra
- OWASP Agentic Top 10 (our mapping)
- ASI02 Tool Misuse and Exploitation list
- MIT AI Risk Repository (our mapping)
- 7.3 Lack of capability or robustness taxonomy
- Source
- Github Issue
Related incidents
Cite this record
StupidLLM. "STUPID-2026-0128: Claude Code's rm deleted ~200GB of a user's home directory with no approval prompt — SSH keys, AWS, GitHub CLI and Turso credentials all destroyed, and the one session transcript that might show causation was wiped along with everything else (GitHub #83058)." AI Agent Incident Database, 2026. https://www.stupidllm.com/incident/STUPID-2026-0128/ (accessed 2026-11-20). CC BY 4.0.
← STUPID-2026-0127By IDSTUPID-2026-0129 →
Get told when an agent breaks something
We document AI agent failures daily, severity-scored against a published scale. Each Monday, if any scored 7 or above that week — deleted data, leaked secrets, broken production — you get one email with the sources. When nothing did, you get nothing.
This database is callable over MCP — query it from inside your agent.