REPL crash: terminal render overflow on large Edit output (860K chars)
Resolved 💬 7 comments Opened Apr 10, 2026 by Gabriel-VANROY Closed May 24, 2026
Description
Claude Code crashes when the model generates a large Edit tool call response. The terminal render buffer overflows, causing the REPL to unmount immediately.
Steps to reproduce
- Ask Claude Code to perform an edit that results in a large output
- The model generates a response with a large
Edittool call - The REPL crashes
Debug log analysis
The terminal render goes from normal to catastrophic in a single frame:
# Normal frame just before crash:
[DEBUG] High write ratio: blit=0, write=23690 (100.0% writes), screen=228x79
# Crash frame — screen height jumps 57x, write volume jumps 36x:
[DEBUG] High write ratio: blit=0, write=860108 (100.0% writes), screen=12960x79
[DEBUG] [REPL:unmount] REPL unmounting
The screen went from 228 → 12,960 lines and write volume from 23K → 860K characters in a single render cycle. The REPL unmounts immediately after.
Timeline
- A streaming stall of 55.4s occurred (
Streaming stall detected: 55.4s gap between events) - After the stall, the response completed with an
Edittool call (permission prompt shown) - On the next render frame, the buffer exploded to 860K chars → crash
Expected behavior
The render engine should handle large outputs gracefully — truncate, paginate, or stream incrementally instead of writing 860K characters in a single frame.
Environment
- Claude Code version: 2.1.100
- OS: macOS (Darwin 25.3.0)
- Model: claude-opus-4-6 (1M context)
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗