[BUG] Claude in Chrome: account switch leaves extension permanently disconnected + stale 0.sock burns tokens in automated repair loop
Bug Description
Two related bugs in the Claude-in-Chrome MCP integration that compound each other and cause significant token waste in automated workflows.
---
Bug 1: 0.sock symlink goes stale on every Chrome restart
Path: /tmp/claude-mcp-browser-bridge-{username}/0.sock
Every time Chrome restarts, the native host creates a new {PID}.sock file but the 0.sock symlink Claude Desktop uses is never updated. Every subsequent tool call fails with a ~70ms timeout until someone manually runs:
ln -sf {newPID}.sock /tmp/claude-mcp-browser-bridge-{username}/0.sock
This is a native host bug — it should update 0.sock atomically on startup.
---
Bug 2: Account switch leaves Chrome extension permanently disconnected with no auto-recovery
When Claude Desktop switches accounts, the bridge channel changes to wss://bridge.claudeusercontent.com/chrome/{newUserId}. The Chrome extension stays authenticated with the old account's bridge channel. They never find each other.
Log symptom (persistent):
[Claude in Chrome] connected=true, authenticated=true, wsState=1
[Claude in Chrome] Error calling tool: No Chrome extension connected after discovery
Only fix: User manually signs out and back into the Chrome extension UI.
---
Bug 3 (consequence): Automated repair tools burn massive tokens on unfixable steps
Because there's no early signal that an account switch caused the failure, automated tasks attempt CDP debug-profile re-auth (which can't work — debug profile has no session cookies), repeated Chrome restarts, socket fixes, etc. — wasting hundreds of tokens before giving up.
---
Requested Fixes
- Native host: Update
0.sockatomically on restart instead of creating a new{PID}.sock - Account switch: When Claude Desktop switches accounts, send a native message to the Chrome extension to trigger automatic re-authentication
- Diagnostics: Log the current bridge userId on connection so tools can detect account mismatches early without trial-and-error
---
Steps to Reproduce
- Sign into Claude Desktop with account A, pair Chrome extension
- Switch Claude Desktop to account B (sign out + sign in, or account switch)
- Try any Chrome MCP tool → permanent
No Chrome extension connected after discovery - Restart Chrome → same error + 0.sock now stale
- Extension shows as 'connected' in Chrome toolbar but bridge pairing silently fails
Environment
- macOS, Apple Silicon
- Claude Desktop (Cowork mode) latest
- Chrome extension
fcoeoabgfenejglbffodgkkbkcdhcgfnv1.0.64 - Account: michal@msapps.mobi
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗