STUPID-2026-0135
Claude Code ran diskutil apfs deleteVolume and destroyed a 202GB personal archive after being told "do not remove any data"
Why 8/10
A 202 GB personal archive volume was deleted despite an explicit instruction not to. The user describes it as unrecoverable; the source is a Reddit post.
- 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
- 0/1
- Only the user's own non-production work
The score is the sum of these four factors. How each factor is scored · scored 2026-10-29
Guardrail rules for this command
Volume, container and mirror deletes: make your agent stop and ask before running these. Free to copy; written in each tool’s documented format.
Claude Code · the agent in this incident
{
"permissions": {
"ask": [
"Bash(terraform destroy*)",
"Bash(docker rm *)",
"Bash(docker volume rm *)",
"Bash(docker system prune*)",
"Bash(diskutil *)",
"Bash(lftp *)",
"Bash(rsync * --delete*)"
]
}
}Stronger control: Turn on the sandbox (/sandbox): shell commands can then write only to the project, a temp folder and directories you add. It runs on macOS, Linux and WSL2; on native Windows Claude Code runs commands unsandboxed. Docs
Codex
prefix_rule(pattern = ["terraform", "destroy"], decision = "prompt")
prefix_rule(pattern = ["docker", ["rm", "rmi", "volume", "system"]], decision = "prompt")
prefix_rule(pattern = ["diskutil"], decision = "prompt")
prefix_rule(pattern = ["lftp"], decision = "prompt")Stronger control: Keep Codex's OS sandbox on (it limits writes, typically to the workspace) and leave approvals on for sessions that can reach data you cannot lose. Docs
Gemini CLI
[[rule]]
toolName = "run_shell_command"
commandPrefix = ["terraform destroy", "docker rm", "docker volume rm", "docker system prune", "diskutil", "lftp"]
decision = "ask_user"
priority = 100
denyMessage = "Destructive command: needs a human to confirm (stupidllm.com)"Stronger control: Policies in ~/.gemini/policies apply in every approval mode unless a rule's modes field narrows them. Docs
Copilot CLI
copilot --deny-tool='shell(diskutil)' --deny-tool='shell(lftp)'Stronger control: Avoid --allow-all-tools on a machine with data you cannot lose; --deny-tool takes precedence over it. Docs
What these cannot do: a pattern rule matches the command text the agent writes. In Anthropic’s words it “isn’t a security boundary around the program”: /bin/rm, sh -c or a script that runs the same thing gets past it (STUPID-2026-0124 got past a guard with cmd /c). Use the sandbox as well, and keep backups of what you cannot lose.
Instruction given
Remove an empty APFS volume from a 2TB external NVMe drive and let the other volume on the same drive expand to fill the freed space. The user explicitly added: "do not remove any data."
Expected behavior
Identify which of the two APFS volumes was empty, remove only that one, and grow the remaining data-holding volume into the freed space — leaving the 202GB archive on the second volume untouched.
Actual behavior
Instead of resizing the volume layout as asked, Claude Code ran `diskutil apfs deleteVolume` against the volume holding the user's 202GB archive — years of accumulated projects, documents, screenshots, and personal files carried over from an old Mac Mini — rather than the empty one, destroying it.
Damage
The entire 202GB personal archive on the external NVMe volume was deleted. The user's account frames the loss as unrecoverable; no backup or snapshot is mentioned.
Full write-up
What happened
A user had a 2TB external NVMe drive attached to a Mac Studio, partitioned into two APFS volumes: one empty, and one holding a 202GB personal archive migrated from an old Mac Mini — projects, documents, screenshots, and years of accumulated personal files. They asked Claude Code to remove the empty volume and let the remaining volume expand to use the full 2TB, explicitly telling it: "do not remove any data."
Claude Code ran diskutil apfs deleteVolume against the volume holding the 202GB archive instead of the empty one. The data was destroyed.
Why it matters
The instruction distinguished clearly between the two volumes by content — one empty, one not — and added an explicit guardrail against data loss. deleteVolume is also a categorically different operation from the resize the user actually asked for: growing a volume on a two-volume APFS container means removing the *other* volume, not a destructive delete of the one holding the data. Getting this backwards turns a routine disk layout change into total loss of the only copy of years of personal files, despite an instruction written specifically to prevent exactly that outcome.
Source
Reddit post in r/ClaudeCode, "Claude Code deleted my entire 202GB archive after I explicitly said 'do not remove any data'" (627 upvotes, 246 comments as collected). This is a first-person, second-hand account with no independent reproduction or maintainer confirmation on record, so it is marked unverified here.
Classification
- Agent
- Claude Code
- Failure mode
- Destructive Action
- Root cause
- Tool Misuse
- 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 · 5.2 Loss of human agency and autonomy taxonomy
- Source
- Reddit Post
Related incidents
Cite this record
StupidLLM. "STUPID-2026-0135: Claude Code ran diskutil apfs deleteVolume and destroyed a 202GB personal archive after being told "do not remove any data"." AI Agent Incident Database, 2026. https://www.stupidllm.com/incident/STUPID-2026-0135/ (accessed 2026-11-11). CC BY 4.0.
← STUPID-2026-0134By IDSTUPID-2026-0136 →
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.