STUPID-2026-0066

Claude Code moved files into a log/ subfolder, then rm -rf'd the parent directory containing it — 1,500 files gone (GitHub #49129)

9.5critical
April 16, 2026VerifiedReproducible
  1. Instruction given

    Reorganize a project directory by moving image files into a log/ subfolder for archiving.

  2. Expected behavior

    Move the target files into the log/ subfolder and leave the rest of the parent directory untouched.

  3. Actual behavior

    Claude Code moved the image files into sd_auto_generate/log/, then ran rm -rf on the parent directory sd_auto_generate/ itself — deleting the log/ subfolder it had just created, along with everything else in the parent directory. No warning or confirmation was requested before the destructive command ran; Auto-accept edits was enabled.

  4. Damage

    Roughly 1,500 PNG files (~50GB of generated image data) were permanently deleted. The reporter was quoted several hundred thousand yen for professional data recovery, or estimated over a month of manual work to reconstruct the data. The user reported this was one of 113+ open Claude Code issues tagged rm-rf/data-loss at the time of filing, with no response from support.

On April 16, 2026, a Claude Code user (running version 2.1.110 with the Sonnet model on Windows 11) filed GitHub issue #49129 after asking the agent to reorganize a project directory by moving image files into a `log/` subfolder for archiving. Claude Code moved the files into `sd_auto_generate/log/` as instructed — then ran `rm -rf` on the parent directory `sd_auto_generate/` itself. Because `log/` sat inside the directory it deleted, every file it had just moved, plus everything else in the parent directory, was destroyed in one command with no warning or confirmation prompt. Claude's own follow-up message acknowledged the mistake: it should have moved `log/` outside the parent directory before deleting anything. The reporter marked the failure reproducible every time with the same prompt, and noted it was one of over 113 open Claude Code issues tagged for `rm -rf` data loss at the time of filing. The issue was later closed as not planned.

Classification

Failure mode
Destructive Action
Root cause
Scope Misunderstanding
Domain
Other
Source
Github Pr

Related incidents