Claude-in-Chrome: Bun native host panics on Windows + MCP client state caches as disconnected (2.1.105)

Resolved 💬 3 comments Opened Apr 14, 2026 by KevinVanDriel-Perpetuals Closed Apr 17, 2026

Environment

  • Claude Code version: 2.1.105
  • OS: Windows 11 Pro
  • Shell: Git Bash (MINGW64)
  • Extension version: claude-in-chrome 1.0.68

Bug 1 — .local/bin/claude.exe --chrome-native-host panics

The Bun-compiled binary crashes immediately when Chrome spawns it via the auto-generated chrome-native-host.bat:

[Claude Chrome Native Host] Initializing...
[Claude Chrome Native Host] Creating socket listener: \.\pipe\claude-mcp-browser-bridge-kevin
...
panic(main thread): Internal assertion failure
oh no: Bun has crashed.
https://bun.report/1.3.13/e_11b55f1dEkgggC+zt/M+ky6G6mhroBqt4koB__uomn5CA0eNrzzCtJLcpLzFFILC5OLSrJzM9TSEvMzCktSgUAiSkKPg

Extension times out on ping/pong → marks host disconnected.

Bug 2 — Claude Code overwrites chrome-native-host.bat on every session start

The npm/Node version works correctly (%APPDATA%\npm\claude.cmd --chrome-native-host doesn't crash, implements pong at cli.js offset 237345). But Claude Code regenerates the bat to point at the crashing Bun binary on every startup. Workaround: attrib +R to make it read-only.

Bug 3 — MCP client caches "disconnected" state permanently in a session

Even with a working native host (verified: pipe \.\pipe\claude-mcp-browser-bridge-kevin is connectable via .NET NamedPipeClient), all mcp__claude-in-chrome__* tools continue returning "Browser extension is not connected" until the Claude Code session is restarted. switch_browser doesn't trigger a reconnect broadcast. Reloading the extension, restarting Chrome, respawning the native host — nothing clears it.

Repro

  1. Install Claude Code 2.1.105 + Claude-in-Chrome 1.0.68 on Windows
  2. Launch claude
  3. Call mcp__claude-in-chrome__tabs_context_mcp
  4. Returns "Browser extension is not connected" every time

Suggested fixes

  • Fix the Bun panic in --chrome-native-host or default to the Node version on Windows
  • Let user edits to chrome-native-host.bat persist
  • Add retry logic in the MCP client when the pipe becomes available mid-session

View original on GitHub ↗

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