[Windows] Chrome Native Host crashes with Bun assertion failure

Resolved 💬 3 comments Opened Jan 28, 2026 by kentensh002 Closed Feb 1, 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 Claude Chrome extension appears to be connected (shows "connected" in /chrome command and in the browser), but when asking Claude Code to use browser automation, it always fails.

Exact error when trying to use browser tools:

Browser extension is not connected. Please ensure the Claude browser extension is installed and running (https://claude.ai/chrome). If this is your first time connecting to Chrome, you
may need to restart Chrome for the installation to take effect.

This error appears when:

  • Trying to get tab context
  • Trying to navigate to a URL
  • Any browser automation tool

The contradiction:

  • /chrome shows the extension is "connected"
  • The browser extension panel shows it's "connected"
  • But ALL browser automation tools fail with "not connected"

What I already tried (before debugging):

  • Reset my computer (2 times)
  • Reinstalled Chrome completely
  • Reinstalled Claude Code completely
  • Restarted Chrome multiple times

None of these fixed the issue.

Root cause found during debugging:
The Native Messaging Host crashes immediately with a Bun internal assertion failure when trying to create a Windows Named Pipe.

What Should Happen?

When /chrome shows "connected", Claude Code should be able to actually communicate with the Chrome extension and perform browser automation tasks (navigate, take screenshots, click,
etc.) without crashing.

Error Messages/Logs

Error from Claude Code when trying to use browser:

  Browser extension is not connected. Please ensure the Claude browser extension is installed and running (https://claude.ai/chrome). If this is your first time connecting to Chrome, you
  may need to restart Chrome for the installation to take effect. If you continue to experience issues, please report a bug:
  https://github.com/anthropics/claude-code/issues/new?labels=bug,claude-in-chrome

  ---

  Error when testing Native Host directly with: echo {"type":"ping"} | claude.exe --chrome-native-host

  [Claude Chrome Native Host] Initializing...
  [Claude Chrome Native Host] Creating socket listener: \\.\pipe\claude-mcp-browser-bridge-[USERNAME]
  ============================================================
  Bun v1.3.5 (1e86cebd) Windows x64 (baseline)
  Windows v.win11_dt

  panic(main thread): Internal assertion failure
  oh no: Bun has crashed. This indicates a bug in Bun, not your code.

  To send a redacted crash report to Bun's team,
  please file a GitHub issue using the link below:

  https://bun.report/1.3.5/e_11e86cebEugggC++08F+mvBoxhkf0389e__0shkwCA0eNrzzCtJLcpLzFFILC5OLSrJzM9TSEvMzCktSgUAiSkKPg

  ---

  Error in Chrome Extension Service Worker console when running:
  chrome.runtime.connectNative('com.anthropic.claude_code_browser_extension')

  Result: Unchecked runtime.lastError: Native host has exited.

Steps to Reproduce

Steps to Reproduce

  1. Install Claude Code 2.1.22 on Windows 11
  2. Install Claude Chrome Extension 1.0.40 from Chrome Web Store
  3. Open Claude Code in terminal
  4. Run /chrome - it shows "connected"
  5. Ask Claude to "open a new tab and go to google.com"
  6. Observe error: "Browser extension is not connected"

Alternative way to reproduce (direct test):

  1. Open CMD or PowerShell
  2. Run: echo {"type":"ping"} | claude.exe --chrome-native-host
  3. Observe Bun crash with "panic(main thread): Internal assertion failure"

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.17

Claude Code Version

2.1.22 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

## Root Cause Identified

The bug is in Bun 1.3.5 when creating Windows Named Pipes. The crash happens immediately after attempting to create the socket listener at
\\.\pipe\claude-mcp-browser-bridge-[USERNAME]

## Version 2.1.17 Works!

I tested with version 2.1.17 via npm and it does NOT crash:

npm install -g @anthropic-ai/claude-code@2.1.17
echo {"type":"ping"} | claude.cmd --chrome-native-host

Result:
[Claude Chrome Native Host] Initializing...
[Claude Chrome Native Host] Creating socket listener: \\.\pipe\claude-mcp-browser-bridge-[USERNAME]
[Claude Chrome Native Host] Socket server listening for connections

The socket is successfully created and listens for connections.

## Why /chrome Shows "Connected" But It Doesn't Work

The /chrome command likely only checks if the extension is installed and configuration exists, but does NOT actually test if the Native Host can successfully start without crashing.

## Additional Issue Found

The extension's options.html has CSP violations:
Executing inline script violates the following Content Security Policy directive 'script-src 'self''.

## Suggested Fixes

  1. Fix the Bun crash - Update or patch Bun to fix Windows Named Pipe handling
  2. Improve /chrome status - Actually test the native host connection, not just configuration
  3. Provide Node.js fallback - Allow the native host to run via Node.js on Windows
  4. Better error messages - Show specific error when native host crashes instead of generic "not connected"

## Bun Crash Report

https://bun.report/1.3.5/e_11e86cebEugggC++08F+mvBoxhkf0389e__0shkwCA0eNrzzCtJLcpLzFFILC5OLSrJzM9TSEvMzCktSgUAiSkKPg

View original on GitHub ↗

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