[BUG] native host socket accepts connections but returns empty data

Resolved 💬 2 comments Opened Mar 24, 2026 by thordarson Closed Mar 24, 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?

The native host socket accepts connections but returns empty data. I have both Claude Desktop and Claude Code installed.

  • Claude Code v2.1.81, Chrome extension v1.0.63, macOS
  • Both Claude Desktop and Claude Code installed
  • Native host spawns and creates socket at /tmp/claude-mcp-browser-bridge-*/
  • Socket accepts connections but returns empty responses
  • Paid plan, correct org, extension authenticated

What Should Happen?

Claude browser extension should connect when opening claude with claude --chrome but does not connect due to socket used by Claude Desktop app.

Error Messages/Logs

You're right — the Chrome tools are showing up in the deferred tools list,
  which confirms --chrome is active. The ps output just truncates args.

  Let me check if the native host is logging any errors:

⏺ Bash(# Check stderr/stdout from the native host process
      ls -la /tmp/claude-*/ 2>&1; echo "==="; # Check if there are any log files
       from the native host…)
  ⎿  /tmp/claude-501/:
     total 0
     drwxr-xr-x@  7 bob.thordarson  wheel   224 Mar 24 08:39 -Users-bob-tho
     … +12 lines (ctrl+o to expand)

⏺ Bash(# Try to see what the native host outputs when we connect to its socket
      python3 -c "…)
  ⎿  No initial data (timeout)
     Sent: {"jsonrpc": "2.0", "method": "initialize", "id": 1, "params": {"
     capabilities": {}}}
     Response: b''

⏺ The socket accepts connections but returns empty responses. The native host
  bridge isn't relaying messages. This suggests the native host can't
  communicate with the Chrome extension — the Chrome→native host pipe may be
  broken.

⏺ Bash(# Check if the native host process has open file descriptors to Chrome
      lsof -p 20881 2>&1 | head -30)
  ⎿  COMMAND   PID           USER   FD     TYPE             DEVICE SIZE/OFF
                     NODE NAME
     node    20881 bob.thordarson  cwd      DIR               1,18       96
     … +55 lines (ctrl+o to expand)

⏺ I see the problem. The native host has stdin/stdout pipes (FD 0, 1) to Chrome
  and a socket (20881.sock) for Claude Code. But there's no socket file
  descriptor in the lsof output — the native host isn't listening on the socket
  anymore, or the socket listener died.

  I think we've exhausted manual troubleshooting. Here's where we are:

  What works:
  - Extension installed & authenticated (paid plan, correct org)
  - Native host manifest pointing to Claude Code's script
  - Native host process spawns and creates socket
  - Chrome pipes to native host exist

  What's broken:
  - The native host socket accepts connections but returns empty responses
  - Claude Code's MCP client gets "not connected"

  This looks like a bug in the Chrome integration. I'd recommend:

  1. File a bug at https://github.com/anthropics/claude-code/issues — mention
  that the native host socket accepts connections but returns empty data, and
  that you have both Claude Desktop and Claude Code installed.

Steps to Reproduce

Here are the steps to reproduce:

Environment:

  • macOS (Darwin 25.4.0, Apple Silicon)
  • Claude Code v2.1.81 (npm global install)
  • Claude Desktop app also installed
  • Chrome extension "Claude in Chrome" v1.0.63 (ID:

fcoeoabgfenejglbffodgkkbkcdhcgfn)

  • Node v25.2.1

Steps to reproduce:

  1. Have both Claude Desktop app and Claude Code installed via npm
  2. Install Chrome extension from claude.ai/chrome
  3. Sign into claude.ai with a paid plan account
  4. Start Claude Code with claude --chrome
  5. Open the Chrome sidebar (click Claude extension icon)
  6. Use the mcp__claude-in-chrome__tabs_context_mcp tool — returns "Browser

extension is not connected"

Diagnosis performed:

  • Two native messaging manifests exist in ~/Library/Application

Support/Google/Chrome/NativeMessagingHosts/:

  • com.anthropic.claude_browser_extension.json (installed by Desktop app,

path: /Applications/Claude.app/Contents/Helpers/chrome-native-host)

  • com.anthropic.claude_code_browser_extension.json (installed by Claude

Code, path: ~/.claude/chrome/chrome-native-host)

  • Chrome extension only connects via com.anthropic.claude_browser_extension —

it ignores the Claude Code manifest entirely

  • When the desktop manifest points to the desktop app binary, the desktop

native host runs but Claude Code can't connect

  • When the desktop manifest path is changed to Claude Code's native host

(~/.claude/chrome/chrome-native-host), the Claude Code native host spawns
correctly and creates a Unix socket at
/tmp/claude-mcp-browser-bridge-<username>/<PID>.sock

  • The socket accepts connections but returns empty responses to all messages
  • lsof shows the native host has stdin/stdout pipes to Chrome but no active

socket file descriptor

Expected behavior: Claude Code should be able to control Chrome tabs via the
extension.

Actual behavior: Perpetual "Browser extension is not connected" regardless of
configuration.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Claude Code v2.1.81

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

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