[BUG] VS Code extension fails to activate on Windows — hardcoded Linux path in extension.js
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: Windows, VS Code 1.109.5, Claude Code CLI 2.1.51, Node.js v24.13.1
What I tried: What you tried: fresh install, reinstall, reload window, etc.
What Should Happen?
Side bar should open
Error Messages/Logs
Error Log:
2026-02-23 21:28:35.768 [info] Extension host with pid 8340 started
2026-02-23 21:28:35.768 [info] Skipping acquiring lock for c:\Users\rmcmullen\AppData\Roaming\Code\User\workspaceStorage\1ff87d4c3db708a6f8e22a8b4d34071b.
2026-02-23 21:28:35.802 [info] ExtensionService#_doActivateExtension vscode.github-authentication, startup: false, activationEvent: 'onAuthenticationRequest:github'
2026-02-23 21:28:35.823 [info] ExtensionService#_doActivateExtension mechatroner.rainbow-csv, startup: false, activationEvent: 'onLanguage:plaintext'
2026-02-23 21:28:35.829 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage'
2026-02-23 21:28:35.902 [info] ExtensionService#_doActivateExtension vscode.terminal-suggest, startup: false, activationEvent: 'onTerminalShellIntegration:*'
2026-02-23 21:28:36.788 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '*', root cause: vscode.git
2026-02-23 21:28:36.804 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '*'
2026-02-23 21:28:36.839 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*'
2026-02-23 21:28:36.839 [info] ExtensionService#_doActivateExtension vscode.npm, startup: true, activationEvent: 'workspaceContains:package.json'
2026-02-23 21:28:37.029 [info] Eager extensions activated
2026-02-23 21:28:37.030 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished'
2026-02-23 21:28:37.034 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished'
2026-02-23 21:28:37.048 [info] ExtensionService#_doActivateExtension Anthropic.claude-code, startup: false, activationEvent: 'onStartupFinished'
2026-02-23 21:28:37.102 [error] Activating extension Anthropic.claude-code failed due to an error:
2026-02-23 21:28:37.102 [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 Module.createRequire (node:internal/modules/cjs/loader:1915:13)
at Object.<anonymous> (c:\Users\rmcmullen\.vscode\extensions\anthropic.claude-code-2.1.51-win32-x64\extension.js:45:4602)
at Module._compile (node:internal/modules/cjs/loader:1714:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1848:10)
at Module.load (node:internal/modules/cjs/loader:1448:32)
at Module._load (node:internal/modules/cjs/loader:1270:12)
at c._load (node:electron/js2c/node_init:2:17993)
at e._load (file:///c:/Users/rmcmullen/AppData/Local/Programs/Microsoft%20VS%20Code/072586267e/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:405:6055)
at t._load (file:///c:/Users/rmcmullen/AppData/Local/Programs/Microsoft%20VS%20Code/072586267e/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:223:22773)
at s._load (file:///c:/Users/rmcmullen/AppData/Local/Programs/Microsoft%20VS%20Code/072586267e/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:215:24706)
at TracingChannel.traceSync (node:diagnostics_channel:328:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:244:24)
at Module.require (node:internal/modules/cjs/loader:1470:12)
at require (node:internal/modules/helpers:147:16)
at pee.Cb (file:///c:/Users/rmcmullen/AppData/Local/Programs/Microsoft%20VS%20Code/072586267e/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:254:1256)
2026-02-23 21:28:37.102 [info] ExtensionService#_doActivateExtension eamodio.gitlens, startup: false, activationEvent: 'onStartupFinished'
2026-02-23 21:28:37.709 [info] ExtensionService#_doActivateExtension vscode.configuration-editing, startup: false, activationEvent: 'onLanguage:jsonc'
2026-02-23 21:28:37.715 [info] ExtensionService#_doActivateExtension vscode.json-language-features, startup: false, activationEvent: 'onLanguage:jsonc'
2026-02-23 21:28:37.787 [info] ExtensionService#_doActivateExtension vscode.typescript-language-features, startup: false, activationEvent: 'onLanguage:jsonc'
2026-02-23 21:28:42.944 [info] ExtensionService#_doActivateExtension vscode.extension-editing, startup: false, activationEvent: 'onLanguage:json'
Steps to Reproduce
Install VS Code 1.109.5 on Windows
Install Node.js v24.13.1
Install Claude Code CLI via npm install -g @anthropic-ai/claude-code (version 2.1.51)
Install the Claude Code VS Code extension (Anthropic.claude-code) from the VS Code Marketplace
Restart VS Code
Open Command Palette (Ctrl + Shift + P) → "Claude Code: Open in Side Bar"
Error: command 'claude-vscode.sidebar.open' not found
Check Extension Host logs (Developer: Show Logs) — extension fails to activate with 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'
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.51 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
<img width="608" height="108" alt="Image" src="https://github.com/user-attachments/assets/90d55d98-8d5e-45c9-b0f1-11cca3f757dc" />
<img width="442" height="217" alt="Image" src="https://github.com/user-attachments/assets/7f3e7e13-54f3-4dcb-92b2-8cd559989246" />
This issue has 8 comments on GitHub. Read the full discussion on GitHub ↗