TUI duplicates rendered text in scrollback on long sessions (Windows + Linux)
Status Open
Reported on v2.1.119
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 13 comments · opened Apr 24, 2026
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:
- Long-running session with many
Bash/PowerShelltool calls that stream output - Status line + recap banners (
※ recap: ...) redraw - 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 onmode enabled - Recaps enabled (not yet disabled via
/config) - Final assistant message +
recapblock appears to be the block most often duplicated
Happy to share redacted transcript on request.
13 Comments
Likely same root cause as #52027 (open, filed 2026-04-22). That issue's author traced it to an Ink renderer layout-change flushing alt-screen buffer regions into scrollback after a modal overlay mount/unmount.
My Windows + Linux repros add evidence that:
⏵⏵ bypass permissions). Recap banner redraw (※ recap: ...) appears to trigger the same flush pathLeaving this open as companion repro for the Windows/Linux side; cross-linked on #52027.
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Workaround test results (Windows 10):
Tested three mitigations on Claude Code 2.1.119 — none resolved the duplication:
conhost.exeto Windows Terminal (latest from MS Store) → still duplicates"useAtlasEngine": falsein WTprofiles.defaults(cold restart of WT) → still duplicates/config→ still duplicatesExplicit trigger reproduced in all three configurations: resizing the terminal window mid-session causes recent scrollback to re-render into buffer 2–3× (identical content, offset by a few lines).
Also reproduced without any resize in long sessions (>200k tokens) with many streamed
Bash/PowerShelltool outputs.This reinforces @natefosterwarner's hypothesis in #52027: the issue is in the Ink renderer's layout-change handling (modal dismissal, recap banner mount/unmount, and window-resize all trigger the same flush-to-scrollback pathway). Terminal-side toggles cannot patch it.
Environment (unchanged from original report):
CLAUDE_CODE_NO_FLICKER=0(explicit; not set to 1 to avoid #42703)Final definitive workaround (Claude Code 2.1.119, Windows 10):
After testing every terminal-side and settings.json-side toggle, the only effective fix is the environment variable:
Set as a User environment variable on Windows (persists across sessions). Immediately stops scrollback duplication across all documented triggers (resize, long sessions, large tool outputs, modal dismissal). Activates the fullscreen alt-screen renderer.
What did NOT help (tested systematically):
conhost.exeto Windows Terminal"useAtlasEngine": falsein Windows Terminalprofiles.defaults/config("awaySummaryEnabled": false)"tui": "fullscreen"in~/.claude/settings.json— either not read by 2.1.119, or the env var overrides itTrade-off of the env-var fix (known):
@path.Suggestion for maintainers: the documented equivalence between
tui: "fullscreen"andCLAUDE_CODE_NO_FLICKER=1in the settings schema may not be wired up in 2.1.119 — the env var works, the settings key does not (at least alone) on this version.+1 reproducing on Windows 11 Pro 26200 + Git Bash, Claude Code 2.1.119, currently running with /think low effort mode.
Same symptoms as OP: long sessions with many sequential tool calls (Bash, Edit, Read) cause prior assistant messages and tool outputs to redraw / appear twice in scrollback. Especially noticeable after status-line/recap updates.
Happy to share an anonymized transcript if helpful.
Adding a fresh repro on Opus 4.7 / Claude Code (Windows 11):
A single short assistant message ("讀完了 🐰") was rendered 22 times in the TUI on session start. Triggered by:
The duplication happened on the very first assistant turn — not after long scrollback. Suggests the redraw loop is triggered per system-reminder / hook-context block, not by token count alone.
User counted 22 repeats manually. Will capture screenshot next occurrence.
I have the same problem on MacOS 26.4.1 (25E253) both in cmux and default Terminal apps.
2.1.123 (Claude Code)
I was able to reproduce this with a single question in a brand new window - you can see the "Mid-Season Fairness" header was printed 4 times: claude code duplicate output.txt
anthropic, it's kinda disorienting, we're waiting for you to fix it
same on ubuntu
Super annoying. At least give us easy way to downgrade back to working version.. I also went in ".claude" and checked that text duplicated in terminal does not appear twice in logs, so it is representation only issue, not something that model produced.
Resuming session would clear out duplicate lines, but this is very poor UX honestly. Claude was always writing way too much stuff for me to read and now it doubles it?
Hi @NatanaelRibF — Could you update the title to reflect that this bug is not platform-specific. Perhaps that will help the anthropic team prioritize a fix.
I can confirm that I'm suffering this issue in MacOS, latest two versions. I'm running claude code in Cmux, so this is really a cross-platform issue.