[BUG]
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) fails to activate on startup. All Claude Code commands result in "command not found" errors.
Clicking the Claude Code button or running "Claude Code: Open in New Tab" from the command palette both fail with:
command 'claude-vscode.editor.openLast' not found
command 'claude-vscode.editor.open' not found
The CLI (claude in terminal) works correctly. Only the VS Code extension UI is broken.
The root cause appears to be a hardcoded CI build path in the extension bundle that is not valid on the user's machine.
What Should Happen?
The VS Code extension should activate successfully and all Claude Code commands should work normally.
Error Messages/Logs
From Extension Host log:
2026-02-24 12:56:30.149 [info] ExtensionService#_doActivateExtension Anthropic.claude-code, startup: false, activationEvent: 'onStartupFinished'
2026-02-24 12:56:30.237 [error] Activating extension Anthropic.claude-code failed due to an error:
2026-02-24 12:56:30.237 [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> (<USER_HOME>\.vscode\extensions\anthropic.claude-code-2.1.51-win32-x64\extension.js:45:4602)
at Module._compile (node:internal/modules/cjs/loader:1714:14)
The path file:///home/runner/work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs appears to be a CI build artifact path that was not resolved during the bundling process.
Steps to Reproduce
- Install Claude Code v2.1.51 via native installer on Windows (
irm https://claude.ai/install.ps1 | iex) - Open VS Code
- Extension fails to activate automatically on startup
- Any Claude Code command (e.g., "Open in New Tab", clicking the Claude button) returns "command not found"
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
Yes, this worked in a previous
Claude Code Version
Unknown
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗