claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[CRITICAL] Claude has deliberately deleted a detailed specification file

Open mjt007 opened this issue 1 year ago • 6 comments

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

No prompt, Claude independently deleted a file that it knew contained the detailed specifications that it was working from. It suddenly claimed no knowledge of it, and I found out that the file had been deleted.

What Claude Actually Did

Independently and without authorisation or necessity deleted a very important specification file.

Expected Behavior

Leave the files alone.

Files Affected

A detailed specification md file containing detailed specification and instructions for new features to be added to the codebase. This was the only copy of the file, it will take me a long time to recreate and I do not have the mental strength at the moment, it is another hammer blow from Claude at a time when I am really struggling.

Permission Mode

Accept Edits was ON (auto-accepting changes)

Can You Reproduce This?

No, only happened once

Steps to Reproduce

No response

Claude Model

Opus

Relevant Conversation


Impact

Critical - Data loss or corrupted project

Claude Code Version

Claude Code v1.0.117

Platform

Anthropic API

Additional Context

No response

mjt007 avatar Sep 17 '25 19:09 mjt007

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/4451
  2. https://github.com/anthropics/claude-code/issues/3287
  3. https://github.com/anthropics/claude-code/issues/7645

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

github-actions[bot] avatar Sep 17 '25 19:09 github-actions[bot]

you git and commit often

jackstine avatar Sep 17 '25 19:09 jackstine

you git and commit often

I do, very often. Claude did this straight after a commit, just after the spec had been given to it, before any meaningful changes had been made to the code so no reason to commit. Also the file was not in the code directory!

mjt007 avatar Sep 17 '25 20:09 mjt007

Sorry but it will be hard to action this report without a repro

wolffiex avatar Sep 17 '25 22:09 wolffiex

⚠️ CRITICAL: This issue represents a serious data loss bug that should not be closed without thorough investigation and resolution.

Unprompted file deletion is one of the most severe bugs possible in a development tool. Even with 'Accept Edits ON', Claude should NEVER delete files without explicit user instruction to do so. The fact that this deleted an important specification file (the only copy) represents:

  1. A violation of expected tool behavior
  2. Potential for irreversible data loss
  3. A critical trust issue with the tool

This needs immediate attention from the development team. Auto-accept should apply to edits within files, not wholesale deletion of files without user consent. Please reopen and investigate this as a P0 security/data loss issue.

JLiotta-25 avatar Sep 21 '25 16:09 JLiotta-25

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Sep 29 '25 14:09 github-actions[bot]