claude-code - 💡(How to fix) Fix [BUG] [Windows] VS Code extension v2.1.129 fails to activate - hardcoded Linux CI path in extension.js [6 comments, 5 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56504Fetched 2026-05-07 03:52:42
View on GitHub
Comments
6
Participants
5
Timeline
28
Reactions
7
Timeline (top)
cross-referenced ×14commented ×6labeled ×6closed ×1

Error Message

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 error originates from extension.js line 102: var y20 = Ai.createRequire("file:///home/runner/work/claude-cli-internal/...")

Subsequent error: command 'claude-vscode.terminal.open' not found

Root Cause

Root Cause: In extension.js line 102, a Linux CI build path is hardcoded: var y20 = Ai.createRequire("file:///home/runner/work/claude-cli-internal/...")

Fix Action

Fix / Workaround

Workaround: Replacing the hardcoded Linux file URL with a valid Windows file URL in extension.js resolves the issue.

Code Example

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 error originates from extension.js line 102:
var y20 = Ai.createRequire("file:///home/runner/work/claude-cli-internal/...")

Subsequent error:
command 'claude-vscode.terminal.open' not found
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

The VS Code extension (anthropic.claude-code v2.1.129) fails to activate on Windows 11. When trying to open Claude Code, the command 'claude-vscode.terminal.open' is not found.

The exthost log shows 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'

This causes the extension to fail to activate entirely.

What Should Happen?

The extension should activate successfully on Windows 11 without any errors, and the command 'claude-vscode.terminal.open' should be available to open Claude Code.

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'

This error originates from extension.js line 102:
var y20 = Ai.createRequire("file:///home/runner/work/claude-cli-internal/...")

Subsequent error:
command 'claude-vscode.terminal.open' not found

Steps to Reproduce

  1. Install the VS Code extension anthropic.claude-code v2.1.129 on Windows 11.
  2. Open VS Code.
    1. Attempt to open Claude Code via the command palette or the Claude Code button.
    1. The extension fails to activate and the command 'claude-vscode.terminal.open' is not found.
    1. Check the exthost log and observe the TypeError about the hardcoded Linux CI path.

Claude Model

None

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

Windows Terminal

Additional Information

Root Cause: In extension.js line 102, a Linux CI build path is hardcoded: var y20 = Ai.createRequire("file:///home/runner/work/claude-cli-internal/...")

Windows Node.js rejects this as an invalid file URL (requires a drive letter like file:///C:/...). Note: y20 is defined but never used — this appears to be dead code from the build process.

Workaround: Replacing the hardcoded Linux file URL with a valid Windows file URL in extension.js resolves the issue.

Please fix the build pipeline to prevent this CI path from being embedded in production releases. This is a recurring regression that has affected multiple versions (v2.1.51, v2.1.53, v2.1.55, and now v2.1.129).

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING