Conversation content duplicates in scrollback after terminal resize (font-size / window-size)
Description
When the terminal font size or window size changes during an active Claude Code session, previously-rendered conversational content is duplicated multiple times in the scrollback instead of being reflowed cleanly. The buffer becomes nearly unreadable — the same text appears stacked with offset, rather than the pre-resize render being replaced with a reflowed version.
Environment
- macOS (Darwin 24.6.0)
- Shell: zsh
- Claude Code version: [please fill — run
claude --version] - Terminal: [please fill — iTerm2 / Terminal.app / Warp / etc.]
Steps to reproduce
- Start an interactive Claude Code session and accumulate some conversational history in the buffer
- Change the terminal font size (e.g., ⌘ +/-) or resize the terminal window mid-session
- Scroll back through the buffer
Expected behavior
Existing rendered content reflows to the new column width. Each message appears exactly once.
Actual behavior
Older conversational content appears multiple times in scrollback, with each copy offset by the resize event. The screen fills with layered duplicates of the same content. See attached screenshot.
Recovery that works
Ctrl+Loften forces a clean redraw in place/clearresets the visible buffer (but discards visible recent context)⌘K(iTerm2) clears scrollback entirely
Suspected cause
The TUI's resize/SIGWINCH handler appears to not be clearing (or overwriting) the pre-resize render before painting the reflowed version. The old render stays in scrollback alongside the reflowed render. Common class of TUI reflow bug; typically fixed by ensuring the alternate-screen buffer is fully repainted on the resize event or by emitting a clear-screen sequence as part of the handler.
Screenshot
[attach via drag & drop on the GitHub issue page]
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗