claude-in-chrome: native messaging handshake never attempted after long-running Chrome session, with no diagnosable error

Status Open
Reported on v2.1.212
Maintainer reply None cached
Activity 0 comments · opened Oct 1, 2026

Summary

claude-in-chrome tools (tabs_context_mcp, list_connected_browsers) reported no connected browser, even though:

  • the Claude extension was installed and enabled in Chrome (toggle on)
  • its service worker was alive (confirmed via chrome://extensions inspect view)
  • the Claude Code CLI was running and listening on a local port (127.0.0.1:<port>)
  • the native messaging host manifest (~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json) was present, valid, and pointed to a working wrapper script
  • running that wrapper script manually (outside Chrome) worked fine — it initialized and opened a Unix socket listener under /tmp/claude-mcp-browser-bridge-<user>/

Despite all of that, Chrome never spawned the native host process at all. No chrome-native-host (or claude.exe --chrome-native-host) process was ever running, and the bridge socket directory didn't exist — meaning the extension's chrome.runtime.connectNative() call was never resulting in an actual OS-level handshake attempt.

Root cause (as best I could determine from the outside)

Chrome's browser process had been running continuously for several days (since before the native messaging manifest was last registered/updated). Chrome is documented to cache native-messaging-host registrations at browser-process startup, so a manifest written/changed after Chrome's current session started won't be picked up until Chrome itself (not just the extension, not just a window/tab) is fully quit and relaunched.

Quitting Chrome entirely and reopening it resolved the issue.

The actual problem

The error surfaced by the tools gives no hint toward this cause:

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.

The "restart Chrome" hint is buried as a "first time connecting" caveat, but this failure mode isn't limited to first-time setup — it recurs any time the native messaging registration changes (e.g. after a Claude Code update) while Chrome has an existing long-running session open. In this case it took real manual diagnosis (checking lsof for listening sockets, checking for a live chrome-native-host process, checking the native messaging manifest and running its target script directly) to figure out that the fix was "fully quit and relaunch Chrome," rather than anything related to the extension's enabled/disabled state, account login, or Claude Code itself.

Suggestion

When tabs_context_mcp / list_connected_browsers can't find a connected browser, consider distinguishing (where detectable) "extension never installed / not logged in" from "native host manifest is valid and the CLI is reachable, but no handshake was ever attempted" — the latter is a strong signal that Chrome itself needs a full restart, independent of whether this is the user's first time pairing.

Environment

  • Claude Code: 2.1.212 (macOS)
  • Chrome: 154.0.8037.58
  • Claude in Chrome extension: 1.0.94
  • OS: macOS 24.6.0 (Darwin)

View original on GitHub ↗