Claude in Chrome: native host spawns but Claude Code CLI never attaches to bridge socket — "Browser extension is not connected" (macOS 26.2 + Chrome 148)
Summary
On macOS 26.2 with Chrome 148, the Claude in Chrome extension is installed, enabled, and active, but Claude Code consistently reports "Browser extension is not connected." Claude Desktop's browser integration works fine with the same extension on the same machine.
After extensive debugging, the extension does successfully spawn Claude Code's native messaging host and the host creates a listening socket — but no Claude Code CLI session ever attaches to that socket, including a freshly launched claude --chrome session. Everything that is configurable (native host manifest, claude.ai account, Chrome profile, host binary) is correct; the failure is in the native-messaging bridge handshake itself.
Environment
- OS: macOS 26.2 (build 25C56, Darwin 25.x), Apple Silicon
- Chrome: 148.0.7778.216
- Claude Code: 2.1.160
- Node: v24.12.0
- Claude in Chrome extension: 1.0.74 (installed/enabled in Chrome "Profile 1", which is the active/last-used profile)
- Extension ID:
fcoeoabgfenejglbffodgkkbkcdhcgfn - Both Claude Desktop and Claude Code installed
- claude.ai account on the extension matches the account Claude Code is authenticated with (verified)
What works
- Native host manifest present and valid:
~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json→~/.claude/chrome/chrome-native-host(executable) - The extension does trigger Chrome to spawn the native host. Verified process:
…/versions/2.1.160 --chrome-native-host, a child of the Chrome process, with live stdio pipes to Chrome (FDs 0/1) — i.e. the extension ↔ native host link is up - The native host creates a listening Unix socket:
/tmp/claude-mcp-browser-bridge-<user>/<host-pid>.sock(0600) - Claude Desktop's browser integration works correctly with the same extension
What doesn't work
- Any
mcp__claude-in-chrome__*tool /list_connected_browsers→ "Browser extension is not connected." lsofon the bridge socket shows only the native host holding it — no CLI client ever connects, even when actively invoking browser tools or running/chromein a--chromesession. Native hosts spawn and later die with no CLI ever attaching./chrome→ "select browser" throws:Couldn't list connected browsers: JSON Parse error: Unexpected identifier "Browser"— the CLI appears toJSON.parse()the plain-text"Browser extension is not connected…"error string (secondary error-handling bug).
Steps to reproduce
- Install both Claude Desktop and Claude Code on macOS 26.2 / Chrome 148.
- Install the Claude in Chrome extension (v1.0.74), signed into the same claude.ai account as Claude Code.
- Run
claude --chrome(or/chrome→ Reconnect). - Any browser tool returns "Browser extension is not connected."
Diagnostics / evidence
- Native host PPID = Chrome's PID; stdio pipes to Chrome present → extension↔host bridge is established.
- Listening socket
<host-pid>.sockcreated in/tmp/claude-mcp-browser-bridge-<user>/. lsof <socket>→ only the native host (2.1.160 … FD 6u unix …), never a CLI client.- Confirmed same claude.ai account on both sides.
- Confirmed extension is installed/enabled in the active Chrome profile (Profile 1 of 4).
Things tried (none resolved it)
- Applied the #20887 workaround: repointed the Desktop manifest (
com.anthropic.claude_browser_extension)path→ Claude Code's native host binary. Result: the extension then spawned Claude Code's native host (confirmed), socket created — but still no CLI attach. /chrome→ "Reconnect extension" multiple times.- Toggled the extension off/on in
chrome://extensions. - Fully quit & reopened Chrome multiple times.
- Reduced to a single Claude Code session (single-session limit, ref #26120) and retried.
- Killed stale native host processes and deleted the bridge socket dir for a clean slate, then reconnected.
- Launched a fresh
claude --chromesession from scratch — still "not connected."
Conclusion
Everything configurable is verified correct, and the extension↔native-host link is confirmed up. The break is specifically that the Claude Code CLI never connects to the native host's bridge socket, so the handshake never completes. This matches a cluster of unresolved reports on macOS 26 + recent Chrome: #31971 (macOS 26 + Chrome 145), #46658 (Chrome 147), #20663 (macOS 26.2). Filing fresh per the auto-close note on those.
Two concrete asks:
- Fix the bridge handshake (CLI not attaching to the native host socket) on macOS 26 / Chrome 148.
- Handle the non-JSON "not connected" response in
/chrome→ select browser so it doesn't throwJSON Parse error: Unexpected identifier "Browser".
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗