[Data Loss] Claude Code executed rm -rf and permanently deleted ~1500 files / ~50GB
Resolved 💬 4 comments Opened Apr 16, 2026 by melt1007 Closed May 24, 2026
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [x] This report does NOT contain sensitive information (API keys, passwords, etc.)
Type of Behavior Issue
Claude modified files I didn't ask it to modify
What You Asked Claude to Do
I asked Claude Code to help reorganize project directories. Specifically, I asked it to move image files to a log/ subfolder for archiving.
What Claude Actually Did
- Claude proposed moving files to a
log/subfolder inside the project directorysd_auto_generate/ - Claude moved the image files into
sd_auto_generate/log/ - Claude then executed
rm -rfon the parent directorysd_auto_generate/ - Since
log/was insidesd_auto_generate/, all files — including the just-moved images — were permanently deleted - No warning was given before the destructive operation
- No confirmation was requested before executing
rm -rf
Expected Behavior
Claude should have:
- Moved files to a location outside the parent directory before any deletion
- Never executed
rm -rfon a directory containing user data without explicit confirmation - At minimum, warned the user before any destructive operation and waited for approval
Files Affected
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
Yes, every time with the same prompt
Steps to Reproduce
Impact
- ~1500 PNG files permanently deleted
- ~50GB of irreplaceable generated image data lost
- Professional recovery service estimate: several hundred thousand JPY
- Self-recovery estimate: 1+ month of manual work
Session Info
- Date: 2026-04-16
- Session ID: 6308ffd3-f6e6-4fda-b32a-1f87ec219d33
- Claude Code version: 2.1.110
- OS: Windows 11 Home
Note
Support email was submitted on the same day. No response received yet.
This is part of a widespread known issue (113+ open issues tagged rm -rf / data-loss).
Claude Model
Sonnet
Relevant Conversation
Claude said: "私のミスです。`log/` を `sd_auto_generate/` の外に移してから削除すべきでした。"
[Claude acknowledged the mistake after the fact. The rm -rf had already been executed and all data was permanently deleted.]
Session ID: 6308ffd3-f6e6-4fda-b32a-1f87ec219d33
Impact
Critical - Data loss or corrupted project
Claude Code Version
2.1.110 (Claude Code)
Platform
Anthropic API
Additional Context
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗