claude-code - 💡(How to fix) Fix VS Code extension fails to activate: hardcoded Linux path in extension.js

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…

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'

Root Cause

It appears that a Linux build path (file:///home/runner/work/claude-cli-internal/...) was hardcoded into extension.js during the build process. On Windows, Node.js rejects this as an invalid path.

Fix Action

Workaround

Using Claude Code directly from the terminal (claude command) works fine. Only the VS Code extension UI is affected.

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'

---

2026-05-08 17:08:47.641 [info] ExtensionService#_doActivateExtension Anthropic.claude-code, startup: false, activationEvent: 'onStartupFinished'
2026-05-08 17:08:47.716 [error] Activating extension Anthropic.claude-code failed due to an error:
2026-05-08 17:08:47.716 [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> (c:\Users\filo_\.vscode\extensions\anthropic.claude-code-2.1.136-win32-x64\extension.js:103:5579)
RAW_BUFFERClick to expand / collapse

Bug Description

The Claude Code VS Code extension (v2.1.136) 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'

Steps to Reproduce

  1. Install Claude Code extension v2.1.136 on Windows (win32-x64)
  2. Open VS Code
  3. Try to open Claude Code via Ctrl+Shift+P → "Claude Code: Open"
  4. Error: command 'claude-vscode.editor.open' not found

Error Log

From exthost.log:

2026-05-08 17:08:47.641 [info] ExtensionService#_doActivateExtension Anthropic.claude-code, startup: false, activationEvent: 'onStartupFinished'
2026-05-08 17:08:47.716 [error] Activating extension Anthropic.claude-code failed due to an error:
2026-05-08 17:08:47.716 [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> (c:\Users\filo_\.vscode\extensions\anthropic.claude-code-2.1.136-win32-x64\extension.js:103:5579)

Root Cause

It appears that a Linux build path (file:///home/runner/work/claude-cli-internal/...) was hardcoded into extension.js during the build process. On Windows, Node.js rejects this as an invalid path.

Environment

  • OS: Windows 11 Home (10.0.26200)
  • VS Code: 1.119.0 (x64)
  • Extension: anthropic.claude-code v2.1.136 (win32-x64)
  • Claude Code CLI: 2.1.136
  • Node.js: v24.15.0

Workaround

Using Claude Code directly from the terminal (claude command) works fine. Only the VS Code extension UI is affected.

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