Add configurable scrollback/message limit to reduce TUI lag #7135

Open
opened 2026-02-16 18:06:16 -05:00 by yindo · 1 comment
Owner

Originally created by @shawnsw on GitHub (Jan 21, 2026).

Originally assigned to: @rekram1-node on GitHub.

Problem

Long chat histories cause the TUI to get slow when scrolling. There is currently no config option to cap scrollback length; docs only list scroll_speed/scroll_acceleration/diff_style.

Prior art

PR #4919 (closed, not merged) added opt-in config options like and to cap message history and sessions list. It seems to directly address this performance issue.

Proposed

Reintroduce a configurable scrollback/message limit (and optionally session list limit) via (integer or "none") in , with sensible defaults and no behavior change when unset.

Environment

macOS 26.12

References

Originally created by @shawnsw on GitHub (Jan 21, 2026). Originally assigned to: @rekram1-node on GitHub. ## Problem Long chat histories cause the TUI to get slow when scrolling. There is currently no config option to cap scrollback length; docs only list scroll_speed/scroll_acceleration/diff_style. ## Prior art PR #4919 (closed, not merged) added opt-in config options like and to cap message history and sessions list. It seems to directly address this performance issue. ## Proposed Reintroduce a configurable scrollback/message limit (and optionally session list limit) via (integer or "none") in , with sensible defaults and no behavior change when unset. ## Environment macOS 26.12 ## References - https://github.com/anomalyco/opencode/pull/4919 - https://opencode.ai/docs/config/ - https://opencode.ai/docs/tui/
yindo added the opentuiperf labels 2026-02-16 18:06:16 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 21, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #6137: Cannot scroll to beginning of long conversations (message limit hardcoded to 100) - directly addresses configurable message_limit in tui config
  • #6548: feat: virtualized scrolling + paginated message loading for long sessions - proposes virtualized rendering as a long-term solution for large histories
  • #4918: feature request: pagination for messages & sessions - requests pagination and message limits to prevent lag in long sessions
  • #6172: High CPU usage (100%+) during LLM streaming in long sessions due to O(n) text buffer rendering - identifies the underlying performance issue causing lag
  • #8947: [FEATURE]: TUI whole and LSP memory limits as part of configuration - requests memory constraints configuration to address memory/performance issues

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 21, 2026): This issue might be a duplicate of existing issues. Please check: - #6137: Cannot scroll to beginning of long conversations (message limit hardcoded to 100) - directly addresses configurable message_limit in tui config - #6548: feat: virtualized scrolling + paginated message loading for long sessions - proposes virtualized rendering as a long-term solution for large histories - #4918: feature request: pagination for messages & sessions - requests pagination and message limits to prevent lag in long sessions - #6172: High CPU usage (100%+) during LLM streaming in long sessions due to O(n) text buffer rendering - identifies the underlying performance issue causing lag - #8947: [FEATURE]: TUI whole and LSP memory limits as part of configuration - requests memory constraints configuration to address memory/performance issues Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7135