CRITICAL: Claude modifies/deletes files without making backups despite explicit global rule

Resolved 💬 2 comments Opened Apr 15, 2026 by GoR-XarraY Closed May 24, 2026

Severity: CRITICAL — Data Loss

What happened

Claude Code was given an explicit global CLAUDE.md rule: NEVER delete or modify files without making a backup first. Despite this rule being loaded in every session, Claude repeatedly modified production files (app.js, app.css) without creating backups, then could not restore them when asked.

Impact

  • Working, approved production code was modified without backups
  • When the user asked for the backup, none existed
  • Hours of debugging work (founder-approved changes) were permanently lost
  • User had to re-debug from scratch

Expected behavior

Before modifying ANY file that already exists, Claude should:

  1. Read the file
  2. Create a timestamped backup (e.g., file.bak_YYYYMMDD_HHMMSS)
  3. Then make the modification

This should be enforced especially when CLAUDE.md contains an explicit rule about it.

Requested resolution

  • Refund of session time/credits spent re-debugging lost work
  • Bonus API credits for the operational disruption caused
  • Fix: Claude should treat CLAUDE.md backup rules as hard constraints, not suggestions

Session context

This occurred during a production map application development session. The modifications destroyed working code that had been reviewed and approved by the product founder.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗