TUI animation freezes during thinking→streaming state transitions on WSL2 + Windows Terminal
Describe the bug
The spinner and seconds counter animations freeze momentarily during state transitions — specifically when "thinking" begins and when the response starts streaming. The timer visibly stops updating for ~1-2 seconds at each transition point, then resumes. This happens on every interaction, not intermittently.
The freeze correlates with UI state changes (idle → thinking → streaming → idle), suggesting full-screen re-renders in Ink/Yoga are blocking the animation update loop during these transitions.
Related issues
This appears to share root cause with #769 and #1913 (screen flickering due to Ink re-renders), but manifests differently on WSL2 — as a freeze rather than a flicker, likely because the WSL2→Windows Terminal escape code pipe adds enough latency to make the re-render pause visible.
Also related: #21357 (yoga render loop causing 1M+ re-renders), #12234 (intermittent freezes on Windows Terminal), #34669 (TUI blocked after task completion on Windows Terminal).
Steps to reproduce
- Run Claude Code on WSL2 with Windows Terminal
- Send any prompt
- Observe the spinner/seconds counter during the "thinking" phase
- The animation freezes briefly when thinking starts, and again when the response begins streaming
Expected behavior
Spinner and timer should animate smoothly through state transitions without visible pauses.
Environment
| Component | Version |
|---|---|
| Claude Code | 2.1.79 |
| OS | Ubuntu 24.04.4 LTS (WSL2) |
| WSL | 2.6.2.0 |
| WSL Kernel | 6.6.87.2-microsoft-standard-WSL2 |
| WSLg | 1.0.71 |
| Windows | 10.0.26200.8037 |
| Windows Terminal | 1.23.20211.0 |
| Node.js | v22.22.1 |
| GPU | NVIDIA GeForce RTX 4070 Ti SUPER |
| CPU | 32-core x86_64 (Alder Lake) |
| RAM | 32 GB (25+ GB free during issue) |
Mitigations attempted (no effect on freeze)
- Enabled Atlas GPU rendering engine in Windows Terminal (
useAtlasEngine: true,rendering.graphicsAPI: direct3d11) - Set
antialiasingMode: grayscalein Windows Terminal - Reduced MCP server count from 27 to ~15 (removed failed/broken servers)
- Verified system is not under load (99% CPU idle, 25 GB free RAM)
- Created
.wslconfigwithautoMemoryReclaim=dropcache
Additional context
- The rendering stack is Ink (React for CLI) + Yoga (WASM layout engine), confirmed via binary analysis
- System resources are not a factor — the machine is effectively idle during the freeze
- The freeze is consistent and reproducible on every prompt, not intermittent
- The WSL2 pipe between the CLI process and Windows Terminal likely amplifies the re-render cost, turning what might be a sub-frame flicker on native terminals into a visible 1-2 second pause
- Higher effort/thinking levels make the freeze more noticeable, possibly because more UI state updates occur
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗