Edit tool diff preview renders entire file as all-green additions (no removals, no context)

Resolved 💬 4 comments Opened May 14, 2026 by wharrison42 Closed May 18, 2026

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

  1. In a Claude Code session, ask Claude to make a one-character or one-line change to an existing Python file.
  2. 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.

View original on GitHub ↗

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