Claude in Chrome: extension never connects to Claude Code when Desktop native host is present
Bug Description
The Claude in Chrome extension cannot connect to Claude Code when Claude Desktop's native messaging host is also registered. Chrome routes all native messaging connections to Desktop's host (com.anthropic.claude_browser_extension), and never falls through to Code's host (com.anthropic.claude_code_browser_extension) — even when Desktop has chromeExtensionEnabled: false.
Environment
- Claude Code version: 2.1.52
- Chrome extension version: 1.0.55
- Claude Desktop: installed, latest version
- OS: macOS Sequoia (Darwin 25.3.0)
- Chrome: latest
Steps to Reproduce
- Have both Claude Desktop and Claude Code installed
- Chrome extension is installed and logged in
- Claude Desktop has
chromeExtensionEnabled: falseinclaude_desktop_config.json - From Claude Code, call
mcp__claude-in-chrome__tabs_context_mcp - Get error: "Browser extension is not connected"
Diagnosis
Two separate native messaging hosts are registered in ~/Library/Application Support/Google/Chrome/NativeMessagingHosts/:
| File | Host Name | Points To |
|------|-----------|-----------|
| com.anthropic.claude_browser_extension.json | com.anthropic.claude_browser_extension | /Applications/Claude.app/Contents/Helpers/chrome-native-host (Desktop) |
| com.anthropic.claude_code_browser_extension.json | com.anthropic.claude_code_browser_extension | ~/.claude/chrome/chrome-native-host (Code) |
The Chrome extension's service worker JS references both host names:
"com.anthropic.claude_browser_extension"
"com.anthropic.claude_code_browser_extension"
However, only Desktop's native host process is ever started by Chrome:
PID 79367: /Applications/Claude.app/Contents/Helpers/chrome-native-host chrome-extension://fcoeoabgfenejglbffodgkkbkcdhcgfn/
No Claude Code native host process is spawned. The Code native host binary works fine when tested manually (creates socket at /tmp/claude-mcp-browser-bridge-*/).
The extension connects to Desktop first, Desktop rejects/ignores it (because chromeExtensionEnabled: false), and the connection is never attempted to Code's native host.
Expected Behavior
When Claude Desktop has the Chrome extension disabled, the extension should fall through to Claude Code's native host, allowing both products to coexist. Ideally, both should be able to connect simultaneously since they have separate native host registrations.
Workaround
The only workaround is to rename/remove Desktop's native host file:
mv com.anthropic.claude_browser_extension.json com.anthropic.claude_browser_extension.json.disabled
But this breaks the extension for Desktop, making it a mutually exclusive choice.
Impact
Users who have both Claude Desktop and Claude Code installed cannot use the Chrome extension with Claude Code at all, even though the infrastructure (separate native host registrations) was clearly designed to support both.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗