[BUG] Diff display shows excessive code duplication instead of minimal changes
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?
The diff algorithm used to display file changes shows excessive code duplication, making it appear as though large blocks of code were rewritten when only small changes were made. The diffs show large blocks of code being "removed" (red) and "added" (green) even though most of the lines are identical. This makes it difficult to identify what actually changed.
What Should Happen?
The diff should show minimal changes - only the lines that were actually added, removed, or modified, similar to how git diff or GitHub's diff viewer works.
Error Messages/Logs
Steps to Reproduce
- Make a small edit to a file (e.g., add a single method, change a few lines)
- Observe the diff displayed by Claude Code Desktop
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
Claude 1.1.1200 (46e533) 2026-01-28T03:42:34.000Z
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
<img width="318" alt="Image" src="https://github.com/user-attachments/assets/ed4bed4a-4964-4ef3-9aee-d84abe76712a" /><img width="300" alt="Image" src="https://github.com/user-attachments/assets/df8388bc-a429-4fa2-a1ae-7e0a94c3b79d" />
This is on the Claude Code Desktop app for Windows. I think it does occur in the terminal as well, but I'm not 100% sure.
Thank you!
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗