fix(terminal): restore scrollback by reverting tmux alternate-screen overrides#479
Merged
Merged
Conversation
…overrides Commit a455855 added `alternate-screen off` and a `smcup@:rmcup@` terminal-override to get native trackpad scroll in tmux terminals. The side effect is that the Coding Agent's TUI redraws dump full-screen content into the scrollback buffer, causing disorienting jumps with duplicated content. Revert both settings so inner programs use their own alternate screen and scrollback stays clean. This re-accepts the trackpad-scroll regression (Ghostty converts scroll to arrow keys inside the alternate screen); users can navigate with Shift+scroll or the keyboard. Drop the two tests that asserted the reverted settings. Closes #395 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reverts the two tmux settings added in a455855 (
set -g alternate-screen offandset -ga terminal-overrides ',*:smcup@:rmcup@') that caused the Coding Agent's TUI redraws to pollute the scrollback buffer with duplicated full-screen content (#395).With these removed, inner programs use their own alternate screen normally and scrollback stays clean.
Tradeoff
This re-accepts the native trackpad-scroll regression that a455855 originally fixed: inside the alternate screen Ghostty converts scroll events to arrow keys, so trackpad scroll navigates within the TUI rather than the scrollback buffer. Per the discussion in #395, clean scrollback is the preferred behavior; users can navigate with Shift+scroll or the keyboard.
mouse offis left unchanged.Tests
Removed the two tests that asserted the reverted settings (
testConfigKeepsOuterTerminalOutOfAlternateScreen,testConfigDisablesPaneAlternateScreen). Full suite green:Executed 191 tests, 0 failures.Closes #395
🤖 Generated with Claude Code