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

Official PRs (…)
ON THIS PAGE

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

Error from Extension Host 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' at Module.createRequire (node:internal/modules/cjs/loader:1922:13) at Object.<anonymous> (c:\Users...\anthropic.claude-code-2.1.136-win32-x64\extension.js:103:5579)

Fix Action

Fix / Workaround

Workaround: Downgrading the VS Code extension to v2.1.135 resolves the issue. The Claude icon appears correctly and the extension activates without errors.

Code Example

Error from Extension Host 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'
  at Module.createRequire (node:internal/modules/cjs/loader:1922:13)
  at Object.<anonymous> (c:\Users\...\anthropic.claude-code-2.1.136-win32-x64\extension.js:103:5579)
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?

VS Code extension (v2.1.136, win32-x64) fails to activate on Windows. The Claude icon does not appear in the sidebar and the command 'claude-vscode.editor.openLast' is not found.

The extension is shown as installed and enabled in the Extensions panel, but the sidebar icon never appears. Reloading the window (Developer: Reload Window) and fully restarting VS Code do not fix the issue.

A hardcoded Linux build path is being passed to Module.createRequire, which is invalid on Windows.

What Should Happen?

Extension should activate successfully on Windows and the Claude icon should appear in the VS Code sidebar.

Error Messages/Logs

Error from Extension Host 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'
  at Module.createRequire (node:internal/modules/cjs/loader:1922:13)
  at Object.<anonymous> (c:\Users\...\anthropic.claude-code-2.1.136-win32-x64\extension.js:103:5579)

Steps to Reproduce

  1. Install Claude Code extension v2.1.136 (win32-x64) on Windows
  2. Open VS Code
  3. Extension appears as installed and enabled in the Extensions panel
  4. Claude icon does not appear in the sidebar
  5. Attempting the command 'claude-vscode.editor.openLast' returns "command not found"
  6. Reloading the window (Developer: Reload Window) and fully restarting VS Code do not resolve the issue

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.135

Claude Code Version

2.0.62 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

Workaround: Downgrading the VS Code extension to v2.1.135 resolves the issue. The Claude icon appears correctly and the extension activates without errors.

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 v2.1.136