[BUG] [VS Code Extension 2.1.129] Activation fails on Windows - TypeError: filename must be a file URL object

Resolved 💬 1 comment Opened May 6, 2026 by swapnilraje11 Closed May 6, 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?

Platform: Windows 10/11 x64
VS Code Version: [run code --version in PowerShell and paste]
Extension Version: 2.1.129
Node Version: v20.12.2

Symptom:
Clicking the Claude icon in the sidebar shows:
command 'claude-vscode.editor.openLast' not found
All other Claude Code commands also fail with "not found".

Root cause (from Extension Host log):
Activation fails with:
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:1922:13)
at Object.<anonymous> (extension.js:102:5407)

A Linux CI build path appears to be hard-coded in the shipped extension.js, causing createRequire to fail on Windows where the path is neither a valid Windows absolute path nor a valid file URL.

Workaround:
Downgrading to 2.1.128 via "Download Specific Version VSIX" resolves the issue.

Impact:
This likely affects all Windows users on 2.1.129.

What Should Happen?

Platform: Windows 10/11 x64
VS Code Version: [run code --version in PowerShell and paste]
Extension Version: 2.1.129
Node Version: v20.12.2

Symptom:
Clicking the Claude icon in the sidebar shows:
command 'claude-vscode.editor.openLast' not found
All other Claude Code commands also fail with "not found".

Root cause (from Extension Host log):
Activation fails with:
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:1922:13)
at Object.<anonymous> (extension.js:102:5407)

A Linux CI build path appears to be hard-coded in the shipped extension.js, causing createRequire to fail on Windows where the path is neither a valid Windows absolute path nor a valid file URL.

Workaround:
Downgrading to 2.1.128 via "Download Specific Version VSIX" resolves the issue.

Impact:
This likely affects all Windows users on 2.1.129.

Error Messages/Logs

Steps to Reproduce

Platform: Windows 10/11 x64
VS Code Version: [run code --version in PowerShell and paste]
Extension Version: 2.1.129
Node Version: v20.12.2

Symptom:
Clicking the Claude icon in the sidebar shows:
command 'claude-vscode.editor.openLast' not found
All other Claude Code commands also fail with "not found".

Root cause (from Extension Host log):
Activation fails with:
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:1922:13)
at Object.<anonymous> (extension.js:102:5407)

A Linux CI build path appears to be hard-coded in the shipped extension.js, causing createRequire to fail on Windows where the path is neither a valid Windows absolute path nor a valid file URL.

Workaround:
Downgrading to 2.1.128 via "Download Specific Version VSIX" resolves the issue.

Impact:
This likely affects all Windows users on 2.1.129.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.129

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗