Chrome MCP: CLI holds stale unix socket after native host restart, never reconnects
Description
When using Chrome browser automation via local unix sockets (feature flag tengu_copper_bridge is OFF), the CLI establishes a connection to the native host's unix socket at startup. If Chrome restarts the native host process (new PID, new socket file), the CLI continues holding the dead socket connection and never reconnects to the new one. All subsequent browser tool calls return "Browser extension is not connected."
Restarting the CLI session (claude --chrome) does not reliably fix the issue because the native host may restart again during the session.
Root Cause (verified with lsof)
# Native host (launched by Chrome, PID 42735) listens on NEW socket:
node 42735 user 12u unix 0xc58b49c70d549908 /tmp/claude-mcp-browser-bridge-user/42735.sock
# CLI (PID 42652) still connected to OLD dead socket peer:
node 42652 user 21u unix 0x727c3f8dd71319fa ->0xcc09c712d2a57d61 (dead peer, no process owns it)
The CLI's socket fd points to 0xcc09c712d2a57d61 which belongs to a previous native host process that no longer exists. The current native host's socket (0xc58b49c70d549908) has zero connected clients.
Steps to Reproduce
- Start CLI:
claude --chrome - Verify Chrome tools work:
tabs_context_mcpreturns tabs - Kill native host:
kill $(pgrep -f chrome-native-host)(or wait for Chrome to restart it naturally) - Chrome respawns native host with new PID → new socket file appears in
/tmp/claude-mcp-browser-bridge-<user>/ - Call any Chrome tool → "Browser extension is not connected"
- Verify with
lsof -p <CLI_PID> | grep unix— CLI holds stale socket connection
Key Observations
- No separate
--claude-in-chrome-mcpprocess in v2.1.50 (npm install). MCP server is inline in the CLI process. getSocketPaths(b94()) is passed as a callback to the MCP server, suggesting periodic re-scanning was intended, but it doesn't trigger reconnection in practice.- After killing the native host, Chrome does not automatically respawn it. The extension's service worker needs to be triggered (e.g., by opening the side panel or reloading the extension).
tengu_copper_bridgeflag is OFF (not in statsig cache) → local unix socket mode, not cloud bridge. The cloud bridge workaround from #24784 does not apply.
Expected Behavior
- CLI should detect dead socket connections and reconnect to new native host sockets
getSocketPathsshould be polled periodically to discover new sockets- Stale socket connections should be detected and cleaned up
Environment
- Claude Code: 2.1.50 (npm,
@anthropic-ai/claude-code) - macOS 15.4 (Darwin 25.3.0, Apple Silicon)
- Chrome extension: 1.0.54 (
fcoeoabgfenejglbffodgkkbkcdhcgfn) - Node: v22.12.0
Related Issues
- #24784 — cloud bridge root cause (different scenario,
tengu_copper_bridgeON) - #25992 — orphaned socket prevents reconnection (closed as dup of #24913)
- #26347 — MCP process stale mid-session, kill deregisters tools
- #26449 — extension disconnects mid-session (closed as dup of #26347)
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗