claude-code - 💡(How to fix) Fix [Bug] Chrome native host crashes with ERR_INVALID_ARG_TYPE on Windows named pipe creation [1 participants]

Official PRs (…)
ON THIS PAGE

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#57846Fetched 2026-05-11 03:23:51
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
labeled ×4

Error Message

Actual error from native host [Claude Chrome Native Host] Socket server error: ...

Code Example

[]
RAW_BUFFERClick to expand / collapse

Chrome native host crashes on Windows with ERR_INVALID_ARG_TYPE when creating named pipe

Environment

  • OS: Windows 11 Pro 26200
  • Shell: PowerShell 7
  • Claude Code: launched with claude --chrome (2.1.138)
  • Bun: v1.3.14 (Windows x64 baseline) — embedded in Claude Code
  • Chrome extension: "Claude in Chrome (Beta)" v1.0.70, ID <redacted>
  • Note: Workspace path contains a ! prefix

Summary

Every call to mcp__claude-in-chrome__* tools returns "Browser extension is not connected." The extension is installed, enabled, configured "On all sites," and signed into claude.ai with
the correct account. Chrome was fully restarted after install. The session was started with
claude --chrome.

Diagnostic steps that ruled out the obvious causes

  1. Native messaging registry key is present: - HKCU:\Software\Google\Chrome\NativeMessagingHosts\com.anthropic.claude_code_browser_extension - Manifest at <redacted> Code\ChromeNativeHost\com.anthropic.claude_code_browser_extension.json exists with correct
    path and allowed_origins.
  2. Manifest's allowed_origins (chrome-extension://<redacted>/) matches
    the installed extension's ID exactly.
  3. Wrapper script <redacted>.claude\chrome\chrome-native-host.bat exists and points to
    <redacted>.local\bin\claude.exe --chrome-native-host. The target binary exists.
  4. Running the bat manually reproduces the failure (see below).
  5. Running /chrome from inside the Claude Code session returns no output / no menu.

Actual error from native host

When the bat is invoked manually, claude.exe crashes during startup:

[Claude Chrome Native Host] Initializing... [Claude Chrome Native Host] Creating socket listener: \.\pipe\claude-mcp-browser-bridge-JT
[Claude Chrome Native Host] Socket server error: ...

TypeError: Failed to listen at \.\pipe\claude-mcp-browser-bridge-JT code: "ERR_INVALID_ARG_TYPE" at listen (unknown:1:1) at node:net:1339:30 at listenInCluster (node:net:1423:24) at listen (node:net:1331:20) at B:/~BUN/root/src/entrypoints/cli.js:9024:1166 ... at OEA (B:/~BUN/root/src/entrypoints/cli.js:9024:262)

Bun v1.3.14 (Windows x64 baseline)

The pipe path string itself appears valid, so the ERR_INVALID_ARG_TYPE likely comes from
another argument in the net.Server.listen(options) call (e.g., path or an option resolving to undefined). The -JT suffix is suspicious — it may be derived from a workspace identifier and
could be hitting an edge case.

Expected

Native host stays running, exposes the pipe, and mcp__claude-in-chrome__tabs_context_mcp
returns the tab group context.

Actual

Native host crashes immediately, so Chrome's native messaging connection is never established and all mcp__claude-in-chrome__* calls fail with "Browser extension is not connected."

Repro

  1. Install Claude Code on Windows 11.
  2. Install the Chrome extension and sign in.
  3. Launch Claude Code with claude --chrome from a workspace whose path contains a ! character.
  4. Call any mcp__claude-in-chrome__* tool, or run the wrapper bat directly to see the crash.

Notes

  • Happy to provide the full stack trace, debug logs, or test workspace paths without ! to
    confirm whether the path character is implicated.

Environment Info

  • Platform: win32
  • Terminal: vscode
  • Version: 2.1.138
  • Feedback ID: 6619d91f-bacf-4256-ad4b-2163e6b93c30

Errors

[]

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…

Still need to ship something?

×6

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

Back to top recommendations

TRENDING