[BUG] Duplicate / flickered output in terminal scrollback on long sessions (classic renderer)

Resolved 💬 3 comments Opened Apr 24, 2026 by berkeakgnnn Closed May 28, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] 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.

  1. The fullscreen renderer should preserve a usable scrollbar and smooth mouse-wheel scrolling, so choosing it doesn't mean sacrificing scrollback ergonomics.
  1. 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.
  1. Make sure ~/.claude/settings.json has "tui": "default" (or omit the key — classic renderer is the default).
  1. 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.

  1. 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.
  1. 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).

  1. 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" />

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗