claude-code - 💡(How to fix) Fix [bug] Extension fails to activate on Windows: invalid file URL path in bundled sdk.mjs (regression after 2.1.133)

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…

Error Message

Error Messages/Logs

Root Cause

The Claude Code for VS Code extension fails to activate on Windows. The extension loads, registers its commands, and shows a "Claude is waiting for your input" notification, but the panel never appears. There is no Claude icon in the Activity Bar, no Output channel for Claude Code in the dropdown, and any command from the palette (e.g. "Claude Code: Open in Side Bar") errors with command 'claude-vscode.<name>' not found — because activation threw before the handlers were registered.

Fix Action

Fix / Workaround

Workaround: Extensions → Claude Code for VS Code → gear icon → "Install Another Version..." → select 2.1.133. Reload window. Extension activates and works normally.

Code Example

Activating extension 'Anthropic.claude-code' failed: 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'.

Subsequent symptoms when invoking any extension command from the palette:
command 'claude-vscode.sidebar.open' not found
command 'claude-vscode.editor.openLast' not found
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

The Claude Code for VS Code extension fails to activate on Windows. The extension loads, registers its commands, and shows a "Claude is waiting for your input" notification, but the panel never appears. There is no Claude icon in the Activity Bar, no Output channel for Claude Code in the dropdown, and any command from the palette (e.g. "Claude Code: Open in Side Bar") errors with command 'claude-vscode.<name>' not found — because activation threw before the handlers were registered.

Root cause is visible in the Developer Tools console: the extension is trying to import its bundled SDK from a Linux GitHub Actions build path (/home/runner/work/claude-cli-internal/...) that was baked into the build artifact and is invalid on Windows. Node rejects the path in Windows and activate() throws.

Downgrading the extension to v2.1.133 fully resolves the issue, so this is a regression introduced in a later version.

What Should Happen?

The extension should activate cleanly on Windows: Activity Bar icon visible, panel openable from the command palette, output channel registered, and Claude usable inside VSCode the same way it works on macOS/Linux.

Error Messages/Logs

Activating extension 'Anthropic.claude-code' failed: 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'.

Subsequent symptoms when invoking any extension command from the palette:
command 'claude-vscode.sidebar.open' not found
command 'claude-vscode.editor.openLast' not found

Steps to Reproduce

  1. Fresh Windows 11 machine.
  2. Install Node v24.15.0 and npm 11.12.1 (https://nodejs.org).
  3. Run npm install -g @anthropic-ai/claude-code — installs CLI v2.1.136. CLI works correctly from PowerShell and from VSCode's integrated terminal.
  4. Install "Claude Code for VS Code" by Anthropic from the VSCode Marketplace (any version newer than 2.1.133).
  5. Open VSCode. Notification appears: "Claude is waiting for your input." No panel is visible anywhere.
  6. Open Help → Toggle Developer Tools → Console, then run "Developer: Reload Window".
  7. Console shows: Activating extension 'Anthropic.claude-code' failed: ... Received 'file:///home/runner/work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs'.
  8. Any "Claude Code: ..." command from the palette errors with command 'claude-vscode.<name>' not found.

Workaround: Extensions → Claude Code for VS Code → gear icon → "Install Another Version..." → select 2.1.133. Reload window. Extension activates and works normally.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.133

Claude Code Version

2.1.136 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

  • Likely duplicate of / related to #57452 — same "command 'claude-vscode.<name>' not found" symptom on Windows, but that report does not include the underlying activation stack trace.
  • The path /home/runner/work/claude-cli-internal/... strongly suggests the build pipeline is recording the absolute path of sdk.mjs from the GitHub Actions Linux runner at build time, rather than resolving it relative to the extension install directory at runtime.

Suggested fix: resolve the SDK path with something like path.join(__dirname, 'build-agent-sdk', 'sdk.mjs') or convert to a file URL with pathToFileURL() at runtime, instead of embedding the build-time absolute path.

Environment:

  • OS: Windows 11 (Windows_NT x64 10.0.26200)
  • VS Code: 1.119.0 (user setup), commit 8b640eef5a6c6089c029249d48efa5c99adf7d51
  • Electron: 39.8.8
  • Node (VSCode runtime): 22.22.1
  • Node (system, used by CLI): v24.15.0
  • npm: 11.12.1
  • Claude Code CLI: 2.1.136
  • Claude Code for VS Code (broken): [paste version — Extensions panel → click extension → version shown under title]
  • Last working extension version: 2.1.133

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] Extension fails to activate on Windows: invalid file URL path in bundled sdk.mjs (regression after 2.1.133)