Claude Code Chrome integration conflicts with Claude Desktop native messaging host
Description
Claude Code's Chrome integration (claude --chrome) fails to connect when Claude Desktop is also installed, because both applications register native messaging hosts for the same Chrome extension ID.
Environment
- Claude Code CLI: 2.1.15
- Claude in Chrome extension: 1.0.45
- Claude Desktop: Installed
- OS: macOS (Darwin 25.2.0)
- Chrome: Latest
Steps to Reproduce
- Have both Claude Desktop and Claude Code installed
- Run
claude --chromeor use/chromein a session - Attempt to use Chrome integration tools (screenshot, click, etc.)
Result: Browser extension is not connected error
Root Cause
Two native messaging host configs exist in ~/Library/Application Support/Google/Chrome/NativeMessagingHosts/:
com.anthropic.claude_browser_extension.json→ Points to Claude Desktop (/Applications/Claude.app/Contents/Helpers/chrome-native-host)com.anthropic.claude_code_browser_extension.json→ Points to Claude Code (~/.claude/chrome/chrome-native-host)
Both configs reference the same Chrome extension ID (fcoeoabgfenejglbffodgkkbkcdhcgfn), but Chrome routes all connections to Desktop's native host. Even when Desktop is quit, Chrome spawns Desktop's chrome-native-host process, leaving Claude Code unable to connect.
Workaround
Temporarily disable Claude Desktop's config:
# Kill Desktop's native host process
pgrep -l "chrome-native" | grep -v grep
# Note the PID, then:
kill <PID>
# Move Desktop's config out of the way
mv ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json ~/Desktop/
# Restart Chrome (Cmd+Q, then reopen)
To revert (restore Desktop integration):
mv ~/Desktop/com.anthropic.claude_browser_extension.json ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/
# Restart Chrome
Suggested Fixes
- Extension toggle: Add UI in Claude Chrome extension to choose backend (Desktop vs Code)
- Different extension IDs: Use separate Chrome extensions for Desktop and Code
- Priority system: Allow both configs to coexist with explicit priority/routing
- Documentation: At minimum, document this conflict and workaround
Additional Context
Once the workaround is applied, Claude Code's Chrome integration works correctly:
read_page✅navigate✅form_input✅find✅
(Note: click, screenshot, and keyboard operations have a separate issue - "Cannot access chrome-extension:// URL of different extension" - which may be unrelated to this native host conflict.)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗