[BUG] VS Code extension with version 2.1.51 (anthropic.claude-code-2.1.51-win32-x64) fails to activate on Windows
Resolved 💬 6 comments Opened Feb 24, 2026 by DanStevensonMSFT Closed Feb 25, 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?
- VS Code extension with version 2.1.51 (anthropic.claude-code-2.1.51-win32-x64) fails to activate on Windows
- Error: TypeError: The argument 'filename' must be a file URL object... with a hardcoded Linux CI path
(file:///home/runner/work/claude-cli-internal/...) baked into extension.js
- Workaround: downgrade to 2.1.49
What Should Happen?
Claude extension should load in VS Code
Error Messages/Logs
2026-02-23 19:52:36.836 [error] Activating extension Anthropic.claude-code failed due to an error:
2026-02-23 19:52:36.836 [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\dansteve\.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/dansteve/AppData/Local/Programs/Microsoft%20VS%20Code/072586267e/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:405:6055)
at t._load (file:///c:/Users/dansteve/AppData/Local/Programs/Microsoft%20VS%20Code/072586267e/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:223:22773)
at s._load (file:///c:/Users/dansteve/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 Module.require (c:\Users\dansteve\.vscode\extensions\github.copilot-chat-0.37.8\dist\extension.js:382:36169)
at require (node:internal/modules/helpers:147:16)
at pee.Cb (file:///c:/Users/dansteve/AppData/Local/Programs/Microsoft%20VS%20Code/072586267e/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:254:1256)
Steps to Reproduce
1 .load VS Code
- click Claude button or have a Claude session trying to auto-start
- observe nothing happens
- look at console logs for error
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.49
Claude Code Version
2.1.51
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗