claude-code - 💡(How to fix) Fix TUI re-renders full conversation history to terminal scrollback on each response, causing exponential scrollback growth

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

Version: Claude Code v2.1.113

Platform: Windows 10 Pro, Windows Terminal

Description:

On each new response, Claude Code appears to re-render the entire conversation to the terminal output buffer rather than appending only the new response. This causes the terminal scrollback to accumulate duplicate copies of the full conversation — one copy per exchange — each preceded by the startup splash screen.

Steps to reproduce:

  1. Start Claude Code in Windows Terminal
  2. Have a conversation with several exchanges
  3. Scroll up in the terminal scrollback past the beginning of the current visible session
  4. Observe a second copy of the conversation above the splash screen; scroll further to find more copies

Expected behavior: Scrolling past the start of the session reaches empty scrollback (or the previous terminal session). Each exchange appends only new content.

Actual behavior: The scrollback contains N full copies of the conversation for a session with N exchanges. Scrollback length grows quadratically, making it very difficult to navigate to a specific point in a long conversation by dragging the scrollbar.

Impact: In long conversations, the scrollback becomes many times longer than the actual conversation, making backward navigation impractical.

extent analysis

TL;DR

The issue can be mitigated by modifying the rendering logic of Claude Code to append only new responses to the terminal output buffer instead of re-rendering the entire conversation.

Guidance

  • Investigate the rendering logic of Claude Code to identify where the entire conversation is being re-rendered on each new response.
  • Consider implementing a mechanism to track the current state of the conversation and only append new responses to the terminal output buffer.
  • Review the Windows Terminal settings to ensure that the terminal scrollback is not being inadvertently duplicated or buffered.
  • Test the conversation flow with a small number of exchanges to verify that the issue is indeed related to the rendering logic.

Example

No code snippet is provided as the issue does not contain sufficient technical details about the rendering logic of Claude Code.

Notes

The issue may be specific to the Windows Terminal platform, and the behavior may vary on other platforms. Additionally, the root cause of the issue may be related to the implementation of the conversation rendering logic in Claude Code.

Recommendation

Apply a workaround by modifying the rendering logic of Claude Code to append only new responses to the terminal output buffer, as this is likely to address the issue directly.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix TUI re-renders full conversation history to terminal scrollback on each response, causing exponential scrollback growth