claude-code - 💡(How to fix) Fix [BUG] claude --chrome reports "extension not connected" despite a healthy native messaging host [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#54932Fetched 2026-05-01 05:50:40
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
1
Participants
Timeline (top)
labeled ×5

Error Message

Error Messages/Logs

  1. Observe the error: "The Claude browser extension isn't connected."
  2. Run /chrome → "Reconnect extension" — same error persists.

Root Cause

Observed root cause hypothesis: Claude Code's session-side discovery/handshake to an existing, healthy bridge socket is not happening. The Chrome → extension → native-host half of the bridge is verifiably working end to end.

Code Example

The Claude browser extension isn't connected. Please ensure the Claude Chrome extension is installed (https://claude.ai/chrome), running, and logged in with the same account as Claude Code — you may need to restart Chrome.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Every browser command from claude --chrome returns "The Claude browser extension isn't connected." The Chrome extension is installed (v1.0.69, freshly reinstalled), enabled, signed in, and its own side-panel chat works correctly. The native messaging host is healthy: Chrome successfully spawns the host process when the extension activates, and it listens on its Unix socket. The failure is on the Claude Code session side — claude --chrome never opens a connection to the existing bridge socket.

What Should Happen?

Claude Code connects to the bridge socket exposed by the native messaging host and drives the browser via the extension. Browser commands like "open this URL" or "tell me what's on the page" should execute and return results.

Error Messages/Logs

The Claude browser extension isn't connected. Please ensure the Claude Chrome extension is installed (https://claude.ai/chrome), running, and logged in with the same account as Claude Code — you may need to restart Chrome.

Steps to Reproduce

  1. Install Claude Code 2.1.123 on macOS.
  2. Install the "Claude in Chrome" extension v1.0.69 from the Chrome Web Store; sign in.
  3. Confirm the extension's own side-panel chat works (proves extension is healthy).
  4. In a terminal: claude --chrome
  5. Ask: Open code.claude.com/docs and tell me the page title
  6. Observe the error: "The Claude browser extension isn't connected."
  7. Run /chrome → "Reconnect extension" — same error persists. Verified state during failure (all healthy):
  • Native host config at ~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json points to ~/.claude/chrome/chrome-native-host (which execs the 2.1.123 binary with --chrome-native-host).
  • pgrep -lf chrome-native-host shows the host process is alive, parent PID = Chrome.
  • lsof /tmp/claude-mcp-browser-bridge-<user>/<pid>.sock shows the host listening, zero clients.
  • lsof -p <claude --chrome PID> shows no FD on the bridge socket — the session never tries to connect.
  • The claude --chrome session was started 66 seconds AFTER the native host was up and listening, so timing is not the cause.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Unknown (was working in a previous version weeks ago; exact version not recalled)

Claude Code Version

2.1.123 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

I am using Termius terminal.

Environment details:

  • macOS Darwin 24.6.0
  • Google Chrome 147.0.7727.102
  • Claude in Chrome extension version 1.0.69 (clean reinstall)
  • Subscription: Claude Max (Anthropic plan)
  • Same email signed into both Claude Code and the extension
  • Claude desktop app (/Applications/Claude.app) is also installed and bundles its own /Applications/Claude.app/Contents/Helpers/chrome-native-host. It registers under the same native messaging host name (com.anthropic.claude_code_browser_extension) and previously hijacked the Chrome registration. After today's Claude Code 2.1.123 install the config points to Claude Code's wrapper, but the desktop app appears to fight for the same slot whenever it launches. Worth investigating whether Claude Code and Claude desktop should use distinct host names.

Things tried, none of which fixed the symptom:

  • Full Chrome quit (Cmd+Q) and relaunch.
  • Killing orphaned native-host processes from the desktop app and removing stale sockets in /tmp/claude-mcp-browser-bridge-<user>/.
  • Removing and reinstalling the Chrome extension; signing back in.
  • Starting a fresh claude --chrome session AFTER the bridge socket was already created and listening.
  • Quitting the Claude desktop app entirely.
  • Manually re-stamping ~/.claude/chrome/chrome-native-host to point at the 2.1.123 binary.

Observed root cause hypothesis: Claude Code's session-side discovery/handshake to an existing, healthy bridge socket is not happening. The Chrome → extension → native-host half of the bridge is verifiably working end to end.

extent analysis

TL;DR

The issue is likely due to Claude Code's session-side discovery or handshake failure with the existing bridge socket, and a potential workaround is to investigate the native messaging host configuration and ensure that Claude Code and the desktop app use distinct host names.

Guidance

  • Verify that the native messaging host configuration file com.anthropic.claude_code_browser_extension.json is correctly pointing to the Claude Code's chrome-native-host binary and not being overwritten by the desktop app.
  • Check if the desktop app is using the same native messaging host name as Claude Code, and consider using distinct host names to avoid conflicts.
  • Investigate the possibility of stale sockets or orphaned processes interfering with the connection and try removing them.
  • Try starting a fresh claude --chrome session after ensuring the bridge socket is created and listening.

Example

No code snippet is provided as the issue seems to be related to configuration and process management rather than code.

Notes

The issue is complex and may require further investigation to determine the root cause. The provided information suggests a potential conflict between Claude Code and the desktop app, but more debugging may be necessary to confirm.

Recommendation

Apply a workaround by investigating the native messaging host configuration and ensuring that Claude Code and the desktop app use distinct host names, as this may resolve the connection issue.

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 --chrome reports "extension not connected" despite a healthy native messaging host [1 participants]