[Screen reader mode] Attaching to a background session enters the alternate screen despite CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1
Description
Attaching to a background session, with claude attach or by going back from agent view to the current conversation, switches to the alternate screen even when CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 is set and screen reader mode is on. The accessibility page lists this among its known limitations; this issue asks for it to be lifted.
Steps to reproduce
- Set
CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1and start Claude Code in screen reader mode. - Send a prompt, then press Left Arrow on the empty prompt to open agent view.
- Press Escape to go back to the conversation.
Expected
The conversation stays on the main screen with the classic renderer, as CLAUDE_CODE_DISABLE_ALTERNATE_SCREEN=1 and screen reader mode both request.
Actual
The session is re-attached on the alternate screen, and stays there until it is detached.
Impact
Screen readers work poorly with the alternate screen: there is no scrollback, so a long answer can no longer be read from its beginning, and what screen reader mode keeps in the scrollback is out of reach. Since going back from agent view is enough to trigger it, it is easy to end up there.