Claude just deleted half of my C: drive

From the “things that happen only to other people” department:
Claude just deleted half of my C: drive

Type: bug
Title: Model ran a mis-quoted rd /s /q that recursively deleted C:\ root contents
Area: Bash tool / destructive commands
Failure mode: destructive actions
Task: debug
Details:

  • What happened: To delete a probe dir with \\?\-only names, the model generated
    a .ps1 via printf containing cmd.exe /c “rd /s /q \”\\?\$d\””. Quoting broke;
    cmd (started from a UNC cwd, so defaulting to C:\Windows) treated the target
    as \ and recursively deleted C:\ contents for ~2 min as the user
    (C:\[some tool] 71 GB, plus bin, ESD, Intel, lazarus, log) until the model
    noticed and killed it.
  • What the user said: “That’s unfortunate.”
  • Repro: bash in WSL -> printf a .ps1 with escaped nested quotes
    -> powershell.exe -File -> cmd.exe /c “rd /s /q \”\\?\\””
    from a \\wsl.localhost cwd.
  • Evidence: 2026-11-12 ~10:29-10:33 CET; task bwoce5crs output shows rd errors
    walking \$Recycle.Bin … \PROGRA~1;
    recovered from VSS shadow copy of the previous day.

I bet some AI haters will love this and will call me names. I probably deserve it too, but hey, I have got a backup. Have you?

Lesson: Keep your backups up to date. It might happen to you too, even if you don’t use AI, because there are other reasons for something like this to happen.