Session lost when switching between Code/Chat/Cowork tabs in claude.ai
Resolved 💬 3 comments Opened Feb 25, 2026 by Bjorn-Mby Closed Mar 25, 2026
Description
When using Claude Code via claude.ai's web interface, the Code session (conversation history and context) is lost when switching to the Chat or Cowork tab and then switching back. This means:
- Open a Code session and have an ongoing conversation with context
- Switch to the "Chat" or "Cowork" tab
- Switch back to the "Code" tab
- Result: The previous session is gone — context, conversation history, and any in-progress tasks are lost
- Expected: The Code session should persist across tab switches, or at minimum there should be a way to resume the most recent session
Impact
- Users lose track of multi-step tasks when accidentally switching tabs
- There's no warning that switching tabs will destroy the session
claude --resume/claude --continueis available in terminal but there's no equivalent recovery mechanism in the web UI- Session JSONL logs are saved locally but aren't easily resumable from the web interface
Reproduction
- Go to claude.ai
- Open the Code tab and start a conversation (have Claude make some edits or do research)
- Click on the "Chat" or "Cowork" tab
- Click back on the "Code" tab
- Observe that the previous conversation is gone
Environment
- Platform: claude.ai web interface (macOS)
- Claude Code version: latest (Feb 2026)
Suggested fix
Either:
- Preserve session state across tab switches (preferred)
- Auto-resume the most recent session when switching back to Code tab
- Show a confirmation dialog before destroying an active session ("You have an active Code session. Switching tabs will end it. Continue?")
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗