Description
When both Claude Desktop app and Claude Code are installed on macOS, the Chrome extension fails to connect to Claude Code with the error: "Browser extension is not connected."
Root Cause
Both Claude Desktop and Claude Code register native messaging host configurations in ~/Library/Application Support/Google/Chrome/NativeMessagingHosts/ with the same allowed_origins extension IDs. The Claude Desktop config (com.anthropic.claude_browser_extension.json) takes precedence, causing the Chrome extension to connect to Claude Desktop's native host instead of Claude Code's.
Environment
- OS: macOS (Darwin 25.2.0)
- Claude Code Version: 2.1.17
- Chrome Extension ID: fcoeoabgfenejglbffodgkkbkcdhcgfn
Steps to Reproduce
- Have both Claude Desktop app and Claude Code installed
- Install the Claude Chrome extension
- Run
claude --chrome
- Try to use any Chrome integration tool
- Error: "Browser extension is not connected"
Workaround
Replace the Claude Desktop native host config to point to Claude Code:
# Backup the Claude Desktop config
mv ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json \
~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json.backup
# Create new config pointing to Claude Code
cat > ~/Library/Application\ Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json << 'EOF'
{
"name": "com.anthropic.claude_browser_extension",
"description": "Claude Browser Extension Native Host",
"path": "/Users/USERNAME/.claude/chrome/chrome-native-host",
"type": "stdio",
"allowed_origins": [
"chrome-extension://dihbgbndebgnbjfmelmegjepbnkhlgni/",
"chrome-extension://fcoeoabgfenejglbffodgkkbkcdhcgfn/",
"chrome-extension://dngcpimnedloihjnnfngkgjoidhnaolf/"
]
}
EOF
# Restart Chrome
Expected Behavior
Claude Code and Claude Desktop should be able to coexist without conflicting native messaging host registrations. Possible solutions:
- Use different native messaging host names for each application
- Add a mechanism to switch between Claude Desktop and Claude Code connections
- Detect the conflict and provide a clear error message with resolution steps
Additional Context
The /chrome reconnect option opens Chrome briefly then closes without properly installing the native messaging host when this conflict exists.
Description
When both Claude Desktop app and Claude Code are installed on macOS, the Chrome extension fails to connect to Claude Code with the error: "Browser extension is not connected."
Root Cause
Both Claude Desktop and Claude Code register native messaging host configurations in
~/Library/Application Support/Google/Chrome/NativeMessagingHosts/with the sameallowed_originsextension IDs. The Claude Desktop config (com.anthropic.claude_browser_extension.json) takes precedence, causing the Chrome extension to connect to Claude Desktop's native host instead of Claude Code's.Environment
Steps to Reproduce
claude --chromeWorkaround
Replace the Claude Desktop native host config to point to Claude Code:
Expected Behavior
Claude Code and Claude Desktop should be able to coexist without conflicting native messaging host registrations. Possible solutions:
Additional Context
The
/chromereconnect option opens Chrome briefly then closes without properly installing the native messaging host when this conflict exists.