[BUG] extension.js contains hardcoded CI/CD Linux paths causing activation failure on Windows x64 with Node.js 24 / VS Code 1.109+

Resolved 💬 6 comments Opened Feb 25, 2026 by masdyamazaki Closed Feb 25, 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?

Body:

Environment

  • Extension version: Claude Code v2.1.53 (anthropic.claude-code-2.1.53-win32-x64)
  • VS Code version: 1.109.5 (system setup)
  • OS: Windows 11 Pro (x64)
  • Architecture: win32-x64
  • Node.js version: v24.12.0

What's Wrong?

The extension fails to activate on Windows with VS Code 1.109.5, resulting in the following error visible to the user:

command 'claude-vscode.editor.openLast' not found

The root cause is that extension.js contains hardcoded CI/CD build paths (GitHub Actions runner paths) that were not
replaced during the Windows build process:

file:///home/runner/work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs

This path appears in 3 locations in extension.js:

  1. module.createRequire(...) call (top-level, executed immediately on load):

G1 = ZE.createRequire("file:///home/runner/work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs")

  1. Claude executable fallback path:

if (!O) O = ee("file:///home/runner/work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs")

  1. Hardcoded __dirname:

var __dirname = "/home/runner/work/claude-cli-internal/claude-cli-internal/packages/claude-vscode/src/extension"

The createRequire() call is executed at the top level when extension.js is loaded. On Windows x64 + Node.js 24,
passing a Linux-style file:///home/runner/... URL throws a TypeError immediately:

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 aborts the entire activation before any vscode.commands.registerCommand() calls are made, leaving all commands
unregistered.

Note: The same extension partially worked on VS Code 1.105.1. After VS Code updated to 1.109.5 (which includes a newer
Node.js runtime), createRequire() began strictly rejecting non-Windows file URLs, making the bug consistently
reproducible.

Steps to Reproduce

  1. Install Claude Code v2.1.53 (win32-x64) on Windows 11 x64
  2. Open VS Code 1.109.5
  3. Observe extension activation failure in the extension host log:

Activating extension Anthropic.claude-code failed due to an 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'

  1. Any action that invokes claude-vscode.editor.openLast shows: command 'claude-vscode.editor.openLast' not found

What Should Happen?

The extension should activate successfully and all contributed commands (e.g., claude-vscode.editor.openLast) should
be available.

The Windows (win32-x64) build pipeline should correctly substitute CI/CD runner paths with runtime-relative paths
(e.g., using __dirname or import.meta.url) before packaging.

Workaround

Manually replace the three hardcoded paths in extension.js (located at
%USERPROFILE%\.vscode\extensions\anthropic.claude-code-2.1.53-win32-x64\extension.js) with valid Windows paths
pointing to the extension's installation directory:

  • createRequire(...) → use the extension's own extension.js file URL

(file:///C:/Users/%user%/.vscode/extensions/anthropic.claude-code-2.1.53-win32-x64/extension.js)

  • __dirname → use the extension installation directory

(C:/Users/%user%/.vscode/extensions/anthropic.claude-code-2.1.53-win32-x64)

  • executable fallback → use resources/native-binary/claude.exe

Error Messages/Logs

"command 'claude-vscode.editor.openLast' not found" on vscode GUI

Steps to Reproduce

click the claude code icon when the massage appears.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

v2.1.53

Platform

Other

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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