claude-code - 💡(How to fix) Fix [BUG] Duplicate / flickered output in terminal scrollback on long sessions (classic renderer) [2 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#52825Fetched 2026-04-25 06:19:54
View on GitHub
Comments
2
Participants
2
Timeline
11
Reactions
0
Timeline (top)
cross-referenced ×4labeled ×4commented ×2renamed ×1

Error Message

Error Messages/Logs

Fix Action

Fix / Workaround

  1. To verify the workaround: edit ~/.claude/settings.json and add "tui": "fullscreen", restart Claude Code, repeat steps 3–5. The flicker/duplication disappears, but
    the native terminal scrollbar is gone and mouse-wheel scrolling becomes jittery (line-stepped in an alt-screen buffer).
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

On long sessions (~150k+ transcript tokens) in Claude Code 2.1.119 on macOS Max plan, the classic renderer (tui: "default") re-prints the visible assistant block into terminal scrollback on every update instead of overwriting it in place. The result is a duplicated / flickering UI — the same response appears stacked in scrollback multiple times, and token-heavy turns visibly redraw.

Reproduced in both Warp and macOS Terminal.app, so this is not a terminal-emulator issue. Setting tui: "fullscreen" eliminates the flicker, but removes the native terminal scrollbar and makes mouse-wheel scrolling jittery.

Secondary: when auto-compact eventually fires, it shows a visible compacting conversation status and freezes the UI for ~3 minutes (no input, no scroll, no cancel) on a Max plan — I've seen the same plan/version behave very differently on other accounts (no visible compaction, transcript self-trims in the background), which suggests a rolling/invisible-compact path exists but is not active on mine.

Things I tried (no effect on flicker or compact behavior):

  • Toggling CLAUDE_CODE_ENABLE_COMPACT_INSTRUCTIONS true/false
  • Tuning autoCompactWindow (300k / 500k / 900k)
  • Removing all third-party plugins
  • Only tui: "fullscreen" masks the flicker, at the scrollbar/smoothness cost.

What Should Happen?

  1. The classic renderer should overwrite the assistant block in place even when the block exceeds the terminal viewport, so long sessions don't duplicate output into scrollback.

  2. The fullscreen renderer should preserve a usable scrollbar and smooth mouse-wheel scrolling, so choosing it doesn't mean sacrificing scrollback ergonomics.

  3. Auto-compact should not freeze the UI for minutes on a Max plan. If an invisible/rolling compact path exists (as appears to be the case for some accounts), it should be the default, or at minimum the rollout criteria should be documented and the current state visible via /status or --debug.

Error Messages/Logs

Steps to Reproduce

  1. On macOS (tested on Warp and Terminal.app, Claude Code 2.1.119, Max plan), run claude in any project directory.

  2. Make sure ~/.claude/settings.json has "tui": "default" (or omit the key — classic renderer is the default).

  3. Start a normal coding session. Keep working until the transcript grows to roughly 150k+ tokens — e.g. ~10–15 file reads of medium-sized source files, a handful of
    Grep/Glob calls, and 5–10 assistant turns with tool use.

  4. Send another message that triggers a multi-tool assistant response (e.g. "read these 3 files and summarize them"). Watch the assistant block as it streams.

  5. Scroll the terminal up after the turn finishes.

Expected: The assistant's latest block appears once in terminal history; previous content is overwritten in place during streaming.

Actual: The assistant block has been re-printed into scrollback multiple times — the same response text appears stacked 2–4 times as you scroll up. Tool-use blocks and
status lines also show visible flicker/redraw during the turn. The duplication is persistent in the terminal scrollback, not a transient render artifact.

  1. To verify the workaround: edit ~/.claude/settings.json and add "tui": "fullscreen", restart Claude Code, repeat steps 3–5. The flicker/duplication disappears, but
    the native terminal scrollbar is gone and mouse-wheel scrolling becomes jittery (line-stepped in an alt-screen buffer).

  2. To see the secondary issue: keep using the same session without restarting until auto-compact triggers on its own. A compacting conversation status line appears at the bottom and the UI freezes for ~3 minutes with no input, scroll, or cancel accepted. After it finishes, the transcript still scrolls all the way back to the first user message of the session (no visible trimming).

Notes:

  • Reproduces in both Warp and macOS Terminal.app, so it is not terminal-specific.
  • Reproduces with all third-party Claude Code plugins disabled.
  • CLAUDE_CODE_ENABLE_COMPACT_INSTRUCTIONS (true/false) and autoCompactWindow values (300k / 500k / 900k) do not affect either symptom.

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

No response

Claude Code Version

2.1.119

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

<img width="2868" height="1536" alt="Image" src="https://github.com/user-attachments/assets/461a22db-5466-4287-8d3b-531d762049aa" />

extent analysis

TL;DR

The issue can be temporarily mitigated by setting "tui": "fullscreen" in the Claude Code settings, but this introduces other usability issues.

Guidance

  • The problem seems to be related to the rendering of the assistant block in the terminal, specifically with the classic renderer ("tui": "default").
  • To verify the issue, follow the steps to reproduce provided in the issue description.
  • Try adjusting the autoCompactWindow value to see if it affects the auto-compact behavior, although the issue reporter mentions that this did not have an effect.
  • Investigate the difference in behavior between the Max plan on different accounts to understand why the invisible/rolling compact path is not active on the reporter's account.

Example

No code snippet is provided as the issue is related to the behavior of the Claude Code application rather than a specific code snippet.

Notes

The issue is specific to the macOS platform and the Opus Claude model, and it has never worked as expected. The reporter has tried various workarounds, including toggling CLAUDE_CODE_ENABLE_COMPACT_INSTRUCTIONS and adjusting autoCompactWindow, without success.

Recommendation

Apply the workaround by setting "tui": "fullscreen" in the Claude Code settings, despite its usability drawbacks, until a more permanent solution is found. This is because it currently masks the flicker issue, even though it introduces other problems.

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