[BUG] CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN turns off
Open 💬 0 comments Opened Jul 13, 2026 by carbon-steel
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN correctly disables alternate screen on startup but the alternate screen turns back on when switching to the agents view and back to the started session.
This problem also occurs sometimes when running claude code in a tmux instance and you detach and reattach to it.
What Should Happen?
When switching to the agents view and back into the original session, the TUI should be rendered using the CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN approach the sessions started as.
Error Messages/Logs
Steps to Reproduce
- Start claude with
CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 claude - Press your left arrow key to switch to agents view.
- Press enter to switch back to the session you started.
- The TUI then renders as though CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=0. Have claude print some text and you can see the difference when you scroll up.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.207 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
Terminal: kitty