Description
In tmux sessions, scrollback content from early/middle portions of a conversation disappears after extended use (~20+ turns). Scrolling to the top still shows the Claude Code session header (icon, working directory, context size), but the conversation content between the header and the current viewport is missing.
Outside tmux (same terminal emulator, same session length), scrollback is fully intact.
Environment
- Terminal: Ghostty
- Shell: zsh
- tmux: yes (with
history-limit 50000)
- Claude Code model: Opus 4.6 (1M context)
- OS: macOS (Darwin 25.4.0)
Steps to reproduce
- Launch Claude Code inside a tmux session
- Have an extended conversation (20+ turns, or several long responses)
- Scroll to the top of the tmux pane
Expected behavior
Full conversation history visible in tmux scrollback, from session header through all turns.
Actual behavior
- Session header (Claude Code icon, folder, 1M context) is visible at the top
- Early/middle conversation turns are missing
- Scrollback picks up again somewhere in the middle or near the end
Analysis
This doesn't appear to be tmux buffer overflow — if the buffer overflowed, the header at the very top would be the first thing lost. Instead, the header is preserved and the middle content is gone, suggesting Claude Code's TUI is issuing terminal clear/redraw sequences during re-renders that tmux's scrollback captures as content removal. Outside tmux, Ghostty appears to handle these clear sequences differently (preserving scrollback).
The same conversation in a non-tmux Ghostty window retains full scrollback.
Description
In tmux sessions, scrollback content from early/middle portions of a conversation disappears after extended use (~20+ turns). Scrolling to the top still shows the Claude Code session header (icon, working directory, context size), but the conversation content between the header and the current viewport is missing.
Outside tmux (same terminal emulator, same session length), scrollback is fully intact.
Environment
history-limit 50000)Steps to reproduce
Expected behavior
Full conversation history visible in tmux scrollback, from session header through all turns.
Actual behavior
Analysis
This doesn't appear to be tmux buffer overflow — if the buffer overflowed, the header at the very top would be the first thing lost. Instead, the header is preserved and the middle content is gone, suggesting Claude Code's TUI is issuing terminal clear/redraw sequences during re-renders that tmux's scrollback captures as content removal. Outside tmux, Ghostty appears to handle these clear sequences differently (preserving scrollback).
The same conversation in a non-tmux Ghostty window retains full scrollback.