July 15, 2026
A temporary HOME became the real HOME between tool calls
Claude Code exported a temporary `$HOME`, lost that shell state between tool calls, and then aimed `rm -rf "$HOME"` at the user’s actual home directory.
What happened
The agent set `HOME` to a temporary directory in one Bash invocation. In a later invocation the environment did not persist. The cleanup command resolved `$HOME` to the real user directory and deleted Documents, Downloads, Pictures, configuration and application data before a timeout interrupted it.
What the evidence shows
The open issue is marked high-priority and data-loss. It includes the command chain, observed damage and a plausible root cause. TruthAPI also found related deletion reports.
What appears true
A command can look locally reasonable and still be globally catastrophic. Argument resolution and path protection must happen at execution time.
What remains uncertain
The report is unusually concrete, but it remains a user-filed GitHub issue rather than a published Anthropic root-cause analysis.