VS Code extension fails to activate: hardcoded Linux path in extension.js
Resolved 💬 3 comments Opened May 9, 2026 by FiloRSs Closed May 9, 2026
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
- Install Claude Code extension v2.1.136 on Windows (win32-x64)
- Open VS Code
- Try to open Claude Code via
Ctrl+Shift+P→ "Claude Code: Open" - 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.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗