[BUG] Chrome extension connects to claude.ai instead of Claude Code CLI when Claude desktop app is installed

Resolved 💬 2 comments Opened Apr 7, 2026 by andrewcrocker Closed Apr 8, 2026

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?

Environment:

  • Claude Code: 2.1.31 (installed via CMUX at /Applications/cmux.app/Contents/Resources/bin/claude)
  • Claude desktop app: 1.1062.0
  • Chrome: 146.0.7680.178
  • macOS: 26.4 (Build 25E246)
  • Chrome extension: Installed (ID: fcoeoabgfenejglbffodgkkbkcdhcgfn)

Problem:
When running /chrome → "Reconnect extension" in Claude Code CLI, instead of connecting to the CLI
session, it:

  1. Opens a new Chrome tab
  2. Navigates to claude.ai/new
  3. Closes the tab after ~0.25 seconds

Root cause (suspected):
The native messaging host config points to Claude desktop app's binary:
{
"name": "com.anthropic.claude_browser_extension",
"path": "/Applications/Claude.app/Contents/Helpers/chrome-native-host",
...
}

Claude Code CLI appears to need its own native messaging host
(com.anthropic.claude_code_browser_extension.json) but this file is never created. The shared native
host binary routes connections to Claude web/desktop instead of the CLI.

Attempted fix:

  • Updated Claude Code to 2.1.92 - issue persists
  • Chrome extension version: 1.0.66
  • No com.anthropic.claude_code_browser_extension.json file is created in ~/Library/Application

Support/Google/Chrome/NativeMessagingHosts/

  • Only com.anthropic.claude_browser_extension.json exists (from Claude desktop app)

This confirms the bug - Claude Code CLI isn't creating its own native messaging host config, so it's
forced to use Claude desktop's, which routes to claude.ai instead of the CLI.

What Should Happen?

Expected: Chrome extension connects to Claude Code CLI session

Error Messages/Logs

Steps to Reproduce

Steps to reproduce:

  1. Have both Claude desktop app and Claude Code CLI installed
  2. Install Chrome extension
  3. Run claude --chrome or /chrome from CLI
  4. Select "Reconnect extension"
  5. Observe: opens claude.ai/new briefly then closes

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.92

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

using CMUX (Ghostty-based) shell.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗