Claude in Chrome: orphaned Unix socket prevents reconnection on macOS

Resolved 💬 3 comments Opened Feb 16, 2026 by Ricardo-Dinucci Closed Feb 19, 2026

Bug Report: Claude in Chrome Extension - Orphaned Socket on macOS

Environment

  • OS: macOS Darwin 25.2.0
  • Claude Code Version: 2.1.42
  • Chrome Version: 144.0.7559.133
  • Extension: Claude in Chrome (fcoeoabgfenejglbffodgkkbkcdhcgfn)

Issue

After restarting the computer or Chrome, the chrome-native-host process dies but its Unix socket file remains in /tmp/claude-mcp-browser-bridge-<username>/. When Chrome respawns the native host, it creates a new socket with a new PID, but the MCP server (--claude-in-chrome-mcp) fails to discover and connect to it, returning "No Chrome extension connected" indefinitely.

Additionally, old --claude-in-chrome-mcp processes from previous Claude Code sessions accumulate (found 6 running simultaneously), potentially causing connection conflicts.

Root Cause

  1. Orphaned socket files: When chrome-native-host (e.g., PID 7455) dies, /tmp/claude-mcp-browser-bridge-<user>/7455.sock is not cleaned up
  2. MCP server doesn't re-scan: The MCP server doesn't dynamically discover new sockets after initialization
  3. Multiple MCP servers: Previous sessions leave --claude-in-chrome-mcp processes running, causing potential conflicts

Steps to Reproduce

  1. Have Claude Code + Chrome extension working normally
  2. Restart the computer (or kill Chrome)
  3. Reopen Chrome and Claude Code
  4. Run any mcp__claude-in-chrome__* tool
  5. Observe "No Chrome extension connected" error indefinitely

Workaround

# 1. Kill old MCP server processes (keep only current session)
ps aux | grep "claude-in-chrome-mcp" | grep -v grep
kill <old PIDs>

# 2. Kill native host and clean orphaned sockets
kill $(pgrep -f chrome-native-host)
rm /tmp/claude-mcp-browser-bridge-<username>/*.sock

# 3. Trigger Chrome to respawn native host (click extension icon in Chrome)

# 4. Restart MCP server (run /chrome in Claude Code)

Expected Behavior

  • Old socket files should be cleaned up automatically when the native host dies
  • The MCP server should periodically re-scan for new sockets or handle stale socket detection
  • Old --claude-in-chrome-mcp processes should be cleaned up when their parent Claude Code session ends

Diagnostics

# Check native host
ps aux | grep "chrome-native-host" | grep -v grep

# Check socket
ls -la /tmp/claude-mcp-browser-bridge-<username>/

# Check MCP servers (should be only 1)
ps aux | grep "claude-in-chrome-mcp" | grep -v grep | wc -l

Related Issues

  • #23218 - Similar connection issue on Windows (named pipe discovery bug)
  • #23828 - Windows named pipe fix

This is the macOS equivalent - the socket exists and the native host is running, but the MCP server cannot connect due to stale state.

View original on GitHub ↗

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