claude-code - 💡(How to fix) Fix [BUG] Claude in Chrome: handshake fails even after full recovery (CLI 2.1.117, ext 1.0.69) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52735Fetched 2026-04-24 10:41:01
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Participants
Timeline (top)
labeled ×5

mcp__claude-in-chrome__* tools return "Browser extension is not connected" on every call, despite:

  • Claude Code CLI authenticated to the same org and email as the claude.ai Chrome session (verified via avatar menu + claude auth status)
  • Chrome extension installed, enabled, toggled OFF→ON
  • Chrome fully restarted (osascript quit + open -a)
  • Native messaging host respawned (new PID observed each toggle)
  • Local + Managed Extension Settings for the extension wiped
  • /tmp/claude-mcp-browser-bridge-*/*.sock cleaned
  • Logged out of claude.ai and back in, with matching account confirmed

Same-shape bug as #52559 (filed 2026-04-23). I can confirm the full recovery checklist from the community docs (toggle, storage wipe, Chrome restart, re-login) does not unblock it on CLI 2.1.117.

Error Message

So the MCP server registration succeeds. But the tool invocation itself (mcp__claude-in-chrome__tabs_context_mcp with no args) returns the "not connected" error verbatim. The failure is inside the native-host ↔ extension stdio dialogue, not at the MCP socket layer. The extension service worker's DevTools console would almost certainly show the actual rejection cause. Could the extension surface the handshake-refusal reason in the extension popup or in chrome.runtime.lastError? Right now the user-facing error message is fully generic and points at the three things that are demonstrably already correct (installed, enabled, logged into matching account).

Root Cause

mcp__claude-in-chrome__* tools return "Browser extension is not connected" on every call, despite:

  • Claude Code CLI authenticated to the same org and email as the claude.ai Chrome session (verified via avatar menu + claude auth status)
  • Chrome extension installed, enabled, toggled OFF→ON
  • Chrome fully restarted (osascript quit + open -a)
  • Native messaging host respawned (new PID observed each toggle)
  • Local + Managed Extension Settings for the extension wiped
  • /tmp/claude-mcp-browser-bridge-*/*.sock cleaned
  • Logged out of claude.ai and back in, with matching account confirmed

Same-shape bug as #52559 (filed 2026-04-23). I can confirm the full recovery checklist from the community docs (toggle, storage wipe, Chrome restart, re-login) does not unblock it on CLI 2.1.117.

Code Example

"mcp_servers":[
  ...,
  {"name":"claude-in-chrome","status":"connected"},
  ...
]

---

$ lsof -p <host-pid> | grep -E "sock|PIPE|unix"
2.1.117 <pid> user    0     PIPE ...  ->...   (stdin from extension)
2.1.117 <pid> user    1     PIPE ...  ->...   (stdout to extension)
2.1.117 <pid> user    4u    unix ...  /tmp/claude-mcp-browser-bridge-<user>/<pid>.sock
2.1.117 <pid> user    5     PIPE ...  ->...   (dup of fd 1)

---

$ lsof -U | grep claude-mcp-browser
2.1.117 <host-pid> user 4u unix ...  /tmp/claude-mcp-browser-bridge-<user>/<pid>.sock
# only the listening entry

---

~/Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts/
 com.anthropic.claude_browser_extension.json    (re-appears whenever Claude.app launches)
RAW_BUFFERClick to expand / collapse

Summary

mcp__claude-in-chrome__* tools return "Browser extension is not connected" on every call, despite:

  • Claude Code CLI authenticated to the same org and email as the claude.ai Chrome session (verified via avatar menu + claude auth status)
  • Chrome extension installed, enabled, toggled OFF→ON
  • Chrome fully restarted (osascript quit + open -a)
  • Native messaging host respawned (new PID observed each toggle)
  • Local + Managed Extension Settings for the extension wiped
  • /tmp/claude-mcp-browser-bridge-*/*.sock cleaned
  • Logged out of claude.ai and back in, with matching account confirmed

Same-shape bug as #52559 (filed 2026-04-23). I can confirm the full recovery checklist from the community docs (toggle, storage wipe, Chrome restart, re-login) does not unblock it on CLI 2.1.117.

Environment

FieldValue
OSmacOS Darwin 25.4.0
Claude Code CLI2.1.117 (native build, ~/.local/share/claude/versions/2.1.117)
BrowserGoogle Chrome (latest stable); Brave also installed
ExtensionClaude for Chrome 1.0.69_0, ID fcoeoabgfenejglbffodgkkbkcdhcgfn
Subscriptionpaid team plan

Key observation — MCP says connected, tool says not connected

When probed with claude --chrome -p "..." --output-format=stream-json --verbose, the init event reports:

"mcp_servers":[
  ...,
  {"name":"claude-in-chrome","status":"connected"},
  ...
]

So the MCP server registration succeeds. But the tool invocation itself (mcp__claude-in-chrome__tabs_context_mcp with no args) returns the "not connected" error verbatim. The failure is inside the native-host ↔ extension stdio dialogue, not at the MCP socket layer.

Native host state during failure

Host is alive with stdio PIPE to the Chrome extension AND a listening unix socket — but never receives an accepted client connection:

$ lsof -p <host-pid> | grep -E "sock|PIPE|unix"
2.1.117 <pid> user    0     PIPE ...  ->...   (stdin from extension)
2.1.117 <pid> user    1     PIPE ...  ->...   (stdout to extension)
2.1.117 <pid> user    4u    unix ...  /tmp/claude-mcp-browser-bridge-<user>/<pid>.sock
2.1.117 <pid> user    5     PIPE ...  ->...   (dup of fd 1)

No accepted client socket on the host. Each new claude --chrome -p probe also never opens a connection back to the socket:

$ lsof -U | grep claude-mcp-browser
2.1.117 <host-pid> user 4u unix ...  /tmp/claude-mcp-browser-bridge-<user>/<pid>.sock
# only the listening entry

So either the extension is rejecting the handshake before the host accepts, or the host is rejecting before listening accepts — but the extension → host stdio is definitely live (PIPEs active, otherwise the service worker wouldn't have spawned the host at all).

Steps attempted (none fixed it)

  1. chrome://extensions/ → Claude card → toggle OFF → verify ps aux | grep chrome-native-host is empty → toggle ON → new host spawns → claude --chrome → NOTCONNECTED
  2. osascript -e 'tell application "Google Chrome" to quit'open -a "Google Chrome" → new host spawns → NOTCONNECTED
  3. rm -rf "~/Library/Application Support/Google/Chrome/Default/Local Extension Settings/fcoeoabgfenejglbffodgkkbkcdhcgfn" + Managed Extension Settings + Chrome restart → new host → NOTCONNECTED
  4. Logout of claude.ai web, login back with the CLI account → refresh → NOTCONNECTED
  5. All of the above combined, in the sequence recommended by community docs → NOTCONNECTED

Every probe observes fresh PIDs: 5 consecutive respawned hosts over the session, each with a fresh unix socket. Fresh bridgeSessionId per CLI probe, so the stale-session-lock gotcha can be ruled out.

Secondary finding — Brave manifest auto-regenerates

Not a blocker here, but contributes to making the CLI integration hard to keep stable on a dual-browser macOS install where Claude.app is also present:

~/Library/Application Support/BraveSoftware/Brave-Browser/NativeMessagingHosts/
 com.anthropic.claude_browser_extension.json    (re-appears whenever Claude.app launches)

Any launch of /Applications/Claude.app regenerates that manifest in Brave (and Chrome) even if the user previously renamed it to .disabled. If Claude.app is also installed, the desktop native-messaging wrapper can intercept the extension from the wrong binary; users have to chase the manifest and rename it again. Making the manifest write idempotent against a .disabled sibling, or honouring a .claude-no-regen marker, would help.

What would help diagnose further

The extension service worker's DevTools console would almost certainly show the actual rejection cause. Could the extension surface the handshake-refusal reason in the extension popup or in chrome.runtime.lastError? Right now the user-facing error message is fully generic and points at the three things that are demonstrably already correct (installed, enabled, logged into matching account).

Related issues

  • #52559 — same-shape symptom, filed 2026-04-23
  • #47202 — --chrome flag: MCP client never connects to Chrome native host socket
  • #42344 — Chrome extension MCP tools report 'not connected' despite successful pairing (macOS, v2.1.90)
  • #40758, #38845, #36910 — earlier broken-handshake reports on 1.0.63

extent analysis

TL;DR

The "Browser extension is not connected" error may be due to a handshake issue between the native host and the Chrome extension, and debugging the extension's service worker or surfacing the handshake-refusal reason could help diagnose the issue.

Guidance

  • Investigate the extension's service worker using DevTools console to identify the actual rejection cause.
  • Consider adding error handling to surface the handshake-refusal reason in the extension popup or chrome.runtime.lastError.
  • Verify that the native host is correctly configured and that the unix socket is properly set up.
  • Review related issues (#52559, #47202, #42344, #40758, #38845, #36910) for potential solutions or workarounds.

Example

No code snippet is provided as the issue is more related to debugging and configuration rather than a specific code problem.

Notes

The issue seems to be specific to the interaction between the native host and the Chrome extension, and debugging the extension's service worker or adding error handling may help identify the root cause. The fact that the mcp__claude-in-chrome__* tools return "Browser extension is not connected" despite the extension being installed, enabled, and logged in suggests a handshake issue.

Recommendation

Apply a workaround by debugging the extension's service worker or adding error handling to surface the handshake-refusal reason, as this may help identify the root cause of the issue and provide a more specific solution.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Claude in Chrome: handshake fails even after full recovery (CLI 2.1.117, ext 1.0.69) [1 participants]