[VS Code Extension] v2.1.129 fails to activate on Windows: hardcoded Linux CI path in bundled SDK (regression)

Resolved 💬 13 comments Opened May 6, 2026 by alexoDevMX Closed May 6, 2026

Summary

The VS Code extension Anthropic.claude-code v2.1.129 (win32-x64) fails to activate on Windows. A Linux GitHub Actions runner path is hardcoded inside the bundled extension.js, causing a TypeError during the onStartupFinished activation event. Because the extension never activates, none of its commands (e.g. claude-vscode.editor.openLast) are registered, and clicking the editor-title "Claude Code: Open" button produces command 'claude-vscode.editor.openLast' not found.

This is a regression of an issue that has been reported and closed repeatedly across releases:

  • #28073 / #28100 (v2.1.51)
  • #28416 / #28418 (v2.1.55)
  • #37098 (v2.1.81)
  • #41383 (also command 'claude-vscode.editor.openLast' not found on Windows activation failure)

The same bundling defect keeps reappearing — strongly suggests there is no Windows smoke test for the packaged extension in CI.

Environment

  • OS: Windows 11 Pro 10.0.26200
  • VS Code: 1.118.1 (x64), commit 034f571df509819cc10b0c8129f66ef77a542f0e
  • Extension: Anthropic.claude-code v2.1.129, target win32-x64
  • Previous version 2.1.128 activates correctly (but does not contribute the claude-vscode.editor.openLast command).

Stack trace (from exthost.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 Object.<anonymous> (c:\Users\<user>\.vscode\extensions\anthropic.claude-code-2.1.129-win32-x64\extension.js:102:5407)

Repro

  1. Install Anthropic.claude-code v2.1.129 on Windows (VS Code 1.118.x).
  2. Restart VS Code.
  3. Open any workspace and click the "Claude Code: Open" icon contributed to the editor title bar.
  4. Observe command 'claude-vscode.editor.openLast' not found.
  5. Open Output → "Extension Host" → see the activation TypeError above.

Likely cause

At extension.js:102:5407 the bundle appears to call require() / createRequire() / fileURLToPath() (or similar) with a literal absolute path captured at build time on the Linux CI runner: file:///home/runner/work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs. On non-Linux machines this path doesn't exist and Node rejects it.

Workaround

Downgrade to v2.1.128 via Extensions → ⚙ → "Install Another Version..." (note: 2.1.128 doesn't contribute the editor "Open" button, but the extension activates and the rest of the commands work via the Command Palette).

Asks

  • Re-publish 2.1.129 with the SDK path resolved relative to __dirname / extension URI (or via import.meta.url) rather than the build-time absolute path.
  • Add a Windows smoke test that activates the packaged extension in CI so this regression stops recurring across releases.

View original on GitHub ↗

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