Description
Claude Code for VS Code extension (v2.1.51) fails to activate on Windows with a fatal error. All extension commands are unavailable, including claude-vscode.editor.openLast.
Environment
- OS: Windows 11 (or specify your Windows version)
- VS Code Version: 1.95.3 (check yours: Help → About)
- Extension Version: 2.1.51 (win32-x64)
- Extension ID: Anthropic.claude-code
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\DELL\.vscode\extensions\anthropic.claude-code-2.1.51-win32-x64\extension.js:45:4602)
Root Cause
The extension contains a hardcoded Linux build path (/home/runner/work/claude-cli-internal/...) that doesn't exist on Windows systems, causing activation to fail completely.
Steps to Reproduce
- Install "Claude Code for VS Code" v2.1.51 on Windows
- Restart VS Code
- Click the Claude icon in the Activity Bar
- Error appears:
command 'claude-vscode.editor.openLast' not found
- Check Extension Host logs (Developer: Show Logs → Extension Host)
- See the TypeError about invalid filename
Expected Behavior
Extension should activate successfully and allow interaction with Claude Code.
Actual Behavior
Extension fails to activate. All commands return "not found" errors. Extension shows "Activating..." indefinitely in Running Extensions list.
Attempted Fixes (None worked)
- Reloading VS Code window
- Restarting Extension Host
- Complete uninstall and reinstall
- Deleting extension folder manually
- Clearing VS Code cache
- Restarting computer
Full Error Log
2026-02-24 10:57:06.152 [info] ExtensionService#_doActivateExtension Anthropic.claude-code, startup: false, activationEvent: 'onStartupFinished'
2026-02-24 10:57:06.288 [error] Activating extension Anthropic.claude-code failed due to an error:
2026-02-24 10:57:06.288 [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\DELL\.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)
Workaround
Using the CLI version instead: npm install -g @anthropic-ai/claude-code
Request
Please fix this in version 2.1.52 or provide a working Windows build. The extension appears to have been built with a hardcoded Linux path that breaks Windows compatibility.
Description
Claude Code for VS Code extension (v2.1.51) fails to activate on Windows with a fatal error. All extension commands are unavailable, including
claude-vscode.editor.openLast.Environment
Error
Root Cause
The extension contains a hardcoded Linux build path (
/home/runner/work/claude-cli-internal/...) that doesn't exist on Windows systems, causing activation to fail completely.Steps to Reproduce
command 'claude-vscode.editor.openLast' not foundExpected Behavior
Extension should activate successfully and allow interaction with Claude Code.
Actual Behavior
Extension fails to activate. All commands return "not found" errors. Extension shows "Activating..." indefinitely in Running Extensions list.
Attempted Fixes (None worked)
Full Error Log
Workaround
Using the CLI version instead:
npm install -g @anthropic-ai/claude-codeRequest
Please fix this in version 2.1.52 or provide a working Windows build. The extension appears to have been built with a hardcoded Linux path that breaks Windows compatibility.