Agent chaosAs reported·18 Nov 2026
Claude Code ran rm -rf /* as root in WSL and wiped about 2 TB on a user's Windows drives, he says
As reported One person’s public account. We couldn’t independently confirm it, and we’ll update this if the facts change.
As reported: asked to replace files in one folder inside WSL, Claude Code ran rm -rf /* as root after a quoting mistake left a path variable empty. It deleted an estimated 2 TB on the user's Windows drives, photos included.
This is one person's account on X, not independently confirmed. He posted it on 17 November with two screenshots and a Claude Code feedback ID, and tagged Anthropic and Claude Code team members asking how to fix it. We saw no public reply from Anthropic when we checked.
What happened
The job was small: replace the files in one folder inside WSL, the Linux layer that runs on Windows. According to the user, Claude Code instead ran rm -rf /*, delete everything, with root rights.
The first screenshot shows the agent's own explanation in a Claude Code remote session. In its words, it quoted a shell command incorrectly, so the variable meant to hold the folder path was empty when the command ran. With the path gone, the command pointed at the root of the whole system.
Why it reached Windows
WSL shows the computer's Windows drives as ordinary Linux folders. So the deletion didn't stop at Linux. The agent's message says it kept erasing files on those drives for about 18 minutes, an estimated 2 TB, including personal photos and music.
The second screenshot is a disk usage chart. Two drives that were well used drop to almost empty within a few minutes, while the system drive stays mostly intact.
Can it be recovered?
The agent's message says some of the data can likely be restored from a system snapshot, but much of the rest, including irreplaceable personal photos, appears to be lost for good. The message ends with an apology and an admission that it should have checked the command before running it.
This is the same failure shape as an empty-variable wipe we covered on 14 November: a path that should be set is blank, and a delete command runs against everything instead of one folder.
Our take
Two things turned a typo into a disaster: root rights and Windows drives mounted inside WSL. Don't give coding agents root. Run them with Windows drives unmounted or read-only, use set -u so an empty variable stops the script, and block any rm -rf that targets / or anything outside the project.
An empty variable plus root plus mounted drives equals a wiped computer: block deletes outside the project and never hand an agent root.

