claude-code - 💡(How to fix) Fix v2.1.136 VSCode extension fails to activate: hardcoded build-machine 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…

The Claude Code VSCode extension v2.1.136 (win32-x64) fails to activate entirely. All commands (e.g. claude-vscode.editor.openLast) show as "not found" because the extension crashes before registering any handlers.

Error Message

From %APPDATA%\Code\logs\<session>\window1\exthost\exthost.log:

[error] Activating extension Anthropic.claude-code failed due to an 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 Module.createRequire (node:internal/modules/cjs/loader:1922:13)
    at Object.<anonymous> (c:\Users\..\.vscode\extensions\anthropic.claude-code-2.1.136-win32-x64\extension.js:103:5579)

Root Cause

extension.js line 103 contains a createRequire() call with the path file:///home/runner/work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs — a hardcoded absolute path from the GitHub Actions build runner. That path does not exist on any user machine, so Node rejects it and the module fails to load.

Fix Action

Workaround

Downgrade to v2.1.133 via Extensions panel → "Install Another Version..." — confirmed working.

Code Example

[error] Activating extension Anthropic.claude-code failed due to an 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 Module.createRequire (node:internal/modules/cjs/loader:1922:13)
    at Object.<anonymous> (c:\Users\..\.vscode\extensions\anthropic.claude-code-2.1.136-win32-x64\extension.js:103:5579)
RAW_BUFFERClick to expand / collapse

Summary

The Claude Code VSCode extension v2.1.136 (win32-x64) fails to activate entirely. All commands (e.g. claude-vscode.editor.openLast) show as "not found" because the extension crashes before registering any handlers.

Error

From %APPDATA%\Code\logs\<session>\window1\exthost\exthost.log:

[error] Activating extension Anthropic.claude-code failed due to an 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 Module.createRequire (node:internal/modules/cjs/loader:1922:13)
    at Object.<anonymous> (c:\Users\..\.vscode\extensions\anthropic.claude-code-2.1.136-win32-x64\extension.js:103:5579)

Root cause

extension.js line 103 contains a createRequire() call with the path file:///home/runner/work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs — a hardcoded absolute path from the GitHub Actions build runner. That path does not exist on any user machine, so Node rejects it and the module fails to load.

Impact

  • Extension does not activate at all on Windows
  • All commands unavailable
  • Reinstalling from the marketplace installs the same broken bundle — no workaround except downgrading

Steps to reproduce

  1. Install or auto-update to Claude Code v2.1.136 on Windows
  2. Open VSCode — extension silently fails to load
  3. Check exthost.log for the TypeError above

Environment

  • Extension version: 2.1.136 (win32-x64)
  • OS: Windows 11 Home 10.0.26200
  • VSCode: version at C:\Users\...\AppData\Local\Programs\Microsoft VS Code\8b640eef5a

Workaround

Downgrade to v2.1.133 via Extensions panel → "Install Another Version..." — confirmed working.

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