claude-code - 💡(How to fix) Fix [VS Code Extension] v2.1.129 fails to activate on Windows: hardcoded Linux CI path in bundled SDK (regression) [9 comments, 6 participants]

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…
GitHub stats
anthropics/claude-code#56501Fetched 2026-05-07 03:52:48
View on GitHub
Comments
9
Participants
6
Timeline
157
Reactions
17
Assignees
Timeline (top)
cross-referenced ×64marked_as_duplicate ×62commented ×9subscribed ×9

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.

Error Message

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

Root Cause

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.

Fix Action

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

Code Example

[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)
RAW_BUFFERClick to expand / collapse

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.

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