claude-code - 💡(How to fix) Fix Terminal resize causes duplicated/corrupted output in tmux (regression in 2.1.116) [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#52309Fetched 2026-04-24 06:10:36
View on GitHub
Comments
2
Participants
2
Timeline
9
Reactions
1
Timeline (top)
labeled ×5commented ×2cross-referenced ×1subscribed ×1

Root Cause

  • The issue affects all sessions equally, but is more visible in short/new sessions where the duplicated content is near the top of scrollback.
  • The fullscreen (alt-screen) renderer is unaffected because it uses a virtualized scrollback that doesn't capture intermediate redraws.
  • Tested across multiple Claude Code versions (2.1.104, 2.1.110, 2.1.113, 2.1.114 all work; 2.1.116, 2.1.117 all break).

Fix Action

Fix / Workaround

Workarounds

RAW_BUFFERClick to expand / collapse

Bug Description

Terminal resize in tmux causes duplicated/corrupted output with the main-screen (default) renderer. Each resize event (e.g., iOS keyboard show/hide) produces garbled, repeated content in the terminal. The output appears split and puzzle-like, making it unreadable.

Bisect Result

  • 2.1.114 (Apr 18): works correctly
  • 2.1.115: does not exist on npm
  • 2.1.116 (Apr 21): broken
  • 2.1.117: broken

The regression was introduced in 2.1.116.

Environment

  • OS: Linux (Arch, Docker container)
  • Terminal: xterm.js (web terminal) inside tmux 3.6a
  • TERM: xterm-256color
  • Shell: zsh
  • Renderer: default (main-screen)

Steps to Reproduce

  1. Run Claude Code inside tmux (default main-screen renderer, no tui: "fullscreen")
  2. Resize the terminal (e.g., toggle iOS virtual keyboard, or resize the terminal window)
  3. Observe duplicated/scrambled output in the terminal

Each keyboard show/hide adds a large number of lines to tmux scrollback (full session redraw captured as scrollback), and the visible output becomes corrupted.

Expected Behavior

Terminal resize should cleanly redraw the current frame without duplicating or corrupting output (as it does in 2.1.114 and earlier).

Workarounds

  • Pin to 2.1.114 (last working version)
  • Set "tui": "fullscreen" in ~/.claude/settings.json (uses alt-screen renderer, avoids the issue but changes UX)

Additional Context

  • The issue affects all sessions equally, but is more visible in short/new sessions where the duplicated content is near the top of scrollback.
  • The fullscreen (alt-screen) renderer is unaffected because it uses a virtualized scrollback that doesn't capture intermediate redraws.
  • Tested across multiple Claude Code versions (2.1.104, 2.1.110, 2.1.113, 2.1.114 all work; 2.1.116, 2.1.117 all break).

extent analysis

TL;DR

Pin to version 2.1.114 or set "tui": "fullscreen" in ~/.claude/settings.json to avoid the terminal resize issue.

Guidance

  • The issue is caused by a regression introduced in version 2.1.116, so using an earlier version like 2.1.114 should resolve the problem.
  • Setting "tui": "fullscreen" in the settings file changes the renderer to alt-screen, which is not affected by the issue, but this changes the user experience.
  • To verify if the issue is resolved, resize the terminal after applying the workaround and check if the output is redrawn cleanly without duplication or corruption.
  • If you need to use a version newer than 2.1.114, consider testing the fullscreen renderer as a temporary workaround.

Notes

The provided workarounds are based on the bisect result and the behavior of the fullscreen renderer. The root cause of the regression is not specified, so these suggestions are based on the observed behavior and the versions affected.

Recommendation

Apply the workaround by pinning to version 2.1.114, as it is the last known working version and does not alter the user experience.

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