Terminal resize extremely slow in v2.1.15 (regression from 2.1.12)
Description
After upgrading from Claude Code CLI 2.1.12 to 2.1.15, terminal resize operations become extremely slow (6-7 seconds delay) when running Claude Code inside an embedded terminal environment.
Environment
- Claude Code version: 2.1.15 (issue), 2.1.12 (works fine)
- OS: Debian (Docker container based on python:3.11-slim)
- Terminal: xterm.js frontend connected via WebSocket to tmux session running Claude Code
- Node.js: 20.x
Steps to Reproduce
- Run Claude Code inside a tmux session in a Docker container
- Connect to the tmux session via WebSocket and render output in xterm.js
- Resize the browser window/terminal panel
- Observe significant delay (6-7 seconds) before the terminal updates
Expected Behavior
Terminal should resize almost instantly (as it does with v2.1.12).
Actual Behavior
With v2.1.15, there's a 6-7 second delay between resizing the window and the terminal content updating. The backend processes the resize command quickly (confirmed via logs), but Claude Code itself seems to delay the re-rendering.
Suspected Cause
Based on the changelog, v2.1.15 introduced "Improved UI rendering performance with React Compiler". This change may have altered how Claude Code handles terminal resize signals (SIGWINCH) or re-renders its UI.
Workaround
Downgrade to v2.1.12:
RUN npm install -g @anthropic-ai/claude-code@2.1.12
Additional Context
- The tmux session correctly propagates SIGWINCH to Claude Code
- Backend resize operations complete in milliseconds (verified via logs)
- The delay is specifically in Claude Code's response to the resize, not in the infrastructure
- v2.1.14 was not tested but may also work since it doesn't include the React Compiler change
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗