Claude Code VS Code Extension fails to activate on Windows — hardcoded Linux CI path in build artifact
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?
Environment:
OS: Windows (win32-x64)
VS Code version: 1.118.1
Claude Code CLI version: 2.1.129
Claude Code VS Code Extension: Latest from Marketplace (Anthropic.claude-code)
Node.js: Bundled with VS Code
Account: Claude Max subscriber
Description:
The Claude Code VS Code extension fails to activate entirely. The extension panel shows an infinite loading spinner and no commands register (e.g., "Claude Code: Show Logs" returns command 'claude-vscode.showLogs' not found).
The CLI (claude) works perfectly in both the external PowerShell terminal and the VS Code integrated terminal. The issue is isolated to the VS Code extension webview.
Root Cause (from Developer Tools Console):
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'.
The extension is referencing a Linux CI build path (/home/runner/work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs) that does not exist on Windows. This appears to be a hardcoded path from the CI/CD build pipeline that was not resolved/bundled correctly in the published extension artifact.
What was tried (none resolved the issue):
Reinstalled the VS Code extension (clean uninstall + cache clear + fresh install)
Cleared %APPDATA%\Code\User\globalStorage\anthropic.claude-code
Cleared %APPDATA%\Code\User\workspaceStorage Claude Code entries
Reinstalled Claude Code CLI
Restarted VS Code and system
Ran code --disable-extensions and enabled only Claude Code
Ran /doctor in CLI — all checks passed
Expected behavior: Extension should activate and register commands successfully on Windows.
Actual behavior: Extension fails at activation due to an unresolvable Linux file path baked into the build artifact.
Workaround: Using claude directly in VS Code's integrated terminal works fine.
What Should Happen?
Extension should activate and register commands successfully on Windows.
Error Messages/Logs
Extension fails at activation due to an unresolvable Linux file path baked into the build artifact.
Steps to Reproduce
1> Install Claude Code CLI via npm install -g @anthropic-ai/claude-code (v2.1.129)
2> Install "Claude Code for VS Code" extension from Marketplace
3> Open VS Code on Windows
4> Observe: Claude Code tab shows infinite loading spinner
5> Run any Claude Code command from Command Palette → "command not found"
6> Open Developer Tools (Ctrl+Shift+I) → Console tab → see activation failure error above
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.129 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗