claude-code - 💡(How to fix) Fix claude-in-chrome: extension connects in Claude Desktop but not terminal CLI — same Chrome, same extension [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46869Fetched 2026-04-12 13:30:55
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
labeled ×3commented ×1

Root Cause

This appears to be the native messaging host conflict documented across multiple issues (#20298, #24593, #21371, #31971, #36471, #41013, #31897). Both Claude Desktop and terminal CC register native messaging host configs claiming the same extension ID. Desktop's registration wins, so Chrome routes the extension connection to Desktop's socket — terminal CC never sees it.

The fact that it works perfectly in Desktop (both Cowork and Claude Code modes) but never in terminal CC, with zero config changes in between, confirms the host registration conflict is the root cause.

Fix Action

Fix / Workaround

Users who primarily work in terminal Claude Code have no access to browser automation via claude-in-chrome. The workaround of disabling Desktop's native host breaks Desktop's browser tools. There's no way to use both simultaneously or even switch cleanly between them.

RAW_BUFFERClick to expand / collapse

Bug description

The claude-in-chrome browser extension works correctly when invoked from the Claude macOS desktop app (both Cowork mode and Claude Code mode), but consistently fails with "Browser extension is not connected" when invoked from Claude Code in terminal — same Chrome instance, same extension, same account.

Environment

  • macOS (Darwin 25.4.0)
  • Claude Code CLI (terminal)
  • Claude Desktop app (macOS) — works fine
  • Chrome with claude-in-chrome extension installed and showing connected

Steps to reproduce

  1. Have both Claude Desktop app and Claude Code CLI installed
  2. Install claude-in-chrome extension, log into claude.ai
  3. From Claude Desktop app (Cowork or Claude Code): use any mcp__claude-in-chrome__* tool → works
  4. From terminal Claude Code: use any mcp__claude-in-chrome__* tool → fails with "Browser extension is not connected"

Expected behavior

Terminal Claude Code should be able to connect to the chrome extension the same way the desktop app does.

Actual behavior

Every MCP tool call from terminal CC returns:

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.

Analysis

This appears to be the native messaging host conflict documented across multiple issues (#20298, #24593, #21371, #31971, #36471, #41013, #31897). Both Claude Desktop and terminal CC register native messaging host configs claiming the same extension ID. Desktop's registration wins, so Chrome routes the extension connection to Desktop's socket — terminal CC never sees it.

The fact that it works perfectly in Desktop (both Cowork and Claude Code modes) but never in terminal CC, with zero config changes in between, confirms the host registration conflict is the root cause.

Impact

Users who primarily work in terminal Claude Code have no access to browser automation via claude-in-chrome. The workaround of disabling Desktop's native host breaks Desktop's browser tools. There's no way to use both simultaneously or even switch cleanly between them.

extent analysis

TL;DR

The native messaging host conflict between Claude Desktop and terminal Claude Code needs to be resolved to fix the "Browser extension is not connected" issue.

Guidance

  • Investigate the native messaging host configuration to identify the conflicting extension IDs and registration processes.
  • Consider implementing a mechanism to dynamically switch or prioritize the native messaging host registration between Claude Desktop and terminal Claude Code.
  • Review the documented issues (#20298, #24593, #21371, #31971, #36471, #41013, #31897) for potential solutions or workarounds to the native messaging host conflict.
  • Evaluate the possibility of using a separate extension ID or instance for terminal Claude Code to avoid conflicts with the Desktop registration.

Example

No specific code snippet is provided due to the lack of explicit technical details, but a potential solution might involve modifying the native messaging host registration process to use a unique identifier or priority system.

Notes

The solution may require changes to the Claude Desktop and/or terminal Claude Code applications, as well as potential updates to the claude-in-chrome extension. The exact implementation details will depend on the specific requirements and constraints of the applications and extension.

Recommendation

Apply a workaround to resolve the native messaging host conflict, such as implementing a dynamic registration switch or using a separate extension ID for terminal Claude Code, as upgrading to a fixed version is not explicitly mentioned in the issue. This approach allows for a potential solution to be explored without relying on an unspecified fixed version.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Terminal Claude Code should be able to connect to the chrome extension the same way the desktop app does.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING