[BUG] Claude Code v2.1.51 fails to activate on Windows

Resolved 💬 2 comments Opened Feb 24, 2026 by Zeldwyn 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 fails to activate on Windows with the 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'

This causes the command 'claude-vscode.editor.openLast' not found error when clicking the sidebar icon. The extension never activates at all.

Workaround: Downgrade to v2.1.49 which works correctly.

What Should Happen?

The extension should activate normally on Windows.

Error Messages/Logs

2026-02-24 12:58:51.718 [error] Activating extension Anthropic.claude-code failed due to an error:
2026-02-24 12:58:51.718 [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 Object.<anonymous> (c:\Users\kevin\.vscode\extensions\anthropic.claude-code-2.1.51-win32-x64\extension.js:45:4602)

Steps to Reproduce

  1. Be on Windows 11
  2. Install Claude Code VS Code extension v2.1.51
  3. Open VS Code
  4. Click the Claude icon in the sidebar
  5. Error notification appears: "command 'claude-vscode.editor.openLast' not found"
  6. Extension never activates

Workaround: Downgrade to v2.1.49 via Install Specific Version in the Extensions panel.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.49

Claude Code Version

2.1.51 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

The extension activates (onStartupFinished) but immediately crashes due to a hardcoded Linux build path in extension.js. The path 'file:///home/runner/work/claude-cli-internal/...' appears to be a leftover from the CI/CD build pipeline that was not resolved correctly for the Windows build.

Workaround: Installing v2.1.49 via "Install Specific Version" in the VS Code Extensions panel resolves the issue immediately.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗