[BUG] Regression: createRequire fails with hardcoded Linux path on Windows — extension fails to activate (v2.1.129)

Resolved 💬 3 comments Opened May 6, 2026 by alexandro-morato Closed May 6, 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?

Regression confirmed in 2.1.129 on Windows 10
This bug, originally reported and fixed in the 2.1.51–2.1.55 range (#28054, #28056, #28076, #28085, #28397, #28416), has regressed in extension version 2.1.129.
Environment:

OS: Windows 10
VS Code: 1.118.1
Extension: anthropic.claude-code-2.1.129-win32-x64
CLI: 2.1.129 (npm-global, working correctly from PowerShell — claude doctor passes all checks)

Symptom: Extension shows infinite loading spinner in the sidebar, no error surfaced in UI.
Extension Host log:
[info] ExtensionService#_doActivateExtension Anthropic.claude-code, startup: false, activationEvent: 'onStartupFinished'
[error] Activating extension Anthropic.claude-code failed due to an error:
[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> (...\anthropic.claude-code-2.1.129-win32-x64\extension.js:102:5407)
The hardcoded Linux CI build path is back in extension.js. Manually patching createRequire("file:///home/runner/...") to createRequire(__filename) resolves activation immediately, confirming this is the same root cause as the previously fixed issue.
Suggests the build pipeline lost the fix or doesn't include a Windows smoke test for extension activation. Adding one would prevent further regressions of this kind.

What Should Happen?

Claude Code extension UI should run without hanging.

Error Messages/Logs

Steps to Reproduce

%USERPROFILE%\.vscode\extensions\anthropic.claude-code-2.1.129-win32-x64\extension.js contains the following hardcoded string:

"file:///home/runner/work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs"

in createRequire() and fileURLToPath()

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.128

Claude Code Version

2.1.131

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗