Feature: keep the transcript in main-screen scrollback after exit while staying in fullscreen TUI
Environment
- Claude Code: 2.1.246
- macOS (Darwin 25.6.0), zsh
~/.claude/settings.json:"tui": "fullscreen"
Request
I want to keep the fullscreen renderer during the session, but not have the terminal wiped when the session ends. Today, exiting via /exit restores the primary screen and the whole conversation disappears from the terminal — there is nothing left to skim, copy, or Cmd+F after the fact.
The two documented options are all-or-nothing:
"tui": "fullscreen": nice in-session UI, transcript gone on exit"tui": "classic": transcript stays in scrollback, but gives up fullscreen entirely
What's missing is the middle ground: on teardown, before/after leaving the alternate screen buffer, emit the rendered conversation to the main screen so it lands in native scrollback. This is the normal expectation for a long-lived REPL-ish tool, and it's how Claude Code behaved before the alt-screen switch.
Suggested shape
Any of these would solve it:
- don't wipe out the screen by default, or
- a setting like
"tuiPreserveScrollbackOnExit": true(or a thirdtuimode)
Rendering could reuse whatever transcript mode (Ctrl+O) already produces.
Relation to existing issues
#42670 covered in-session scrollback loss and was closed once CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN / the tui setting landed. That fix works only by leaving fullscreen, so it doesn't address this case. A comment on that issue asked for the same thing — "a third mode that does alt-screen rendering but still emits lines to main-screen scrollback" — but it was never split out into its own request. Filing that here.