Chrome extension calls wrong native messaging host when both Claude Desktop and Claude Code are installed

Resolved 💬 5 comments Opened May 17, 2026 by mrmt Closed Jun 24, 2026

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".
  1. 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.

  1. 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.
  1. 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
  1. 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.

View original on GitHub ↗

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