[BUG] command 'claude-vscode.editor.openLast' not found Extension fails to activate on Windows - hardcoded Linux path in sdk.mjs

Resolved 💬 9 comments Opened Feb 24, 2026 by erwin1412 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?

Extension Anthropic.claude-code version 2.1.51 fails to activate on Windows with the following 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'
The extension bundle contains a hardcoded Linux build path (/home/runner/work/...) which is invalid on Windows, causing the extension to fail on every activation attempt.
Environment:

OS: Windows 10/11
VS Code version: (isi versi VS Code kamu)
Extension version: anthropic.claude-code-2.1.51-win32-x64

Steps to reproduce:

Install Claude Code extension v2.1.51 on Windows
Open any workspace in VS Code
Extension fails to activate

Expected behavior:
Extension activates successfully on Windows.
Actual behavior:
Extension fails to activate on every startup. The command claude-vscode.editor.openLast shows as "not found" because the extension never successfully loads.

What Should Happen?

The extension should activate successfully on Windows and all commands
(including claude-vscode.editor.openLast) should be available for use.

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\USer\.vscode\extensions\anthropic.claude-code-2.1.51-win32-x64\extension.js:45:4602)

Steps to Reproduce

  1. Install Claude Code extension v2.1.51 on Windows
  2. Open any workspace in VS Code
  3. Extension fails to activate - error appears in exthost log
  4. All claude-vscode commands show as "not found"

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.51

Claude Code Version

2.1.51

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

The extension bundle contains a hardcoded Linux CI build path
(/home/runner/work/claude-cli-internal/...) inside extension.js
which is invalid on Windows. This causes the extension to fail on
every activation attempt. Reinstalling does not fix the issue.

View original on GitHub ↗

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