[BUG] VSCode extension activation fails on Windows 10 - Linux CI path baked into sdk.mjs
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 (installed from Marketplace) fails to activate on Windows 10. Clicking the Claude sidebar panel icon produces the error:
command 'claude-vscode.terminal.open' not found
The extension appears as installed and enabled, but never activates. There is no "Claude Code" entry in the Output panel dropdown.
Actual Behaviour:
Extension fails to activate silently. No "Claude Code" entry appears in the Output panel. Clicking the sidebar icon produces the command-not-found error.
What Should Happen?
The Claude Code panel should open in the VSCode sidebar and be functional (Windows).
Error Messages/Logs
Error from Developer Tools Console:
Opening Developer: Toggle Developer Tools → Console tab reveals:
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'.
Followed by:
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
- Install Claude Code CLI v2.1.51 on Windows 10
- Install Claude Code extension from VS Code Marketplace
- Open VS Code
- Click the Claude Code sidebar icon
- Observe "command 'claude-vscode.terminal.open' not found" error
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
Extension version: 2.1.51 (anthropic.claude-code-2.1.51-win32-x64)
Claude Code Version
Claude Code CLI version: 2.1.51 (Claude Pro)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
Environment:
- Platform: Anthropic API (Claude Pro/Max)
- Claude Code CLI version: 2.1.51
- Extension version: 2.1.51 (anthropic.claude-code-2.1.51-win32-x64)
- Operating System: Windows 10
- VS Code version: 1.109.5
- Terminal: PowerShell
Root Cause
The extension bundle contains a hardcoded Linux CI path (file:///home/runner/work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs) which appears to originate from the GitHub Actions build environment. Windows cannot resolve this path, causing the extension activation to fail entirely.
Notes:
- The CLI works correctly from an external terminal (claude.exe --version returns 2.1.51)
- The CLI binary is present at C:\Users\<user>\.local\bin\claude.exe
- The extension's bundled binary is present at ~\.vscode\extensions\anthropic.claude-code-2.1.51-win32-x64\resources\native-binary\claude.exe
- Reinstalling the extension from the Marketplace does not resolve the issue
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗