claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Windows VS Code extension crashes Claude Code with "Error: cannot open _claude_fs_right:<file>. Detail: Unable to resolve filesystem provider with relative file path '_claude_fs_right:<file>'"

Open psandler opened this issue 6 months ago • 54 comments

Installed Claude Code via Powershell

It can read files without issue, but this is the error it crashes with when it tries to edit the file. The actual path, which is where claude is running, id c:\projects\TennisText and the CLAUDE.md file exists. The below is the summary and conclusion claude produced.

Bug Summary: Claude Code internal filesystem provider fails on Windows during file edit operations. Error shows malformed path: cannot open claudefs_right:c%3A%5Cprojects%5CTennisText%5CCLAUDE.md with "Unable to resolve filesystem provider with relative file path '_claude_fs_right:c:\projects\TennisText\CLAUDE.md'".

Environment:

  • Windows (platform: win32)
  • Claude Code's internal Edit/Write tools fail

Reproduction:

  1. Attempt any file edit using Claude's Edit or Write tools
  2. Claude Code crashes with filesystem provider path resolution error

Root Cause: Claude Code's internal path encoding/resolution creates invalid filesystem URIs on Windows. The _claude_fs_right: prefix and URL-encoded

path (c%3A%5C) suggest incorrect internal path handling.

psandler avatar Jul 12 '25 05:07 psandler

Same

LambertClark avatar Jul 13 '25 19:07 LambertClark

Same

andreacanes avatar Jul 13 '25 20:07 andreacanes

Same

ace-dush avatar Jul 13 '25 21:07 ace-dush

Same

jwilson-hall avatar Jul 13 '25 22:07 jwilson-hall

Same

sunfase-io avatar Jul 14 '25 01:07 sunfase-io

same

hendrinextmake avatar Jul 14 '25 05:07 hendrinextmake

Same

moneytom avatar Jul 14 '25 05:07 moneytom

Same here.

Leonides87 avatar Jul 14 '25 07:07 Leonides87

same

idontwanttosayaword avatar Jul 14 '25 10:07 idontwanttosayaword

same

zhangshilong233 avatar Jul 14 '25 11:07 zhangshilong233

如果你用vscode 或者 cousor,并且安装了claude code扩展,删掉应该就没问题了

17796225421 avatar Jul 14 '25 11:07 17796225421

如果你用vscode 或者 cousor,并且安装了claude code扩展,删掉应该就没问题了

还真是这样--,为啥会这样啊,那这个官方的扩展插件的作用是啥

wustyu avatar Jul 14 '25 12:07 wustyu

Claude Code CLI works as expected when run from a standalone terminal (e.g., Windows Terminal or Command Prompt outside of VS Code). The issue only occurs when using the CLI inside the integrated terminal in VS Code—that’s where it crashes during the file edit confirmation prompt. Everything functions correctly outside of VS Code.

leonardos4enz avatar Jul 14 '25 14:07 leonardos4enz

Just published version 1.0.51 of the VS Code extension, which should resolve this!

UPDATE: we're still seeing some issues with the new version, and will have an update shortly

ant-kurt avatar Jul 14 '25 19:07 ant-kurt

@ant-kurt just tested the latest version of the extension to see if it had resolved my likely duplicate issue (#3453) and the issue still appears present.

alexdobson avatar Jul 14 '25 21:07 alexdobson

Interesting - I was able to repro this when clicking "Update to v1.0.51", but doing a full uninstall and reinstall of the extension (with a restart of VS Code for good measure) resolved the issue for me. Can you try that?

ant-kurt avatar Jul 14 '25 21:07 ant-kurt

@ant-kurt uninstalling and reinstalling the extension and then restarting VS Code worked for me.

gmmurray avatar Jul 14 '25 22:07 gmmurray

This is now working for me, though I didn't explicitly do any of the above. I'm sure I restarted VS Code at least a few times since opening this bug.

psandler avatar Jul 15 '25 04:07 psandler

still doesn't work even after a lot of restarts and reinstalling the extension. I'm using vscode insiders.

Fatal-Errol avatar Jul 15 '25 05:07 Fatal-Errol

same

Oreo992 avatar Jul 15 '25 08:07 Oreo992

@ant-kurt tried uninstalling and reinstalling (as well as closing and re-launching VS Code) to no avail. Here's the full crash log when trying to make edits within VS Code while the extension is installed (I've obfuscated some of the directory names):

node:internal/process/promises:394
    triggerUncaughtException(err, true /* fromPromise */);
    ^

Error: cannot open _claude_fs_right:<path_to_file_to_be_edited>. Detail: Unable to resolve filesystem provider with relative file path '_claude_fs_right:<path_to_file_to_be_edited>'
    at Uq2 (file:///<local_user_path>/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1383:14523)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async iR6 (file:///<local_user_path>/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1969:12396)
    at async J (file:///<local_user_path>/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1969:11106)

Node.js v22.17.0

I will update my own issue with this information too #3453

alexdobson avatar Jul 15 '25 09:07 alexdobson

I have Claude CLI version 1.0.53 and I keep getting this error.

frkdrgt avatar Jul 16 '25 10:07 frkdrgt

happened to me only with the extension installed, after uninstalling it worked out

pehcastro avatar Jul 16 '25 12:07 pehcastro

happened to me only with the extension installed, after uninstalling it worked out

Doesn't work for me :(

Johan-Refurbi avatar Jul 16 '25 18:07 Johan-Refurbi

I resolved by removing the Claude Desktop Windows app + VSCode extension followed by: npm uninstall -g @anthropic-ai/claude-code and then npm install -g @anthropic-ai/claude-code and restarting VSCode and re-installing only the VSCode extension. Seems it was the desktop app that broke my instance.

wardjc avatar Jul 16 '25 21:07 wardjc

uninstalled the extension (1.0.51) and Claude worked well. I also learned that if claude errors out you can have it resume what it was working on by calling claude --continue (or claude -c) or pick from a previous session by using: claude --resume (or claude-r)

chowdah avatar Jul 17 '25 00:07 chowdah

If you install Cluade Code on native Windows and install the Cluade Code extension on VSCode and its branch IDE (the same applies to Cursor), this problem will definitely occur, and the Cluade Code icon will be missing in the IDE. It can be used normally after uninstalling the extension. I think there is a problem with the IDE or the extension, and I am waiting for the official update of the extension to fix this bug.

DnkNju avatar Jul 17 '25 06:07 DnkNju

I was able to resolve the issue by disabling the Claude Code extension. Seems to not be working with windows at the moment.

Knuckles92 avatar Jul 17 '25 07:07 Knuckles92

samee:

Claude Code Status v1.0.53

  L Session ID: 24d32c88-f8a0-47b9-98f8-dc34bead39c8

 Working Directory 
  L C:\Users\Flex Computers\OneDrive\Desktop\TestProject

 IDE Integration • /config
 ✔  Connected to VS Code extension
 ⚠ Error installing VS Code extension: 1: 1 Extension 'c:\users\flex' not found.
   Make sure you use the full extension ID, including the publisher, e.g.:
   anysphere.csharp
   Failed Installing Extensions: c:\users\flex

Mine is probably because of space in Flex Computers

wassay13 avatar Jul 17 '25 13:07 wassay13

Same.

For me uninstall the vs code extension work !

papyntown avatar Jul 17 '25 18:07 papyntown