claude-code - 💡(How to fix) Fix Chrome extension calls wrong native messaging host when both Claude Desktop and Claude Code are installed

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…

Fix Action

Workaround

None. Browser automation from Claude Code CLI is unusable on this machine.

Code Example

$ ps aux | grep chrome-native
   morimoto 55277 ... /Applications/Claude.app/Contents/Helpers/chrome-native-host \
       chrome-extension://fcoeoabgfenejglbffodgkkbkcdhcgfn/
RAW_BUFFERClick to expand / collapse

Environment

  • OS: macOS Darwin 25.5.0
  • Claude Code: 2.1.143
  • Claude in Chrome extension: 1.0.70 (Beta), ID fcoeoabgfenejglbffodgkkbkcdhcgfn
  • Chrome: latest as of 2026-05-17
  • Claude Desktop app: installed (Claude.app present in /Applications)

Symptoms

After running /chrome → "Reconnect extension" in a claude --chrome session, any mcp__claude-in-chrome__* tool call (e.g. tabs_context_mcp) returns:

Browser extension is not connected. Please ensure the Claude browser extension is installed and running (https://claude.ai/chrome), and that you are logged into claude.ai with the same account as Claude Code...

This persists across full Chrome restarts, extension reloads, and Claude Code restarts. The user is logged into claude.ai with the same account.

Observations from diagnosis

  1. The Chrome extension itself is healthy: Service Worker is active, console shows no errors/warnings, permissions include "Communicate with cooperating native applications".

  2. When /chrome Reconnect is triggered, Chrome spawns the Desktop native host, not the Code one:

    $ ps aux | grep chrome-native
    morimoto 55277 ... /Applications/Claude.app/Contents/Helpers/chrome-native-host \
        chrome-extension://fcoeoabgfenejglbffodgkkbkcdhcgfn/

    The Desktop host listens briefly on /tmp/claude-mcp-browser-bridge-morimoto/<pid>.sock then receives EOF from Chrome and shuts down within seconds.

  3. The Claude Code native host (/Users/morimoto/.claude/chrome/chrome-native-host, configured at ~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json) is never invoked.

  4. Both native messaging host config files have the same extension in allowed_origins:

    • com.anthropic.claude_browser_extension.json → Desktop binary, allowed_origins contains fcoeoabgfenejglbffodgkkbkcdhcgfn
    • com.anthropic.claude_code_browser_extension.json → CLI wrapper, allowed_origins contains fcoeoabgfenejglbffodgkkbkcdhcgfn
  5. Workaround experiment: when com.anthropic.claude_browser_extension.json is temporarily renamed away, Reconnect now spawns the CLI native host correctly (it listens on a socket). However, the running claude --chrome CLI process never opens that socket, so tabs_context_mcp still reports "not connected".

Expected behaviour

When Reconnect is initiated from a Claude Code CLI session, the extension should invoke com.anthropic.claude_code_browser_extension, not com.anthropic.claude_browser_extension. Currently the extension appears to choose the Desktop host whenever it is present, ignoring CLI sessions.

Reproduction

  1. Install Claude Desktop app and Claude Code CLI on macOS.
  2. Install Claude in Chrome extension v1.0.70.
  3. claude --chrome (CLI session boots).
  4. Run /chrome → "Reconnect extension".
  5. Call any mcp__claude-in-chrome__* tool → always returns "not connected".

Workaround

None. Browser automation from Claude Code CLI is unusable on this machine.

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 Chrome extension calls wrong native messaging host when both Claude Desktop and Claude Code are installed