claude-code - 💡(How to fix) Fix Claude Code deleted client video files without confirmation — data loss on production work

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Code Example



---
RAW_BUFFERClick to expand / collapse

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 to reorganize video files in D:\Clientes\Yandy Clinica\ENTREGABLES\ — move them into a single flat folder with date prefixes in the filenames.

What Claude Actually Did

Claude wrote a PowerShell script that used Get-ChildItem with -Include without -Recurse, which silently returned zero files. The script then ran Remove-Item -Recurse -Force on all 7 month folders, permanently deleting approximately 34 edited client video files. No confirmation was requested before deletion. Files bypassed the Recycle Bin due to -Force. The drive is an SSD with TRIM — data is completely unrecoverable.

Expected Behavior

Claude should never execute Remove-Item or any destructive delete operation without explicit user confirmation, especially on client work folders. It should have moved files first, verified they arrived correctly, then asked for confirmation before deleting anything.

Files Affected

Permission Mode

Accept Edits was ON (auto-accepting changes)

Can You Reproduce This?

No, only happened once

Steps to Reproduce

  1. Ask Claude to reorganize video files into a flat folder structure with date prefixes
  2. Claude writes a PowerShell script using Get-ChildItem with -Include "*.mp4" without -Recurse on a directory path
  3. Get-ChildItem silently returns zero results due to PowerShell 5.1 behavior with -Include on literal paths
  4. Script proceeds to run Remove-Item -Recurse -Force on the now "empty-looking" folders
  5. All files in those folders are permanently deleted without any confirmation prompt
  6. On SSD with TRIM enabled, data is immediately zeroed — unrecoverable

Claude Model

Sonnet

Relevant Conversation

Impact

Critical - Data loss or corrupted project

Claude Code Version

2.1.159 (Claude Code)

Platform

Anthropic API

Additional Context

Months of professional video editing work for a paying client permanently destroyed. Significant financial damage to a content production business.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING