IssueRaiser

Excessive scroll events causing UI jitter in terminal multiplexers (4,000-6,700 scrolls/second)

## Summary Claude Code's streaming output causes **4,000-6,700 scroll events per second** when running inside terminal multiplexers (tmux/smux), resulting in severe UI jitter and flickering. This issue was identified through comprehensive instrumentation of a tmux fork (smux) with microsecond-precision logging. ## Problem Description When Claude Code streams LLM responses, it causes excessive terminal scrolling that overwhelms the rendering capability of terminal multiplexers, creating a poor user experience with: - **Visual jitter/flickering** during streaming output - **Scrollbar jumping** erratically - **Screen tearing** effects - **Degraded performance** for 100+ second durations ## Root Cause Analysis ### Measured Metrics (106-second test session) - **Total scroll events**: 423,575 (logged) / 715,901 (counter) - **Scroll rate**: 4,002-6,764 scrolls/second - **PTY read callbacks**: 8,044 (avg 4,095 bytes each) - **Linefeeds parsed**: 400,930 (3,782/second) - **Burst pattern**: 94.7% of scrolls occur in sub-millisecond bursts ### Timing Analysis ``` Scroll burst example: - Scrolls #1-36: All within 144 microseconds - Scroll #37: 1.26 second gap - Scrolls #38-45: Burst of 8 in 1.7ms - Scroll #46: 2.27 second gap - Scrolls #47-50: Burst of 4 in microseconds ``` **Sub-millisecond scroll timing** (first 1,000 scrolls): - Same microsecond: 4.6% - 0-1ms apart: **94.7%** - 1-10ms apart: 0.1% - >10ms apart: 0.6% ### Data Pattern Claude Code sends output in **4,095-byte

Posted by rinadelph on Oct 20, 2025, 12:34 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

ux (Other)

Excessive scroll events causing UI jitter in terminal multiplexers (4,000-6,700 scrolls/second)

rinadelphOct 20, 2025, 12:34 AM

## Summary Claude Code's streaming output causes **4,000-6,700 scroll events per second** when running inside terminal multiplexers (tmux/smux), resulting in severe UI jitter and flickering. This issue was identified through comprehensive instrumentation of a tmux fork (smux) with microsecond-precision logging. ## Problem Description When Claude Code streams LLM responses, it causes excessive terminal scrolling that overwhelms the rendering capability of terminal multiplexers, creating a poor user experience with: - **Visual jitter/flickering** during streaming output - **Scrollbar jumping** erratically - **Screen tearing** effects - **Degraded performance** for 100+ second durations ## Root Cause Analysis ### Measured Metrics (106-second test session) - **Total scroll events**: 423,575 (logged) / 715,901 (counter) - **Scroll rate**: 4,002-6,764 scrolls/second - **PTY read callbacks**: 8,044 (avg 4,095 bytes each) - **Linefeeds parsed**: 400,930 (3,782/second) - **Burst pattern**: 94.7% of scrolls occur in sub-millisecond bursts ### Timing Analysis ``` Scroll burst example: - Scrolls #1-36: All within 144 microseconds - Scroll #37: 1.26 second gap - Scrolls #38-45: Burst of 8 in 1.7ms - Scroll #46: 2.27 second gap - Scrolls #47-50: Burst of 4 in microseconds ``` **Sub-millisecond scroll timing** (first 1,000 scrolls): - Same microsecond: 4.6% - 0-1ms apart: **94.7%** - 1-10ms apart: 0.1% - >10ms apart: 0.6% ### Data Pattern Claude Code sends output in **4,095-byte

Comments (0)

No comments yet. Start the discussion.

Comment on this issue