claude-code - 💡(How to fix) Fix [BUG] Extension fails to activate on Windows - hardcoded Linux path in bundle

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

The extension fails to activate with this error in the Developer Console: 4. Check the Console tab — extension activation error appears immediately

Error Messages/Logs

Code Example

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

---

mainThreadExtensionService.ts:108 Activating extension 'Anthropic.claude-code' failed: 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'.
RAW_BUFFERClick to expand / collapse

What's Wrong?

Version: 2.1.136 (win32-x64) OS: Windows 11

The extension fails to activate with this error in the Developer Console:

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

The bundle contains a hardcoded Linux CI path that doesn't resolve on Windows. The extension shows no commands and doesn't appear in the Output channels.

What Should Happen?

The extension should activate normally on Windows and register all its commands (e.g. claude-vscode.editor.openLast).

Steps to Reproduce

  1. Install VS Code on Windows 11
  2. Install extension anthropic.claude-code version 2.1.136
  3. Open Developer Tools (Ctrl+Shift+P → "Developer: Toggle Developer Tools")
  4. Check the Console tab — extension activation error appears immediately

Error Messages/Logs

mainThreadExtensionService.ts:108 Activating extension 'Anthropic.claude-code' failed: 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'.

Environment

  • Claude Code CLI: 2.1.136
  • Platform: VS Code extension (win32-x64)
  • OS: Windows 11 Pro
  • Shell: PowerShell / Git Bash

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

claude-code - 💡(How to fix) Fix [BUG] Extension fails to activate on Windows - hardcoded Linux path in bundle