Symptom
When Claude Code proposes an Edit tool change, the diff preview shows the entire new file content as one big green block — no red removed lines, no -/+ interleaving, no context lines. Just the full new content rendered as all-additions. Happens for tiny single-line edits to a normal-sized Python file (~200 lines).
Reproduction
- In a Claude Code session, ask Claude to make a one-character or one-line change to an existing Python file.
- Observe the Edit tool's diff preview before approving.
Expected: unified diff with red - removed lines and green + added lines, with surrounding context.
Actual: full new file content shown in green, old lines absent entirely.
Environment
- Claude Code version: 2.1.141
- OS: WSL2 Ubuntu on Windows 11
- Node: v24.15.0 (bundled binary)
- Settings:
{"model": "opus", "theme": "auto"} — no other overrides
TERM: xterm-256color
COLORTERM: unset
CLAUDE_EFFORT: xhigh
Ruled out
- Not line endings — file is LF,
file confirms no CRLF.
- Not the JetBrains plugin's IDE diff handoff — persists with
ENABLE_IDE_INTEGRATION unset and CLAUDE_CODE_SSE_PORT unset.
- Not the PyCharm "Reworked Terminal" — switched to Classic Terminal, reproduces. Also reproduces in standalone Ubuntu/WSL terminal outside PyCharm entirely.
- Not a per-project setting — project has no
.claude/settings.json or CLAUDE.md.
Notes
Binary string search shows the renderer has DiffTooLarge, Binary file - cannot display diff, diffAdded/diffAddedDimmed/diffRemoved/diffRemovedDimmed constants, so a fallback code path appears to exist — possibly being triggered incorrectly here.
Happy to provide more diagnostic info (debug logs, etc.) if useful.
Symptom
When Claude Code proposes an
Edittool change, the diff preview shows the entire new file content as one big green block — no red removed lines, no-/+interleaving, no context lines. Just the full new content rendered as all-additions. Happens for tiny single-line edits to a normal-sized Python file (~200 lines).Reproduction
Expected: unified diff with red
-removed lines and green+added lines, with surrounding context.Actual: full new file content shown in green, old lines absent entirely.
Environment
{"model": "opus", "theme": "auto"}— no other overridesTERM:xterm-256colorCOLORTERM: unsetCLAUDE_EFFORT:xhighRuled out
fileconfirms no CRLF.ENABLE_IDE_INTEGRATIONunset andCLAUDE_CODE_SSE_PORTunset..claude/settings.jsonorCLAUDE.md.Notes
Binary string search shows the renderer has
DiffTooLarge,Binary file - cannot display diff,diffAdded/diffAddedDimmed/diffRemoved/diffRemovedDimmedconstants, so a fallback code path appears to exist — possibly being triggered incorrectly here.Happy to provide more diagnostic info (debug logs, etc.) if useful.