[BUG] Messages disappear when switching tabs while response is streaming
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?
When Claude is streaming a response (orange loading indicator / "wrangling..." status visible),
switching to another tab causes both the sent message and the in-progress response to completely
disappear upon returning to the tab. The conversation rolls back as if the message was never sent.
This has happened multiple times in the same session under the same conditions.
I attached Claude Code generated bug report below. Thank you.
Environment
- OS: macOS
- Interface: claude.ai/code (web app)
Steps to Reproduce
- Send a message to Claude
- Wait until the streaming/loading indicator appears (orange text)
- Switch to another tab
- Return to the Claude Code tab
Additional Context
- Suspected cause: browser drops the streaming connection when tab becomes inactive;
on return, UI fails to recover the lost state
- Workaround: wait for response to fully complete before switching tabs
What Should Happen?
The sent message and the completed (or partially completed) response should still be visible
after returning to the tab. At minimum, the user's sent message should be preserved even if
the streaming was interrupted.
Error Messages/Logs
No error messages displayed. The messages silently disappear with no console errors shown.
Steps to Reproduce
- Open Claude Code web app (claude.ai/code) on macOS
- Start a conversation and send a message
- Wait until the orange streaming indicator appears (Claude is generating a response)
- Switch to a different browser tab or application window
- Return to the Claude Code tab
Result: Both the sent message and Claude's response are gone. The conversation appears
to have reverted to the state before the message was sent.
Note: This has occurred multiple times in the same session under identical conditions.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Claude Code version: 2.1.92
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
I'm using Claude Desktop app (macOS) with Claude Code running inside it
This issue has been observed multiple times within the same session. The message disappears
silently with no error shown — making it easy to miss that the message was lost.
A workaround is to wait until the streaming response fully completes before switching tabs.
The full bug report was generated by Claude Code itself and is included above.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗