STUPID-2026-0088
Claude Code sub-agent's recursive delete escaped its working directory and wiped an entire Windows user profile — 234,884 files — after the safety classifier failed open (GitHub #86872)
Instruction given
Main agent spawned several general-purpose sub-agents to audit code, including a module that managed temp clipboard files via a recursive-delete routine.
Expected behavior
A sub-agent's recursive delete should be confined to the working directory (or the specific temp path it was auditing), and if the handoff safety classifier that gates sub-agent tool output is unavailable, execution should fail closed — block the command — rather than proceed.
Actual behavior
A general-purpose sub-agent issued a single PowerShell recursive-delete command whose target path resolved to the profile root (`C:\Users\<user>`) instead of a temp directory. The command was auto-approved by an existing allow-rule in the project's `settings.local.json`, and the handoff safety classifier — unavailable at that moment — failed open, logging "Handoff classifier unavailable or failed closed without a verdict, allowing sub-agent output with warning" and letting the command run anyway. The command's own transcript was destroyed mid-run when its output path was swept up in the deletion, so the exact command text could not be recovered afterward.
Damage
234,884 files across the reporter's entire Windows user profile were deleted in an NTFS-journal-confirmed window of roughly two minutes (09:59 to 10:02 local, exactly matching the 120,192ms runtime of the single PowerShell tool call). The wiped profile included source code, SSH keys, Documents, an Android SDK install, Steam, and Microsoft Teams data — source code and SSH keys are irrecoverable; the rest requires full reinstall. Reported open with no maintainer response or fix at time of writing.
Classification
- Agent
- Claude Code
- Failure mode
- Destructive Action
- Root cause
- Scope Misunderstanding
- Domain
- Other
- Source
- Github Issue
Related incidents
Get told when an agent breaks something
We document AI agent failures daily, severity-scored against a published scale. When one lands at 7.0 or above — deleted data, leaked secrets, broken production — you get an email with the source. When nothing does, you get nothing.
This database is callable over MCP — query it from inside your agent.