STUPID-2026-0123
Claude Code's rm -rf/Remove-Item followed an NTFS junction out of a pnpm worktree and wiped a user's Documents, Downloads, Pictures and two unpushed commits (GitHub #29249)
Instruction given
Remove two git worktrees (variant-a and variant-b) from a pnpm monorepo on Windows.
Expected behavior
Delete only the contents of the two worktree directories, leaving the rest of the filesystem — including unrelated folders pnpm had linked into node_modules via NTFS junctions — untouched.
Actual behavior
Claude Code ran `Remove-Item -Recurse -Force` (and, in Git Bash/MSYS, `rm -rf`) directly on the worktree paths. pnpm had populated each worktree's node_modules with NTFS junctions (not symlinks) pointing elsewhere on the disk, and both Windows PowerShell's Remove-Item and MSYS's rm follow junctions into their targets rather than removing the link itself — a gap patched in PowerShell Core 6+ but never backported to the Windows PowerShell 5.1 that Claude Code's Bash tool shells out to. The deletion silently escaped the worktree and recursed into the junction targets.
Damage
The user's entire Documents, Downloads, Music, Pictures, Videos and Favorites folders were permanently deleted (both Remove-Item -Force and rm -rf bypass the Recycle Bin), along with parts of two other projects (WAOK-MONOREPO and WAOK-LEGACY). WAOK-MONOREPO was recoverable by re-cloning, but two unpushed commits and all uncommitted working changes were lost. The reporter confirmed the same prompt reproduces the data loss every time and filed the issue with the `has-repro` and `data-loss` labels; it was closed as not planned with no fix shipped.
Classification
- Agent
- Claude Code
- Failure mode
- Destructive Action
- Root cause
- Scope Misunderstanding
- Domain
- Infra
- 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.