[BUG] TypeError: createRequire fails with hardcoded Linux path on Windows — extension fails to activate (v2.1.51)
Resolved 💬 4 comments Opened Feb 24, 2026 by Velvetbin Closed Feb 24, 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?
The VS Code extension (v2.1.51, win32-x64) fails to activate on Windows. The sidebar shows an infinite loading state with no error surfaced to the user.
The extension.js bundle contains a hardcoded Linux CI build path that is invalid on Windows, causing the extension host to throw immediately on load.
What Should Happen?
The extension should activate successfully and the Claude Code sidebar should load normally on Windows.
Error Messages/Logs
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\<username>\.vscode\extensions\anthropic.claude-code-2.1.51-win32-x64\extension.js:45:4602)
Steps to Reproduce
- Install the Claude Code extension v2.1.51 on Windows via VS Code marketplace
- Open VS Code
- Open the Claude Code sidebar (claudeVSCodeSidebarSecondary)
- Sidebar shows infinite loading — extension never activates
- Open Help > Toggle Developer Tools > Console to see the TypeError above
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
v2.1.51
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗