claude-code - 💡(How to fix) Fix [BUG] VS Code extension v2.1.136 (win32-x64) fails to activate — hardcoded Linux CI path in createRequire (regression of #56549, #56725)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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).

Error Message

  1. 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: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'

Root Cause

Root cause (same as previously fixed bug)

Fix Action

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.

RAW_BUFFERClick to expand / collapse

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-code v2.1.136 win32-x64
  • Node (Electron host): default bundled
  • Claude CLI: installed and on PATH (C:\Users\<user>\AppData\Roaming\npm\claude.cmd)

Repro

  1. Install Claude Code VS Code extension v2.1.136 (win32-x64) from Marketplace
  2. Open any folder in VS Code
  3. Trigger any Claude Code command (Ctrl+Shift+P → `Claude Code: ...`) or click the extension icon
  4. 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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] VS Code extension v2.1.136 (win32-x64) fails to activate — hardcoded Linux CI path in createRequire (regression of #56549, #56725)