Chrome extension native host crashes immediately with ERR_INVALID_ARG_TYPE on named pipe listen (Windows)

Open 💬 0 comments Opened Jul 11, 2026 by gamilu

Chrome extension native host crashes immediately with ERR_INVALID_ARG_TYPE on named pipe listen (Windows)

Claude Code version: 2.1.207 (also reproduced on 2.1.206 before updating)
OS: Windows 11 Pro (10.0.26200)
Browser: Brave (also has native messaging host registered for Chrome/Edge paths, but only Brave has the extension installed on this machine)
Runtime: Bun v1.4.0 (Windows x64 baseline), per the crash output

Summary

The Chrome/Brave extension's native messaging host process (claude.exe --chrome-native-host) crashes immediately on startup while trying to create its named pipe listener, before any browser handshake can complete. In the extension UI this shows up as: running /chrome → "Reconnect extension" briefly opens a new browser tab, which closes again almost instantly — the tab is presumably closing because the native host process it depends on has already exited.

Steps to reproduce

  1. Install the official Claude in Chrome extension (Chrome Web Store ID fcoeoabgfenejglbffodgkkbkcdhcgfn) in Brave (v1.0.80 installed).
  2. Confirm the native messaging host is registered: HKCU\Software\BraveSoftware\Brave-Browser\NativeMessagingHosts\com.anthropic.claude_code_browser_extension exists and points to a valid manifest at %APPDATA%\Claude Code\ChromeNativeHost\com.anthropic.claude_code_browser_extension.json, which correctly references %USERPROFILE%\.claude\chrome\chrome-native-host.bat.
  3. In Claude Code, run /chrome, then select "Reconnect extension" (or just /chrome fresh).
  4. Observe: a browser tab opens and closes almost immediately; no browser tools become available (confirmed via claude mcp list and repeated tool-discovery checks — no claude-in-chrome entry ever appears).
  5. Run the native host binary directly to see the actual failure:

``
claude.exe --chrome-native-host
``

Actual output / stack trace

[Claude Chrome Native Host] Initializing...
[Claude Chrome Native Host] Creating socket listener: \\.\pipe\claude-mcp-browser-bridge-gamilu
[Claude Chrome Native Host] Socket server error: ...
TypeError: Failed to listen at \\.\pipe\claude-mcp-browser-bridge-gamilu
 code: "ERR_INVALID_ARG_TYPE"

      at listen (unknown:1:1)
      at node:net:1827:30
      at listenInCluster (node:net:1913:24)
      at listen (node:net:1818:20)
      at B:/~BUN/root/src/entrypoints/cli.js:...
      at Promise (unknown:1:11)
      at start (B:/~BUN/root/src/entrypoints/cli.js:...)
      ...

Bun v1.4.0 (Windows x64 baseline)

Process exits with code 1 immediately after this error — it never reaches a listening state.

Expected behavior

The native host should successfully create the named pipe listener at \\.\pipe\claude-mcp-browser-bridge-<username> and stay running, allowing the extension to connect and browser tools to become available in the Claude Code session.

Additional notes

  • Reproduced identically on both 2.1.206 and 2.1.207 (updated specifically to test whether this was already fixed — it was not).
  • The username in the pipe path (gamilu) is a plain Windows username with no unusual characters, so this doesn't look like a pipe-name-escaping issue on the surface, but ERR_INVALID_ARG_TYPE on net.listen() in Node/Bun usually indicates an argument of the wrong type (not just an invalid string) was passed to .listen() — worth checking whether the Windows named-pipe code path is passing an options object where a string (or vice versa) is expected, possibly a Bun-on-Windows compatibility gap in the net module's named pipe handling versus native Node.
  • Extension installation, native host registration, and manifest are all otherwise correctly configured — this is specifically a runtime crash in the compiled host binary, not a setup/configuration issue.

View original on GitHub ↗