[BUG] Windows: clicking Claude icon gives "command 'claude-vscode.editor.openLast' not found" - reinstalling VS Code and extension doesn't fix it
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Environment:
- OS: Windows 11
- VS Code version: latest
- Claude Code CLI version: 2.1.51
Bug Description:
Clicking the Claude icon in the VS Code activity bar gives error: command 'claude-vscode.editor.openLast' not found. The extension shows "Activating..." forever and never loads.
Root Cause Found:
In Developer Tools console, this error appears: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 extension has a hardcoded Linux path (/home/runner/work/...) baked into it which doesn't resolve on Windows.
Steps to Reproduce:
- Install Claude Code CLI on Windows
- Open VS Code
- Click the Claude icon in the activity bar
Expected: Claude Code panel opens
Actual: Error: command 'claude-vscode.editor.openLast' not found
Note: CLI works fine in terminal (claude command works). Only the visual panel is broken.
What Should Happen?
Clicking the Claude icon in the VS Code activity bar should open the Claude Code visual panel successfully without any errors.
Error Messages/Logs
Steps to Reproduce
- Install Claude Code CLI on Windows: npm install -g @anthropic-ai/claude-code
- Open VS Code
- Run "claude" in VS Code terminal (auto-installs the extension)
- Click the Claude icon in the VS Code activity bar (top left)
- Error appears: "command 'claude-vscode.editor.openLast' not found"
- Open Developer Tools (Ctrl+Shift+P → "Developer: Toggle Developer Tools")
- Check Console tab — shows the real error: extension activation failed due to hardcoded Linux path
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.51 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
The root cause is a hardcoded Linux path in the extension package:
file:///home/runner/work/claude-cli-internal/claude-cli-internal/build-agent-sdk/sdk.mjs
This path does not exist on Windows, causing the extension to fail activation entirely.
Workaround: Claude CLI works fine in the terminal ("claude" command). Only the visual panel is broken.
Tried to fix by:
<img width="1433" height="942" alt="Image" src="https://github.com/user-attachments/assets/385a3ec5-65de-4221-91cc-3c0833d5abe8" />
- Uninstalling and reinstalling Claude Code CLI
- Uninstalling and reinstalling VS Code completely (including deleting all AppData folders)
- Updating Claude Code CLI to latest version (2.1.51)
- Nothing worked — this appears to be a packaging bug on Anthropic's side
15 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Hi, sorry about the disruption. We just published v2.1.52 which should hopefully work better.
Version 2.1.53 and its still borked.
UPDATE: After two days it just worked. Installed v2.1.55 and had no issues either.
---
Title: Windows: v2.1.53 still crashes with file:///home/runner/work/... path on activation
--- 🎵 The Windows Claude Code Blues 🎵
Woke up this mornin', my extension wouldn't load,
That orange icon tauntin' me, down a broken road.
"command 'claude-vscode.editor.openLast' not found" — it cried,
While a Linux CI path... was baked up deep inside.
Oh, file:///home/runner/work/claude-cli-internal...
You ain't no Windows path, baby, that's external!
Node.js says "filename must be absolute, my friend,"
But you keep shippin' builds that break... again and again.
---
Environment:
The Error (repeats on every activation attempt):
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'.
What I tried (all failed):
v2.1.51 broke my heart, said "we'll fix it, hold on tight,"
v2.1.52 came along, but still nothin' worked right.
Now v2.1.53 is here, and I'm singin' the same song —
That CI runner path on Windows... just don't belong.
So I'm back in my terminal, where the CLI still runs clean,
But that orange spark icon? Coldest thing I've ever seen.
Please, Anthropic, check your build — strip that runner path away,
So us Windows folks can click that button... maybe someday. 🎸
Expected: Extension activates and registers all commands.
Actual: Extension fails to activate because sdk.mjs path references the Linux CI build environment (/home/runner/work/...), which Node.js on Windows cannot resolve.
---
Copy, paste, and let them feel the blues. 🎸
P.S: I had to downgrade to v2.1.49. Anything above crashes the orange button.
53 not fixing it. its rough tonight, ngl
Confirming this bug on my machine:
Error from Extension Host log:
confirming that .49 works for now
Confirmed .49 works for me as well. Anything above I encounter the error
claude-vscode.editor.openLast.Confirmed .49 works for me as well. Anything above I encounter the error claude-vscode.editor.openLast. (2)
Confirmed .49 works for me as well. Anything above I encounter the error claude-vscode.editor.openLast. (3)
Latest update is also borked - on VSCode extension for windows - chats dont load
I updated to version 2.1.55 of claude code extension, but I still get "command 'claude-vscode.editor.openLast' not found" , I am on Windows PC and trying the use Visual code extension by top left claude icon
.49 is the latest version it works for me as well
UPDATE: After two days it just worked. Installed v2.1.55 and had no issues either.
FYI
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.