[CRITICAL] Version 2.0.50 performs full file rewrites instead of targeted edits - 20x performance regression
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?
Title: [CRITICAL] Version 2.0.50 performs full file rewrites instead of targeted edits - 20x performance regression
Environment:
Platform: Windows 10/11
Claude Code Version: 2.0.50
Installation Method: npm global install
Working Version: 2.0.49
Bug Description:
Version 2.0.50 has a critical regression where it performs complete file rewrites for every edit instead of using targeted string replacements. This makes Claude Code completely unusable for any non-trivial codebase.
Evidence:
When making a simple edit to a large file (~2,300 lines), Claude Code shows:
Lines changed: ±18668 -18575 (essentially rewriting the entire file)
Token usage: 47,642 tokens for a single minor edit
Performance: 20x slower than version 2.0.49
Screenshot attached showing the massive line count changes at the bottom of the terminal.
Expected Behavior (v2.0.49):
Targeted edits using str_replace mechanism
Only the specific changed lines appear in git diff
Token usage: hundreds of tokens for typical edits
Fast response times
Actual Behavior (v2.0.50):
Complete file rewrite for every edit
Git diffs show thousands of lines changed
Token usage: tens of thousands of tokens per edit
Unusably slow performance (minutes per simple edit)
"Clauding... (esc to interrupt · 1m 37s · ↑ 520 tokens)" for trivial operations
Impact:
Makes Claude Code completely unusable for production codebases
Massive token waste (100x increase in token consumption)
Git history becomes polluted with false "full file changes"
Development velocity drops to near zero
Workaround:
bashnpm install -g @anthropic-ai/claude-code@2.0.49
Set DISABLE_AUTOUPDATER=1 environment variable to prevent auto-update back to 2.0.50.
Additional Context:
This appears to be a regression in the str_replace mechanism. Instead of finding and replacing specific strings, it's reading and rewriting entire files. This may have been introduced as part of changes to the file editing system between 2.0.49 and 2.0.50.
Suggested Priority: Critical - This blocks all productive use of Claude Code for real-world codebases.
What Should Happen?
not rewrite the entire freaking file!
Error Messages/Logs
Steps to Reproduce
Reproduction:
Install Claude Code 2.0.50
Open any project with files >500 lines
Ask Claude to make a simple edit (change one function, fix one bug, etc.)
Observe the massive line count changes and token usage at bottom of terminal
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
v2.0.49
Claude Code Version
v.2.0.50
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
<img width="1280" height="686" alt="Image" src="https://github.com/user-attachments/assets/dded3da4-6cc4-4981-a046-02ac1a4f6338" />
This issue has 10 comments on GitHub. Read the full discussion on GitHub ↗