Add Windows workaround for Chrome extension bridge connection failure#34789
Closed
cruzlauroiii wants to merge 2 commits intoanthropics:mainfrom
Closed
Add Windows workaround for Chrome extension bridge connection failure#34789cruzlauroiii wants to merge 2 commits intoanthropics:mainfrom
cruzlauroiii wants to merge 2 commits intoanthropics:mainfrom
Conversation
When the tengu_copper_bridge feature flag is enabled server-side, the --claude-in-chrome-mcp subprocess uses a WebSocket bridge instead of the local named pipe, causing "Browser extension is not connected" errors on Windows. This script patches the npm-installed cli.js to disable the bridge and routes the native messaging host through Node.js, forcing local socket mode which works correctly. Fixes #34788
Author
This was referenced Mar 16, 2026
Closed
- patches/cli.js.patch: exact diff disabling _Oz() bridge URL resolver
- patches/chrome-native-host.bat: routes native host through Node.js
- patches/README.md: version, SHA-256 hashes, and extension metadata
Source versions:
cli.js v2.1.76 (build 2026-03-14T00:12:49Z)
original: 38b8fd29d0817e5f75202b2bb211fe959d4b6a4f2224b8118dabf876e503b50b
patched: 6ea2a57ddd49c3f0869e77e027f3de0c2116c390a0d338963f70bec9b92b537c
Chrome extension v1.0.61 (fcoeoabgfenejglbffodgkkbkcdhcgfn)
service-worker: fa55ffbb749310582e7aab3b5154fc899bdfcf65c92ed916f8b05834b6ccddf9
Fixes #34788
This was referenced Mar 16, 2026
Open
This was referenced Mar 16, 2026
Author
|
Superseded by plugin-based approach: the bridge fix is now packaged as a Claude Code plugin in plugins/bridge-fix/ with proper install/uninstall scripts. See PR #35683 for the new plugin approach and https://github.com/anthropics/claude-code/pull/new/plugin/bridge-fix for the bridge-fix plugin specifically. The plugin includes:
This makes the fix portable across versions and easier to maintain than raw patch files. |
This was referenced Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/fix-windows-chrome.ps1— PowerShell script that patches cli.js and chrome-native-host.batpatches/cli.js.patch— exact diff disabling_Oz()bridge URL resolverpatches/chrome-native-host.bat— routes native host through Node.js + patched cli.jspatches/README.md— full version and hash documentationProblem
When
tengu_copper_bridgeis enabled server-side (Max subscribers),_Oz()returnswss://bridge.claudeusercontent.com, forcing the MCP server to useBridgeClient(y61) instead of the local socket pool (pzA). The bridge fails to connect, with no fallback to local sockets, causing "Browser extension is not connected" on every tool call.The local named pipe (
\.\pipe\claude-mcp-browser-bridge-{user}) works perfectly.Source Versions
cli.js38b8fd29d0817e5f75202b2bb211fe959d4b6a4f2224b8118dabf876e503b50bfa55ffbb749310582e7aab3b5154fc899bdfcf65c92ed916f8b05834b6ccddf9cli.js6ea2a57ddd49c3f0869e77e027f3de0c2116c390a0d338963f70bec9b92b537cExtension ID:
fcoeoabgfenejglbffodgkkbkcdhcgfnThe Patch (1 line)
Adds
return;at the start of_Oz(), making it always returnundefined. This preventsbridgeConfigfrom being set, forcingXd1()to use the local socket pool instead of BridgeClient.Test plan
dzA— confirmed unpatched usesy61(BridgeClient), patched usespzA(local pool)tabs_context_mcp-Uninstallflag reverts the patchFixes #34788
Related: #23828, #33778, #32825, #26241