[BUG] VS Code extension v2.1.136 (win32-x64) fails to activate — hardcoded Linux CI path in createRequire (regression of #56549, #56725)
Summary
VS Code extension anthropic.claude-code-2.1.136-win32-x64 fails to activate on Windows with a TypeError from createRequire receiving a hardcoded Linux CI path. This is a regression of the same class of bug previously reported and closed for v2.1.129 (e.g. #56549, #56598, #56610, #56725, #56632).
Environment
- OS: Windows 10 Enterprise Evaluation 10.0.19045
- VS Code: 8b640eef5a
- Extension:
anthropic.claude-codev2.1.136 win32-x64 - Node (Electron host): default bundled
- Claude CLI: installed and on PATH (
C:\Users\<user>\AppData\Roaming\npm\claude.cmd)
Repro
- Install Claude Code VS Code extension v2.1.136 (win32-x64) from Marketplace
- Open any folder in VS Code
- Trigger any Claude Code command (Ctrl+Shift+P → \
Claude Code: ...\) or click the extension icon - Sidebar opens but loads infinitely; symptom from the user's perspective is \
command 'claude-vscode.editor.openLast' not found\until the activation error log surfaces
Actual error (from \Window\ Output channel)
\\\\
2026-05-08 16:56:37.985 [info] ExtensionService#_doActivateExtension Anthropic.claude-code, startup: false, activationEvent: 'onCommand:claude-vscode.editor.openLast'
2026-05-08 16:56:38.615 [error] Activating extension Anthropic.claude-code failed due to an error:
2026-05-08 16:56:38.615 [error] TypeError: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received 'file:///home/runner/work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs'
at Module.createRequire (node:internal/modules/cjs/loader:1922:13)
at Object.<anonymous> (c:\Users\<user>\.vscode\extensions\anthropic.claude-code-2.1.136-win32-x64\extension.js:103:5579)
at Module._compile (node:internal/modules/cjs/loader:1713:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1847:10)
at Module.load (node:internal/modules/cjs/loader:1448:32)
...
\\
Root cause (same as previously fixed bug)
The bundled \extension.js\ contains a hardcoded reference to \/home/runner/work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs\ — a GitHub Actions Linux runner path baked in at build time. Node on Windows rejects this in \createRequire\ because it's not a valid Windows absolute path nor a proper file URL.
This was previously fixed for v2.1.129 (see closed issues #56549, #56598, #56610, #56725, #56632 etc.) but appears to have regressed in v2.1.136 win32-x64 — the build pipeline once again is shipping the Linux path in the win32 artifact.
Workaround
Downgrade to a working prior version (e.g. 2.1.133 or earlier) via VS Code Extensions → \"Install Another Version...\" and disable Auto Update for the extension to prevent it from upgrading back to 2.1.136.
Suggested fix
Audit the build pipeline / esbuild config that produces the per-platform VSIX bundles to ensure the SDK path is rewritten or resolved relative to the extension install dir at runtime, rather than baked in from \process.cwd()\ at CI build time. Add a regression test that loads each platform's bundled \extension.js\ on the matching OS and asserts \activate()\ succeeds, since this exact bug has now shipped twice.
12 Comments
I independently reproduced the same regression on Windows and accidentally opened #57416 a moment after this issue. Adding the extra evidence here so the signal stays consolidated.
Environment from my repro:
Activation failure from the VS Code Extension Host log:
Static inspection of the installed bundle mapped that location to a top-level call equivalent to:
Local diagnostic patch tested:
After reloading VS Code, the extension activated successfully again. This is only a local diagnostic workaround, not a recommended user fix, but it confirms the activation failure is caused by the packaged top-level
createRequire(...)argument rather than auth, settings, MCP config, installation corruption, or the bundledclaude.exe.I will close #57416 as a duplicate of this issue.
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Confirming on Windows 11 Enterprise, VS Code extension 2.1.136-win32-x64. Same createRequire TypeError with the
file:///home/runner/work/claude-cli-internal/... path at extension.js:103:5579. Auto-update pushed 2.1.136 ~2 hours
ago and broke activation; downgrading to the prior working version and disabling auto-update works around it. Please
prioritize — this is the second time this regression has shipped.
Claude VsCode extension is bricked on Windows for me as well.
Same exact issue happened with v2.1.129 a few days ago: https://github.com/anthropics/claude-code/issues/56504
Reverting back to 2.1.133 with a manual installation resolved it for me.
Adding an evidence point that may shift the framing of the fix.
I just diagnosed this on Windows 11 Home (build 26200), VS Code 1.119.0, also recovered by rolling back to 2.1.133. Standard reproduction, nothing new there.
What's worth flagging: the hardcoded Linux path is also present in the working 2.1.133 bundle, not just in 2.1.136. Verified by grepping the installed
extension.js:So the latent bug has been in the bundle the whole time. The reason 2.1.133 works is that the
if (!A)fallback branch is never taken —pathToClaudeCodeExecutableis populated correctly from the bundledresources\native-binary\claude.exe(225 MB) and passed to the SDK. Confirmed in my Claude VSCode log:What 2.1.136 must have changed is something upstream that makes
pathToClaudeCodeExecutablefall through as falsy on Windows — either (a) the native binary stopped being packaged in the win32-x64 VSIX, (b) the resolver that builds the path got reworked and broke on Windows, or (c) the SDK destructuring dropped the field. Then the latent fallback fires and explodes.This means the suggested fix needs two parts, not one:
createRequireargument resolve at runtime (e.g.__filename, or platform-aware) — which removes the booby trap for good.pathToClaudeCodeExecutableto stop being passed on Windows in the first place — otherwise even with #1 patched, users would silently fall through to a less-optimal codepath.Tracking only #1 risks shipping 2.1.137 that "works" but is structurally identical to 2.1.133 (i.e., still one upstream regression away from the next outage). The regression test suggested in the issue body should explicitly assert that
pathToClaudeCodeExecutableis truthy when SDKquery()is invoked from the packaged win32-x64 extension, not just that activation succeeds.Have the same Issue...
same issue in antigravity
Confirmed on Windows - same symptoms: Activity Bar icon missing,
commands not found, model selector broken. Rolled back to 2.0.62.
+1, reproducible on Windows 11 (x64) with extension v2.1.136.
Environment
Symptom
✻ Claude Codeclick → toastcommand 'claude-vscode.editor.openLast' not foundRoot cause (from exthost.log)
Thanks for reporting! We believe we have resolved this issue in v2.1.137 which is available now. Please update to pick up the fix.
This issue was fixed as of version 2.1.137.
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.