claude-code - 💡(How to fix) Fix TUI duplicates rendered text in scrollback on long sessions (Windows + Linux) [4 comments, 2 participants]

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…
GitHub stats
anthropics/claude-code#52924Fetched 2026-04-25 06:17:05
View on GitHub
Comments
4
Participants
2
Timeline
16
Reactions
0
Timeline (top)
cross-referenced ×5labeled ×5commented ×4mentioned ×1
RAW_BUFFERClick to expand / collapse

Bug: TUI duplicates rendered text as scrollback grows (both Windows + Linux)

Version: Claude Code 2.1.119 Platforms reproduced:

  • Windows 10 Pro 19045 — Windows Terminal + Git Bash
  • Linux (terminal emulator)

Symptoms: After a session runs long (~300k+ tokens, many tool calls), previously-printed output starts duplicating in the scrollback — same assistant message and bash/powershell output appears twice, sometimes offset by a few lines. Makes re-reading prior analysis very hard.

Repro steps:

  1. Long-running session with many Bash / PowerShell tool calls that stream output
  2. Status line + recap banners (※ recap: ...) redraw
  3. Scroll up — previous outputs visible twice

Expected: Each message rendered exactly once in scrollback.

Extra context:

  • Happens independently of terminal font (observed with Consolas on Windows and default on Linux)
  • Happens with ⏵⏵ bypass permissions on mode enabled
  • Recaps enabled (not yet disabled via /config)
  • Final assistant message + recap block appears to be the block most often duplicated

Happy to share redacted transcript on request.

extent analysis

TL;DR

Disabling recaps or reducing the number of tool calls in a session may help mitigate the duplication of rendered text in the scrollback.

Guidance

  • Investigate the relationship between the number of tool calls and the duplication issue, as the problem occurs after a long session with many Bash / PowerShell tool calls.
  • Try disabling recaps via /config to see if it prevents the duplication of rendered text.
  • Verify if the issue persists when using a different terminal emulator or font, to rule out any terminal-specific issues.
  • Consider sharing a redacted transcript to further analyze the problem and identify any patterns or triggers for the duplication.

Example

No code snippet is provided as the issue is related to the behavior of the Claude Code application and its interaction with the terminal emulator.

Notes

The issue may be related to the way Claude Code handles the rendering of output and the management of the scrollback buffer. Further investigation is needed to determine the root cause of the problem.

Recommendation

Apply workaround: Disable recaps via /config to see if it mitigates the issue, as it is a potential contributor to the problem and can be easily tested.

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