[BUG] Windows: Chrome extension native host crashes with EADDRINUSE pipe conflict
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?
On Windows, the Chrome browser integration fails because both the MCP server (--claude-in-chrome-mcp) and the native messaging host (--chrome-native-host) attempt to create the same named pipe as servers, causing a conflict.
Error:
When the Chrome extension tries to connect via native messaging:
[Claude Chrome Native Host] Initializing...
[Claude Chrome Native Host] Creating socket listener: \\.\pipe\claude-mcp-browser-bridge-{username}
[Claude Chrome Native Host] Socket server error: Error: listen EADDRINUSE: address already in use \\.\pipe\claude-mcp-browser-bridge-{username}
Chrome DevTools console shows:
Unchecked runtime.lastError: Native host has exited.
Root Cause:
Both processes try to be servers on the same named pipe (\\.\pipe\claude-mcp-browser-bridge-{username}). One should be a client connecting to the other's pipe.
Environment:
- OS: Windows 11
- Claude Code: Tested on 2.1.19, 2.1.21, and 2.1.22
- Chrome extension: 1.0.40
- Node.js: 24.x
Note: Version 2.1.19 works correctly. The bug appears in 2.1.21 and 2.1.22.
What Should Happen?
The Chrome extension should successfully connect to Claude Code via native messaging, allowing the browser automation tools (mcp__claude-in-chrome__*) to work properly on Windows.
Error Messages/Logs
[Claude Chrome Native Host] Initializing...
[Claude Chrome Native Host] Creating socket listener: \\.\pipe\claude-mcp-browser-bridge-{username}
[Claude Chrome Native Host] Socket server error: Error: listen EADDRINUSE: address already in use \\.\pipe\claude-mcp-browser-bridge-{username}
at Server.setupListenHandle [as _listen2] (node:net:1918:21)
at listenInCluster (node:net:1997:12)
at Server.listen (node:net:2119:5)
...
Error: listen EADDRINUSE: address already in use \\.\pipe\claude-mcp-browser-bridge-{username}
Steps to Reproduce
- Install Claude Code 2.1.21 or 2.1.22 on Windows
- Install "Claude in Chrome" extension (v1.0.40)
- Start Claude Code session
- Use any browser tool (e.g.,
mcp__claude-in-chrome__tabs_context_mcp) - The MCP server spawns and creates the named pipe
- In Chrome DevTools (extension service worker), run:
chrome.runtime.connectNative('com.anthropic.claude_code_browser_extension') - Native host crashes immediately with EADDRINUSE
Workaround: Use Claude Code version 2.1.19, which works correctly.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.19
Claude Code Version
2.1.22 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗