claude-in-chrome: WebSocket disconnects during long sessions, no auto-reconnect
Resolved 💬 3 comments Opened Feb 22, 2026 by myidentity Closed Feb 22, 2026
Description
The claude-in-chrome MCP connection drops intermittently during long Claude Code sessions (>30 minutes). Once disconnected, tabs_context_mcp returns "Browser extension is not connected" and there is no way to re-establish the connection without restarting both Claude Code and Chrome.
Steps to Reproduce
- Start a Claude Code session with the Chrome extension connected
- Use
mcp__claude-in-chrome__tabs_context_mcp— works fine - Continue working for 30-60 minutes (mix of Chrome tool calls and non-Chrome work)
- Call
mcp__claude-in-chrome__tabs_context_mcpagain — returns "Browser extension is not connected" - The Chrome extension is still running and visible in Chrome — it's the MCP WebSocket that dropped
Expected Behavior
- The MCP transport layer should detect the dropped WebSocket and auto-reconnect with exponential backoff
- If reconnection fails after N retries, surface a clear error with a manual reconnect option
- Tab group context should be recoverable after reconnection
Actual Behavior
- Connection silently drops with no retry
- All subsequent
mcp__claude-in-chrome__*calls fail - Only fix is to quit Claude Code and restart Chrome
- This happens consistently in sessions longer than ~30 minutes
Impact
For workflows that depend on browser automation (reading/writing page state, posting to localStorage, navigating), this forces frequent session restarts and breaks long-running tasks. The user has to manually restart both applications each time.
Environment
- Claude Code: latest (claude-opus-4-6)
- Chrome: latest stable, Linux (Ubuntu 24.04)
- The Chrome extension is installed, logged in, and shows as active in Chrome
Suggested Fix
Standard WebSocket reconnection with exponential backoff:
- Detect connection drop (heartbeat/ping-pong or error handler)
- Retry with backoff: 1s, 2s, 4s, 8s, 16s, max 30s
- Re-establish tab group context after reconnection
- Surface connection status to the user (e.g., "Reconnecting to Chrome...")
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗