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)

9.2critical
August 15, 2026VerifiedReproducible
  1. 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.

  2. 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.

  3. 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.

  4. 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.

On August 15, 2026, a Claude Code user (VS Code extension v2.1.231, Windows 11 Pro, auto-mode enabled with broad Bash/PowerShell allow-rules) filed GitHub issue #86872 after a sub-agent's cleanup routine deleted their entire user profile. The main agent had spawned several `general-purpose` sub-agents to audit code, one of which was reviewing a module that managed temporary clipboard files using a recursive-delete function. That sub-agent issued a single PowerShell command — logged as `toolUseId=toolu_01V7XbuBv39JbAXKA9mTafrU`, `agentId=af8fba6dfe3e04c90` — whose target path resolved to the profile root (`C:\Users\<user>`) rather than the intended temp directory. The command was auto-approved by an existing allow-rule, and Claude Code's handoff safety classifier — which gates sub-agent tool output before it takes effect — was unavailable at that exact moment and failed open, logging a warning ("Handoff classifier unavailable or failed closed without a verdict, allowing sub-agent output with warning") instead of blocking the command. The NTFS USN journal recorded 234,884 file deletions between 10:01:10 and 10:02:14, a window entirely contained within the command's measured 120,192ms runtime — exactly two minutes, versus 0.1–0.9 seconds for every other command in the session. The deletion wiped source code, SSH keys, Documents, an Android SDK install, Steam, and Microsoft Teams data from the profile. The sub-agent's own transcript was destroyed mid-run when the deletion swept up its output path, so the exact command text that triggered the wipe could not be recovered — the reporter reconstructed the failure from extension logs and the NTFS journal instead. The issue is labeled `bug`, `data-loss`, `high-priority`, `area:agents`, `area:sandbox`, `area:security`, and `platform:windows`, and remains open with no maintainer response.

Classification

Failure mode
Destructive Action
Domain
Other

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.