claude-code - 💡(How to fix) Fix [BUG] Scrollback duplication on terminal resize persists in 2.1.116 (VS Code integrated terminal, macOS) [5 comments, 4 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#51828Fetched 2026-04-23 07:43:53
View on GitHub
Comments
5
Participants
4
Timeline
15
Reactions
5
Author
Timeline (top)
commented ×5labeled ×5cross-referenced ×3subscribed ×2

The scrollback duplication on resize bug noted as fixed in v2.1.116 still reproduces in my environment. Each terminal resize during a Claude Code session pushes a full snapshot of the current TUI into terminal scrollback. Multiple resizes produce stacked duplicates of the splash screen / current view.

The fix from v2.1.116 ("Fixed scrollback duplication in inline mode where resizing the terminal or large output bursts would repeat earlier conversation history") appears to be incomplete for this environment combination.

Likely related to / possible duplicate of #18493.

Error Message

Error Messages/Logs

Root Cause

The scrollback duplication on resize bug noted as fixed in v2.1.116 still reproduces in my environment. Each terminal resize during a Claude Code session pushes a full snapshot of the current TUI into terminal scrollback. Multiple resizes produce stacked duplicates of the splash screen / current view.

The fix from v2.1.116 ("Fixed scrollback duplication in inline mode where resizing the terminal or large output bursts would repeat earlier conversation history") appears to be incomplete for this environment combination.

Likely related to / possible duplicate of #18493.

Fix Action

Workaround

Setting "tui": "fullscreen" in ~/.claude/settings.json eliminates the glitch (alt-screen renderer doesn't touch scrollback). However, scrolling inside fullscreen mode is line-by-line and feels noticeably laggier than native xterm.js scrolling, so it isn't a comfortable permanent solution for heavy terminal users.

Code Example

**Actual:** Scrollback contains multiple stacked duplicates of the Claude splash screen, separated by stray characters (e.g. `)`).

The bug appears on the splash screen with zero user input, ruling out hooks, statusline, or any per-turn behavior.
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?

Summary

The scrollback duplication on resize bug noted as fixed in v2.1.116 still reproduces in my environment. Each terminal resize during a Claude Code session pushes a full snapshot of the current TUI into terminal scrollback. Multiple resizes produce stacked duplicates of the splash screen / current view.

The fix from v2.1.116 ("Fixed scrollback duplication in inline mode where resizing the terminal or large output bursts would repeat earlier conversation history") appears to be incomplete for this environment combination.

Likely related to / possible duplicate of #18493.

Environment

  • Claude Code: 2.1.116
  • VS Code: 1.116.0 (integrated terminal, panel location)
  • OS: macOS 26 (Darwin 25.4.0)
  • Hardware: Apple Silicon
  • Shell: zsh (default macOS, minimal .zshrc — PATH exports only, no custom prompt)
  • Terminal font: JetBrainsMono Nerd Font Mono
  • TUI mode: default (the bug does not occur with tui: "fullscreen")

What Should Happen?

Expected: Scrollback shows whatever was in the shell before claude was launched.

Error Messages/Logs

**Actual:** Scrollback contains multiple stacked duplicates of the Claude splash screen, separated by stray characters (e.g. `)`).

The bug appears on the splash screen with zero user input, ruling out hooks, statusline, or any per-turn behavior.

Steps to Reproduce

Reproduction

  1. Open VS Code integrated terminal
  2. Run claude to start a fresh session
  3. Before sending any prompt, resize the terminal panel several times (drag the panel border, or toggle panel maximize)
  4. Scroll up in the terminal

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.116

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

Workaround

Setting "tui": "fullscreen" in ~/.claude/settings.json eliminates the glitch (alt-screen renderer doesn't touch scrollback). However, scrolling inside fullscreen mode is line-by-line and feels noticeably laggier than native xterm.js scrolling, so it isn't a comfortable permanent solution for heavy terminal users.

Ruled out (not the cause)

Exhaustively eliminated as causes:

  • VS Code terminal.integrated.gpuAcceleration (on, off, auto — same)
  • VS Code terminal.integrated.shellIntegration (disabled — same)
  • VS Code terminal.integrated.suggest.enabled (disabled — same)
  • VS Code terminal.integrated.stickyScroll.enabled (disabled — same)
  • VS Code terminal.integrated.smoothScrolling (disabled — same)
  • VS Code terminal.integrated.minimumContrastRatio (removed — same)
  • VS Code terminal.integrated.scrollback (varied 1000–20000 — only changes how long duplicates persist before aging out)
  • VS Code editor.accessibilitySupport: "on" (set to off — same)
  • Terminal font (swapped to Menlo — same)
  • Custom statusline (removed — same)
  • Custom hooks (logically excluded — they fire on Stop/Notification, but the bug appears pre-turn)
  • Plain zsh (no Claude) — resize + scroll works perfectly with all the above settings unchanged

Notes for triage

The bug only manifests when Claude Code is the running process. Same VS Code config + same shell with anything else (vim, less, plain zsh) behaves correctly. So the leak is in Claude Code's main-screen renderer's response to SIGWINCH, not in xterm.js or the shell.

extent analysis

TL;DR

The most likely fix for the scrollback duplication issue is to investigate and resolve the incomplete fix from v2.1.116, potentially related to the handling of SIGWINCH in Claude Code's main-screen renderer.

Guidance

  • Investigate the differences in handling SIGWINCH between the default and fullscreen TUI modes to identify the root cause of the issue.
  • Verify that the problem is indeed related to the fix from v2.1.116 and not a new issue by reviewing the changelog and release notes.
  • Consider temporarily using the fullscreen TUI mode as a workaround, despite its limitations, to mitigate the issue until a proper fix is found.
  • Review the code changes made in v2.1.116 to understand how the fix was intended to work and what might have been missed.

Example

No code snippet is provided as the issue is more related to the overall behavior of the application rather than a specific code block.

Notes

The issue seems to be specific to the combination of Claude Code, VS Code integrated terminal, and macOS environment. The fact that setting "tui": "fullscreen" eliminates the glitch suggests that the problem lies in the rendering of the TUI in default mode.

Recommendation

Apply the workaround by setting "tui": "fullscreen" in ~/.claude/settings.json until a proper fix is found, as it eliminates the scrollback duplication issue, albeit with some usability trade-offs.

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