[BUG] [Windows] Extension fails to activate - hardcoded Linux CI path in sdk.mjs (v2.1.129)

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

The Claude Code VS Code extension (anthropic.claude-code-2.1.129-win32-x64) fails to activate on Windows. The extension bundle (extension.js) contains a hardcoded Linux CI build path for sdk.mjs (file:///home/runner/work/claude-cli-internal/...) which is invalid on Windows, causing a TypeError crash during activation. As a result, all Claude Code commands (including claude-vscode.editor.openLast) are unavailable and the extension is completely non-functional.

What Should Happen?

The Claude Code VS Code extension should activate successfully on Windows. The sdk.mjs path should resolve to the correct local Windows path within the installed extension directory, not a hardcoded Linux CI build agent path.

Error Messages/Logs

2026-05-06 11:05:17.554 [error] Activating extension Anthropic.claude-code failed due to an error:
2026-05-06 11:05:17.554 [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\6134908\.vscode\extensions\anthropic.claude-code-2.1.129-win32-x64\extension.js:102:5407)
    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)
    at Module._load (node:internal/modules/cjs/loader:1270:12)

Additionally, the VS Code UI shows:
command 'claude-vscode.editor.openLast' not found

Steps to Reproduce

  1. On a Windows machine, install the Claude Code VS Code extension (Anthropic.claude-code v2.1.129) from the VS Code Marketplace
  2. Open VS Code with any project
  3. Click the Claude Code icon in the Activity Bar
  4. Observe the error notification: command 'claude-vscode.editor.openLast' not found
  5. Open Extension Host logs via Ctrl+Shift+P → Show Extension Host Log to confirm the TypeError

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.117 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

  • The hardcoded path file:///home/runner/work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs appears to be the CI build agent's local path leaked into the production Windows extension bundle during the build process
  • The issue is in extension.js at line 102, position 5407, where Module.createRequire receives this invalid Linux file URL on a Windows host
  • The win32-x64 variant of the extension is affected — this is the standard Windows 64-bit build
  • No workaround is currently available; the extension is entirely non-functional on this machine

Screenshot:

<img width="1920" height="1031" alt="Image" src="https://github.com/user-attachments/assets/240db650-6c55-4385-a1bd-741dde5b4cbb" />

View original on GitHub ↗

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