Windows: Silent crash due to unbounded screen buffer with blit=0 (100% full redraws) on CMD + Windows Terminal

Resolved 💬 6 comments Opened Feb 21, 2026 by Konkag Closed May 23, 2026

Environment

  • Claude Code version: 2.1.32
  • OS: Windows 11 (MSYS_NT-10.0-26100)
  • Terminal: CMD inside Windows Terminal (ConPTY)
  • Shell: CMD (not Git Bash — though platform reports MSYS_NT due to Git for Windows)
  • Node.js: v20.19.5
  • Windows Developer Mode: Enabled

Problem

Claude Code silently crashes during mid-conversation streaming. The process dies without logging any error, signal, or stack trace — the debug log simply stops. No SessionEnd event is recorded.

This has been reproduced across multiple sessions with a consistent pattern.

Crash Pattern from Debug Logs

Every crashed session shows the same progression:

  1. The virtual screen buffer grows continuously throughout the session
  2. blit=0 (zero incremental updates) — the Ink renderer does 100% full redraws every frame
  3. As conversation grows, write volume per render grows proportionally
  4. Eventually the process silently dies mid-API-stream

Observed screen buffer growth → crash:

| Session | Duration | Screen at crash | Write per frame | Outcome |
|---------|----------|----------------|-----------------|---------|
| Session 1 | 2.5 hours | screen=321x99 | 20,633 bytes | Silent death |
| Session 2 (fresh start) | 12 min | screen=963x99 | 54,374 bytes | Silent death |
| Session 3 (fresh start) | 11 min | screen=778x99 | 51,038 bytes | Silent death |

All sessions are fresh starts (not resumed). Sessions 2 and 3 reached large screen buffers quickly due to conversation density (many tool calls, subagent output).

Debug log excerpt (last lines before crash):

2026-02-21T08:07:00.532Z [DEBUG] High write ratio: blit=0, write=50906 (100.0% writes), screen=775x99
2026-02-21T08:07:03.337Z [DEBUG] Stream started - received first chunk
2026-02-21T08:07:04.539Z [DEBUG] High write ratio: blit=0, write=51038 (100.0% writes), screen=778x99
<EOF — process died silently here>

Key observation: blit=0 is constant

Throughout the entire session lifecycle, blit is always 0. The renderer never performs incremental updates — it rewrites the full screen buffer every frame. Example progression in a single session:

screen=20x99,   write=693 bytes     blit=0  (start)
screen=374x99,  write=34,403 bytes  blit=0  (10 min in)
screen=775x99,  write=50,890 bytes  blit=0  (crash)

Likely Root Cause

The Ink terminal renderer's differential rendering (blitting) appears to be non-functional on Windows Terminal + CMD (ConPTY). Without incremental updates, every render cycle rewrites the entire conversation buffer. As the conversation grows, this likely overwhelms the ConPTY buffer or causes the host process to be killed silently by the terminal layer.

The process dies without any logged error, heap overflow, or signal — consistent with ConPTY terminating the child process when its buffer is overwhelmed.

Additional Context

Other errors observed in the same sessions (likely secondary, not the crash cause):

  • EPERM symlink errors on subagent spawn (fs.symlinkSync fails despite Developer Mode being ON) — these occur but sessions continue running after them
  • Context7 MCP SSE disconnects every ~5 minutes (TypeError: terminated) — reconnection works but adds instability
  • getTeammateModeFromSnapshot called before capture on every session start

Workarounds

  • Running /compact periodically reduces the screen buffer and delays the crash
  • Shorter, more focused conversations crash less often

Expected Behavior

  • Ink renderer should use incremental rendering (blitting) on Windows Terminal/CMD
  • If blitting is unsupported, the screen buffer should be capped or auto-compacted to prevent unbounded growth
  • The process should not silently die — it should log an error or gracefully degrade

Steps to Reproduce

  1. Run Claude Code v2.1.32 on Windows 11 in CMD inside Windows Terminal
  2. Have a moderately long conversation (many tool calls, subagent spawns)
  3. Observe High write ratio: blit=0 in debug logs with growing screen size
  4. After ~10-150 minutes (depending on conversation density), the process silently dies

View original on GitHub ↗

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