VS Code extension v2.1.129 (win32-x64) fails to activate: hardcoded Linux CI path in extension.js

Resolved 💬 5 comments Opened May 6, 2026 by santoshsoftex Closed May 6, 2026

Bug Report

Extension version: 2.1.129 (win32-x64)
VS Code version: 1.118.1
OS: Windows 11 Pro 10.0.26200

Description

The Claude Code VS Code extension fails to activate on Windows with the following error in the extension host log (%APPDATA%\Code\logs\<session>\window1\exthost\exthost.log):

[error] Activating extension Anthropic.claude-code failed due to an error:
[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> (extension.js:102:5407)

Root Cause

extension.js contains a hardcoded Linux CI/CD build path:

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

This path does not exist on any end-user machine. Node.js throws a TypeError on activation, so all commands (including claude-vscode.editor.openLast) are registered but never callable, producing:

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

Workaround

Replacing the hardcoded path with __filename in extension.js resolves the activation failure:

Ai.createRequire(__filename)

Steps to Reproduce

  1. Install anthropic.claude-code v2.1.129 on Windows
  2. Fully restart VS Code
  3. Attempt to open Claude (Claude Code: Open)
  4. Observe: command 'claude-vscode.editor.openLast' not found
  5. Check %APPDATA%\Code\logs\<session>\window1\exthost\exthost.log for the activation error above

Expected Behavior

Extension activates successfully and Claude opens normally.

View original on GitHub ↗

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