Windows: Chrome extension never connects - cc4() returns file paths instead of named pipe path
Description
On Windows, the Chrome browser extension ("Claude in Chrome") never connects to Claude Code. Every call to any mcp__claude-in-chrome__* tool returns:
Browser extension is not connected. Please ensure the Claude browser extension is installed and running...
This happens even though:
- The Chrome extension is installed and enabled (v1.0.47)
- Chrome is running with the user logged into claude.ai (same account as Claude Code)
- The native messaging host is correctly configured (registry + JSON + batch file)
- Chrome successfully spawns the native host process (
--chrome-native-host) - The native host successfully creates the named pipe
\.\pipe\claude-mcp-browser-bridge-<username>
Root Cause
The function cc4() (aliased name in minified cli.js, around line 3023) computes socket paths for the MCP client pool, but does not return the correct Windows named pipe path.
On Windows:
tW6()correctly returns\.\pipe\claude-mcp-browser-bridge-<username>(used by the native host to create the pipe)cc4()returns file system paths viapath.join(os.tmpdir(), pipeName), producing paths like:C:\Users\<user>\AppData\Local\Temp\claude-mcp-browser-bridge-<username>/tmp/claude-mcp-browser-bridge-<username>
Neither of these is a valid Windows named pipe. The MCP client pool (W2q/M2q) uses cc4() exclusively to find socket paths, so it never tries the correct \.\pipe\... path.
Reproduction
// Run this on Windows to see the mismatch:
const os = require('os');
const path = require('path');
const username = os.userInfo().username;
const pipeName = `claude-mcp-browser-bridge-${username}`;
// What tW6() returns (correct):
const tW6 = `\\.\pipe\${pipeName}`;
// What cc4() returns (wrong):
const cc4 = [
path.join(os.tmpdir(), pipeName), // File path, NOT a pipe
`/tmp/${pipeName}` // Unix path, doesn't exist
];
console.log('Native host creates pipe at:', tW6);
console.log('MCP client pool tries:', cc4);
console.log('Mismatch:', !cc4.includes(tW6)); // true = BUG
Evidence
Tested by connecting to both paths from Node.js:
- Wrong path (
cc4()output):ENOENT- file not found - Correct pipe (
tW6()output): Connection successful
Suggested Fix
cc4() needs a Windows-specific code path:
function cc4() {
if (os.platform() === "win32") {
return [tW6()]; // On Windows, return the named pipe path
}
// ... existing Unix logic for .sock files ...
}
Or alternatively, the pool client W2q/M2q should always include the socketPath from tW6() in addition to paths from cc4().
Environment
- Claude Code version: 2.1.37
- OS: Windows 10/11 (win32)
- Node.js: v24.13.0
- Chrome extension: v1.0.47
- Platform: x64
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗