[BUG] --chrome flag: CLI never connects to native host socket (bridge process not spawned)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Description
Claude Code CLI with --chrome flag fails to connect to the Chrome extension. The native messaging host
works correctly (extension can ping/pong), but the CLI never establishes a connection to the unix socket
— no bridge child process is spawned.
Environment
- Claude Code: 2.1.87
- Chrome extension: 1.0.64
- OS: macOS (Apple Silicon M4, Darwin 25.3.0)
- Chrome: Latest (146.x)
- Launch command: claude --dangerously-skip-permissions --chrome --debug
Debugging findings
- Native messaging host config exists at ~/Library/Application
Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json and points
to correct extension ID (fcoeoabgfenejglbffodgkkbkcdhcgfn)
- Native host process is running and listening on socket:
/tmp/claude-mcp-browser-bridge-perthsalva/<PID>.sock
- Extension service worker has no errors. Native messaging works — running this in the service worker
console returns a successful pong:
chrome.runtime.sendNativeMessage('com.anthropic.claude_code_browser_extension', {type: 'ping'}, (r) =>
console.log(r));
// => {type: 'pong', timestamp: ...}
- Socket is connectable — manual python test connects successfully.
- CLI does NOT connect — lsof -p <CLI_PID> shows no connection to the bridge socket. The CLI spawns
child processes for other MCP servers (playwright, context7) but no child process for claude-in-chrome.
- Chrome profile is Default. No Chrome managed policies blocking native messaging. Extension has
nativeMessaging permission in manifest.
What Should Happen?
Expected behavior
CLI should connect to the native host socket and the claude-in-chrome MCP tools should work.
Actual behavior
All mcp__claude-in-chrome__* tool calls return:
▎ "Browser extension is not connected. Please ensure the Claude browser extension is installed and
running..."
Error Messages/Logs
▎ 0. Error message from all mcp__claude-in-chrome__* tool calls:
▎ 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.
▎ If this is your first time connecting to Chrome, you may need to restart Chrome for the installation
to
▎ take effect.
Add this section after Environment:
Steps to Reproduce
Steps to reproduce
- Install Claude in Chrome extension (v1.0.64) from Chrome Web Store
- Ensure logged into claude.ai in Chrome
- Run claude --chrome in terminal
- Attempt to use any mcp__claude-in-chrome__* tool (e.g. tabs_context_mcp)
- Get "Browser extension is not connected" error
Additional steps tried (all unsuccessful):
- Fully quitting Chrome (Cmd+Q) and reopening
- Toggling extension off/on in chrome://extensions/
- Killing native host processes and removing stale sockets in /tmp/claude-mcp-browser-bridge-*/
- Running /chrome command within the session
- Restarting Claude Code session entirely
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
v2.1.87
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
iTerm2
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗