[BUG] VSCode extension fails to activate on Windows - hardcoded Linux path in sdk.mjs

Resolved 💬 3 comments Opened Feb 24, 2026 by Skyfall-R Closed Feb 24, 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 VSCode extension (v2.1.51) fails to activate on Windows. It stays stuck at "Activating..." indefinitely.

The Developer Tools console shows the following error:

Activating extension 'Anthropic.claude-code' failed: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received '/home/runner/.work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs'.

The extension appears to have a hardcoded Linux path (/home/runner/.work/...) that does not exist on Windows, causing activation to fail completely. The CLI itself works fine (claude --version returns 2.1.51).

What Should Happen?

The extension should activate successfully on Windows and display the Spark icon in the editor toolbar, allowing users to open Claude Code directly from VSCode without using the terminal.

Error Messages/Logs

ERR [UriError]: Scheme contains illegal characters.

Activating extension 'Anthropic.claude-code' failed: The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received '/home/runner/.work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs'.

Error: command 'claude-vscode.terminal.open' not found
    at pit.n (commandService.ts:95:26)
    at pit.executeCommand (commandService.ts:89:15)
    at async Get.u (actions.ts:199:3)
    at async Get.run (actions.ts:190:4)
    at async $h.onClick (menuEntryActionViewItem.ts:211:4)

Steps to Reproduce

  1. Install Claude Code CLI on Windows (npm install -g @anthropic-ai/claude-code)
  2. Install the Claude Code for VS Code extension (v2.1.51)
  3. Open any file in VSCode
  4. Extension stays stuck at "Activating..." indefinitely
  5. The Spark icon never appears in the editor toolbar

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Claude Code CLI version: 2.1.51

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

The hardcoded path '/home/runner/.work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs' suggests this is a build/packaging issue where the CI runner's Linux path was accidentally embedded into the extension bundle. This path does not exist on any end-user Windows machine.

View original on GitHub ↗

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