Chrome extension conflict: Claude.app native host interferes with Claude Code --chrome
Description
When both Claude.app (desktop) and Claude Code CLI are installed, the --chrome browser automation feature fails to connect because the Chrome extension connects to Claude.app's native messaging host instead of Claude Code's.
Environment
- Claude Code version: 2.1.17
- Chrome version: 144.0.7559.110
- OS: macOS Darwin 25.2.0
- Claude.app: Installed and running
Steps to Reproduce
- Have both Claude.app and Claude Code installed
- Run
claude --chrome - Attempt to use any browser automation tool (e.g.,
tabs_context_mcp) - Connection fails with socket error
Error
[Claude in Chrome] Socket error: Error: connect ENOENT /var/folders/.../claude-mcp-browser-bridge-[username]
The socket file is never created because Chrome invokes Claude.app's native host instead of Claude Code's.
Root Cause
Both apps register native messaging hosts for the same Chrome extension ID (fcoeoabgfenejglbffodgkkbkcdhcgfn):
- Claude.app:
com.anthropic.claude_browser_extensionat/Applications/Claude.app/Contents/Helpers/chrome-native-host - Claude Code:
com.anthropic.claude_code_browser_extensionat~/.claude/chrome/chrome-native-host
The Chrome extension appears to connect to Claude.app's host preferentially, preventing Claude Code's socket from being created.
Workaround
Temporarily disable Claude.app's native host:
mv "$HOME/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json" "$HOME/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_browser_extension.json.backup"
Then restart Chrome. Claude Code's --chrome will work. Restore the file afterward if needed.
Alternatively, quit Claude.app before using claude --chrome.
Expected Behavior
Claude Code's --chrome feature should work independently of whether Claude.app is installed/running.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗