[BUG] Claude in Chrome: account switch leaves extension permanently disconnected + stale 0.sock burns tokens in automated repair loop

Resolved 💬 3 comments Opened Mar 31, 2026 by msmobileapps Closed Apr 3, 2026

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

  1. Native host: Update 0.sock atomically on restart instead of creating a new {PID}.sock
  2. Account switch: When Claude Desktop switches accounts, send a native message to the Chrome extension to trigger automatic re-authentication
  3. Diagnostics: Log the current bridge userId on connection so tools can detect account mismatches early without trial-and-error

---

Steps to Reproduce

  1. Sign into Claude Desktop with account A, pair Chrome extension
  2. Switch Claude Desktop to account B (sign out + sign in, or account switch)
  3. Try any Chrome MCP tool → permanent No Chrome extension connected after discovery
  4. Restart Chrome → same error + 0.sock now stale
  5. Extension shows as 'connected' in Chrome toolbar but bridge pairing silently fails

Environment

  • macOS, Apple Silicon
  • Claude Desktop (Cowork mode) latest
  • Chrome extension fcoeoabgfenejglbffodgkkbkcdhcgfn v1.0.64
  • Account: michal@msapps.mobi

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗