[BUG] Windows: clicking Claude icon gives "command 'claude-vscode.editor.openLast' not found" - reinstalling VS Code and extension doesn't fix it

Status Fixed / completed
Reported on v2.1.51
Maintainer reply None cached
Activity 15 comments · opened Feb 24, 2026 · closed Feb 24, 2026

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:

  1. Install Claude Code CLI on Windows
  2. Open VS Code
  3. 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

  1. Install Claude Code CLI on Windows: npm install -g @anthropic-ai/claude-code
  2. Open VS Code
  3. Run "claude" in VS Code terminal (auto-installs the extension)
  4. Click the Claude icon in the VS Code activity bar (top left)
  5. Error appears: "command 'claude-vscode.editor.openLast' not found"
  6. Open Developer Tools (Ctrl+Shift+P → "Developer: Toggle Developer Tools")
  7. 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

View original on GitHub ↗

15 Comments

github-actions[bot] · 6 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/28073
  2. https://github.com/anthropics/claude-code/issues/28081
  3. https://github.com/anthropics/claude-code/issues/28082

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

shawnm-anthropic · 6 months ago

Hi, sorry about the disruption. We just published v2.1.52 which should hopefully work better.

37Stars · 6 months ago

Version 2.1.53 and its still borked.

DevHoracioRodriguez · 6 months ago

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:

  • Windows 11 Pro 10.0.26200
  • VS Code (latest stable)
  • Claude Code for VS Code v2.1.53
  • Claude CLI works fine in terminal

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):

  • Clean uninstall + delete ~/.vscode/extensions/anthropic.claude-code-*
  • Delete ~/.vscode/globalStorage/anthropic.claude-code
  • Restart VS Code, reload window, reboot PC
  • Disable all other extensions
  • v2.1.52 had this same bug, v2.1.53 still has it

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.

gridface · 6 months ago

53 not fixing it. its rough tonight, ngl

johnccr · 6 months ago

Confirming this bug on my machine:

  • OS: Windows 10/11 (x64)
  • Extension version: anthropic.claude-code-2.1.53-win32-x64
  • VSCode version: 1.109.5

Error from Extension Host log:

gridface · 6 months ago

confirming that .49 works for now

data-wrights · 6 months ago

Confirmed .49 works for me as well. Anything above I encounter the error claude-vscode.editor.openLast.

dzqdg4j9fk-collab · 6 months ago

Confirmed .49 works for me as well. Anything above I encounter the error claude-vscode.editor.openLast. (2)

vitug110510 · 6 months ago

Confirmed .49 works for me as well. Anything above I encounter the error claude-vscode.editor.openLast. (3)

bcaceiro · 6 months ago

Latest update is also borked - on VSCode extension for windows - chats dont load

swaroop-dot · 6 months ago

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

matthewlutz · 6 months ago

.49 is the latest version it works for me as well

DevHoracioRodriguez · 6 months ago

UPDATE: After two days it just worked. Installed v2.1.55 and had no issues either.

Windows: v2.1.53 still crashes

FYI

github-actions[bot] · 5 months ago

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.