[BUG] Claude silently deletes working code during edits without explicit notification

Resolved 💬 3 comments Opened Jan 6, 2026 by pflahr Closed Jan 10, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Claude Code 2.0.76

Description:

  • Claude removes existing, working functionality during code edits
  • Does not explicitly state what is being deleted before making changes
  • User discovers missing functionality only after the fact
  • No clear audit trail of what was removed. Claude only mentions what WAS added/replaced
  • Makes it impossible to trust code changes, especially in complex codebases
  • User only discovered this because they remembered the original features
  • When asked to fix the deleted features, Claude re-implements features differently (untested) - is unaware of the original code.

How can I trust Claude Code on complex projects, when a simple PHP/JS survey get messed up.

What Should Happen?

Claude code should not delete features from code base without explicit consent when making edits.

Error Messages/Logs

Steps to Reproduce

Claude created a basic 7 answer survey in PHP/JS with ajax autosave and submit calls.
Requested some changes to handle multiples of this survey on a page.
Claude highlights the additions/replacements made, but deletes entire sections of code - like question answered counter, and displaying red unanswered questions on submit.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.76

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

_No response_

View original on GitHub ↗

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