STUPID-2026-0122
Claude Desktop's background worktree garbage collector force-removed an idle worktree and destroyed ~2.9GB of unrecoverable generated output, a regression of a fix shipped five days earlier
Instruction given
No explicit instruction for this step — Claude Desktop's own background WorktreePool garbage collector runs automatically to remove idle git worktrees under <repo>/.claude/worktrees/ roughly two days after a session ends; no user action triggered the removal.
Expected behavior
The garbage collector should only remove a worktree it can confirm holds nothing of value, which requires checking for git-ignored files as well as tracked ones — not relying on `git status`, which does not report ignored files at all.
Actual behavior
The GC ran `git worktree remove --force` on an idle worktree that `git status` reported as clean. The worktree in fact held a git-ignored `.local/` folder containing SQLite databases, JSONL outputs, and roughly 2.9GB of generated images that the clean check never saw. The force-remove itself then failed partway through with a "Directory not empty" error, leaving the worktree de-registered with its contents half-deleted. The issue explicitly references #96162, closed five days earlier as a fix for the same GC force-removing worktree data — this is a regression showing that fix was incomplete.
Damage
Roughly three days of paid model output were destroyed: about 30,000 generated asset descriptions and 2,200 generated images (produced via Gemini on Vertex AI and Claude on Bedrock), plus suggestion libraries and a search index. Recorded third-party API spend on the lost outputs was approximately $215-300. Only about 3% of the images and almost none of the text could be recovered from Claude transcripts. Filed by the affected user with detailed reproduction steps (labels: bug, data-loss, has repro, area:desktop, platform:macos); open and unfixed as of filing.
Classification
- Agent
- Claude Code
- Failure mode
- Destructive Action
- Root cause
- Logic Error
- 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.