Chrome extension not connecting on Windows
Status Closed — not planned
Reported on v2.1.31
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 11 comments · opened Feb 4, 2026 · closed Mar 26, 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?
Environment:
- Windows Version: 10.0.26100.7623
- Claude Code Version: 2.1.31
- Chrome Version: [check chrome://version]
- Extension Version: [check chrome://extensions]
Issue:
The Chrome browser extension is installed and visible in the toolbar, but Claude Code CLI cannot connect to it.
tabs_context_mcp always returns "Browser extension is not connected."
What Should Happen?
Should connect to Chrome!
Error Messages/Logs
Steps to Reproduce
Steps to reproduce:
- Install Claude Code via npm (npm install -g @anthropic-ai/claude-code)
- Install Chrome extension from Chrome Web Store
- Restart Chrome
- Run Claude Code and attempt to use Chrome integration
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.31
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
11 Comments
I have also been having the same issue. it is also on windows. i was using the cc cli within antigravity.
Guys, I fixed it:
Bug Report: Claude-in-Chrome broken on Windows
Component: Claude Code CLI — built-in
claude-in-chromeMCP serverPlatform: Windows (all versions)
Severity: All Claude-in-Chrome browser tools are non-functional on Windows
Affects: Claude Code v2.1.x (standalone
.exe— confirmed on v2.1.32)---
Summary
Every
mcp__claude-in-chrome__*tool call on Windows returns:This happens even when the Chrome extension is installed, enabled, and the
native messaging host is running correctly. The Chrome extension, native host,
and named pipe all work — Claude Code just never connects to the pipe.
---
Root cause
The
getSocketPaths()function (minified asxYI()in v2.1.32) returnsUnix-style socket paths on all platforms, including Windows. It never returns
the Windows named pipe path.
Broken function (
xYI):On Windows, this returns paths like:
Neither of these is the actual named pipe.
Working companion function (
rN$):The
getSocketPath()function (minified asrN$()) already has the correctWindows logic:
This function correctly returns
\\.\pipe\claude-mcp-browser-bridge-{user}onWindows, but
getSocketPaths()never calls it.How the socket pool uses these functions:
The socket pool discovers paths via
getSocketPaths()(broken), createsclients for those wrong paths, they all fail to connect, and the pool reports
zero connected clients → "Browser extension is not connected."
---
The fix
Add a Windows early-return to
getSocketPaths():This is a one-line change. The
getSocketPath()function already does theright thing on Windows.
Important: two copies in the binary
The standalone
.exebundles two copies of this function (at differentoffsets in the bundled JS). Both must be fixed. In v2.1.32 they are at byte
offsets
0x75729DBand0xCBDBCCB.---
How to reproduce
.exe)claudeVerification that the pipe works:
While Chrome is open with the extension active, run this Node.js script:
This will print
CONNECTED— proving the Chrome extension's native host isrunning and the pipe is alive. Claude Code just never tries to connect to it.
Full protocol test:
This returns actual tab data — the entire pipeline works except for the path
discovery in Claude Code itself.
---
Architecture diagram
---
Related issues
All of these are the same root cause.
---
Confirmed working after patch
After applying a binary patch that adds the Windows early-return to both copies
of
getSocketPaths(), all browser tools work correctly:tabs_context_mcp— returns tab listnavigate— navigates to URLscomputer(screenshot) — captures screenshotsread_page— reads accessibility treefind— finds elementsjavascript_tool— executes JS in page contextThe fix has been tested and confirmed working on Windows 11 with Claude Code
v2.1.32 (standalone exe).
Give this to Opus 4.6:
Fix: Claude-in-Chrome Not Connecting on Windows
The "Claude in Chrome" browser automation tools don't work on Windows. Every call
returns "Browser extension is not connected" even though the extension is
installed, enabled, and you're logged in.
This is a known bug in Claude Code on Windows (as of February 2026).
The fix below patches the binary so the tools work correctly.
---
Who is this for?
You need this fix if all three of these are true:
What's the bug?
Claude Code discovers browser connections through socket paths. On Windows, it
should look for a named pipe (
\\.\pipe\claude-mcp-browser-bridge-{user}),but the discovery function returns Unix-style paths (
/tmp/...) instead.The pipe exists and works fine - Claude Code just never looks in the right place.
Prerequisites
.exeversion)---
Step-by-step instructions
Step 1: Find your
claude.exeOpen a terminal (Command Prompt, PowerShell, or Git Bash) and run:
This will print something like:
Copy that path. You'll need it in Step 3.
Step 2: Save the patch script
Create a file called
patch-claude-chrome.jsanywhere on your computer(e.g. your Desktop). Paste this entire script into it:
Step 3: Run the patch script
Open a terminal and run:
If your
claude.exeis not in the default location (~/.local/bin/claude.exe),pass the path from Step 1:
You should see output ending with "PATCH CREATED SUCCESSFULLY" and it
should report patching 2 copies of the function.
Step 4: Close all Claude Code sessions
Type
/exitin every open Claude Code session, or just close the terminalwindows. Claude Code must not be running for the next step to work.
Step 5: Replace the original binary
Open a new terminal and run the appropriate command for your shell:
Command Prompt:
PowerShell:
If your path is different, adjust accordingly. You should see
1 file(s) copied(Command Prompt) or no error (PowerShell).
If you get "being used by another process": Make sure you closed ALL Claude
Code sessions in Step 4. Check Task Manager for any remaining
claude.exeprocesses and end them.
Step 6: Restart Chrome
Close all Chrome windows completely, then reopen Chrome. Visit any webpage
to activate the extension.
Step 7: Start Claude Code and test
Open a new terminal, run
claude, and try any browser tool. For example:If Claude returns tab information or a screenshot, the fix is working!
---
Troubleshooting
"Could not find the target function in this binary"
The patch was written for a specific Claude Code version. If you're on a newer
version, the function may have been renamed or already fixed. Check GitHub
issues for updates.
"being used by another process" when copying
Claude Code is still running. Close ALL terminal windows running Claude Code.
If it still fails, open Task Manager (Ctrl+Shift+Esc), find
claude.exeinthe processes list, and click "End Task" on each one. Then try the copy again.
It says "patched 1 copy" but still doesn't work
The binary contains 2 copies of the broken function. If only 1 was patched,
run the script again - it will find and patch the remaining copy. Make sure
you do the full copy + restart cycle again after.
The fix stopped working after an update
Claude Code auto-updates will overwrite the patched binary. Just re-run the
patch script (Steps 3-7) after each update, until Anthropic ships an official
fix.
How to undo the patch
Command Prompt:
PowerShell:
---
@ivanjuras I tried on 2.1.37 and 2.1.32, it doesn't help. I noticed that the chrome extension updated a couple days ago, which is when it seemed to stop working for me. I'm trying to find an older version of that extension but not haveing much luck right now.
It didn't work for me either. I'm going crazy now that Claude Code can't check its work in Chrome anymore after I had relied on that for weeks!
<img width="993" height="1137" alt="Image" src="https://github.com/user-attachments/assets/5bd047e2-6693-4a00-8847-472162ac03c0" />
WELL, I asked claude.ai to update that patch for the current version of Claude Code, and it worked! Run the following as a .js file in a fresh terminal, and then follow the instructions that it prints into the terminal:
#!/usr/bin/env node
/**
*
*
*
*/
const fs = require("fs");
const path = require("path");
const crypto = require("crypto");
const os = require("os");
const defaultPath = path.join(os.homedir(), ".local", "bin", "claude.exe");
const target = process.argv[2] || defaultPath;
if (!fs.existsSync(target)) {
console.error("ERROR: File not found: " + target);
console.error("\nUsage: node patch-claude-chrome-v2.js \"C:\\path\\to\\claude.exe\"");
process.exit(1);
}
// Decode patch strings from base64 to avoid escaping hell
const origBuf = Buffer.from("ZnVuY3Rpb24gWktJKCl7bGV0IEg9W10sJD1aa0goKTt0cnl7bGV0IEk9UEtJLnJlYWRkaXJTeW5jKCQpO2ZvcihsZXQgZiBvZiBJKWlmKGYuZW5kc1dpdGgoIi5zb2NrIikpSC5wdXNoKG1ZLmpvaW4oJCxmKSl9Y2F0Y2h7fWxldCBBPWBjbGF1ZGUtbWNwLWJyb3dzZXItYnJpZGdlLSR7ZHpBKCl9YCxMPW1ZLmpvaW4oZ3kudG1wZGlyKCksQSksRD1gL3RtcC8ke0F9YDtpZighSC5pbmNsdWRlcyhMKSlILnB1c2goTCk7aWYoTCE9PUQmJiFILmluY2x1ZGVzKEQpKUgucHVzaChEKTtyZXR1cm4gSH0=", "base64");
const patchBuf = Buffer.from("ZnVuY3Rpb24gWktJKCl7aWYoZ3kucGxhdGZvcm0oKT09PSJ3aW4zMiIpcmV0dXJuWyJcXFxcLlxccGlwZVxcIitROUUoKV07bGV0IEE9YGNsYXVkZS1tY3AtYnJvd3Nlci1icmlkZ2UtJHtkekEoKX1gLEw9bVkuam9pbihneS50bXBkaXIoKSxBKTtyZXR1cm5bTF0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0=", "base64");
if (origBuf.length !== patchBuf.length) {
console.error("FATAL: length mismatch (script bug)");
process.exit(1);
}
console.log("\nReading: " + target);
const bin = fs.readFileSync(target);
console.log("Size: " + (bin.length / 1024 / 1024).toFixed(1) + " MB");
const hashBefore = crypto.createHash("sha256").update(bin).digest("hex").slice(0, 16);
console.log("SHA-256: " + hashBefore + "...");
// Find and patch all occurrences
let patchCount = 0;
let offset = 0;
while (true) {
const idx = bin.indexOf(origBuf, offset);
if (idx === -1) break;
console.log("Found unpatched copy at offset " + idx + " (0x" + idx.toString(16) + ")");
patchBuf.copy(bin, idx);
offset = idx + origBuf.length;
patchCount++;
}
// Count already-patched
let alreadyPatched = 0;
offset = 0;
while (true) {
const idx = bin.indexOf(patchBuf, offset);
if (idx === -1) break;
alreadyPatched++;
offset = idx + patchBuf.length;
}
console.log("\nNewly patched: " + patchCount);
console.log("Already patched: " + (alreadyPatched - patchCount));
console.log("Total patched copies: " + alreadyPatched);
if (patchCount === 0 && alreadyPatched > 0) {
console.log("\n Already fully patched! Nothing to do.");
console.log(" If still not working, restart both Claude Code and Chrome.\n");
process.exit(0);
}
if (patchCount === 0 && alreadyPatched === 0) {
console.error("\nERROR: Could not find the target function in this binary.");
console.error("This patch was written for Claude Code v2.1.37 (function ZKI).");
console.error("Run find-function.js to check your version's function names.\n");
process.exit(1);
}
// Backup
const backupPath = target + ".backup";
if (!fs.existsSync(backupPath)) {
fs.copyFileSync(target, backupPath);
console.log("\nBackup saved: " + backupPath);
} else {
console.log("\nBackup already exists: " + backupPath);
}
// Write patched binary
const patchedPath = target + ".patched";
fs.writeFileSync(patchedPath, bin);
const hashAfter = crypto.createHash("sha256").update(bin).digest("hex").slice(0, 16);
console.log("Patched SHA-256: " + hashAfter + "...");
console.log("\nPatched file written to: " + patchedPath);
console.log("");
console.log("=======================================");
console.log(" PATCH CREATED SUCCESSFULLY (" + patchCount + " copies patched)");
console.log("=======================================");
console.log("");
console.log("Now do these steps IN ORDER:");
console.log("");
console.log(" 1. CLOSE all Claude Code terminal sessions");
console.log(" (type /exit in each, or close the terminals)");
console.log("");
console.log(" 2. Replace the original with the patched file.");
console.log(" In a NEW Command Prompt, run:");
console.log("");
console.log(' copy /Y "' + patchedPath + '" "' + target + '"');
console.log("");
console.log(" 3. CLOSE Chrome completely (all windows)");
console.log("");
console.log(" 4. Reopen Chrome");
console.log("");
console.log(" 5. Open a new terminal and run: claude");
console.log("");
console.log(" 6. Test: ask Claude to look at a website");
console.log("");
console.log("To undo the patch:");
console.log("");
console.log(' copy /Y "' + backupPath + '" "' + target + '"');
console.log("");
console.log("NOTE: 'claude update' will overwrite the patch.");
console.log(" Re-run this script after updating.");
console.log("");
my issue was that there's a compounding problem with Claude Desktop, I created a new issue here, it has a workaround for that too: https://github.com/anthropics/claude-code/issues/24507
when I do both workarounds, now Claude extension works
Thanks for the notice. I had closed down Claude Desktop while I was
trying to get this to work, and this is good reminder that when I reopen
Claude Desktop, my Claude Code may fail once again to connect to the Chrome
extension. Then I'll take a look for that additional workaround.
Thanks again.
On Mon, Feb 9, 2026 at 4:14 PM JasonS @.***> wrote:
Anthropic, please fix already. This issue has been open forever!
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.