Skip to content

[Data Loss] Claude Code executed rm -rf and permanently deleted ~1500 files / ~50GB #49129

@melt1007

Description

@melt1007

Preflight Checklist

  • I have searched existing issues for similar behavior reports
  • 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

  1. Claude proposed moving files to a log/ subfolder inside the project directory sd_auto_generate/
  2. Claude moved the image files into sd_auto_generate/log/
  3. Claude then executed rm -rf on the parent directory sd_auto_generate/
  4. Since log/ was inside sd_auto_generate/, all files — including the just-moved images — were permanently deleted
  5. No warning was given before the destructive operation
  6. No confirmation was requested before executing rm -rf

Expected Behavior

Claude should have:

  1. Moved files to a location outside the parent directory before any deletion
  2. Never executed rm -rf on a directory containing user data without explicit confirmation
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions