Chrome extension calls wrong native messaging host when both Claude Desktop and Claude Code are installed
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
- The Chrome extension itself is healthy: Service Worker is active, console shows no errors/warnings, permissions include "Communicate with cooperating native applications".
- When
/chromeReconnect 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.
- 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.
- Both native messaging host config files have the same extension in
allowed_origins:
com.anthropic.claude_browser_extension.json→ Desktop binary, allowed_origins containsfcoeoabgfenejglbffodgkkbkcdhcgfncom.anthropic.claude_code_browser_extension.json→ CLI wrapper, allowed_origins containsfcoeoabgfenejglbffodgkkbkcdhcgfn
- Workaround experiment: when
com.anthropic.claude_browser_extension.jsonis temporarily renamed away, Reconnect now spawns the CLI native host correctly (it listens on a socket). However, the runningclaude --chromeCLI process never opens that socket, sotabs_context_mcpstill 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
- Install Claude Desktop app and Claude Code CLI on macOS.
- Install Claude in Chrome extension v1.0.70.
claude --chrome(CLI session boots).- Run
/chrome→ "Reconnect extension". - Call any
mcp__claude-in-chrome__*tool → always returns "not connected".
Workaround
None. Browser automation from Claude Code CLI is unusable on this machine.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗