A subagent cleaning up a stray folder ran a prefix-glob rm -rf that also matched the project folder, deleting 23 GB permanently.
What happened
A Claude Code subagent wiped six months of work, about 30,000 files, with one rm -rf glob. It was cleaning up a stray folder it had made by leaving a path with spaces unquoted. The glob also matched the real project folder, and the built-in critical-path check missed it.
- Agent
- Claude Code
- What was harmed
- Local files and uncommitted work
- Severity
- Severe: permanent data loss, an outage, or money lost
- Recovered
- No
- Reported
Read the original report (claude-code #111167 on GitHub)
Cite this case Unintended Agents. "UAI-2026-0125: A subagent cleaning up a stray folder ran a prefix-glob rm -rf that also matched the project folder, deleting 23 GB permanently." Reported 19 Nov 2026. https://unintendedagents.com/cases/UAI-2026-0125/