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>'"
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:
- Attempt any file edit using Claude's Edit or Write tools
- 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.
Showing cached comments. Read the full discussion on GitHub ↗
55 Comments
Same
Same
Same
Same
Same
same
Same
Same here.
same
same
还真是这样--,为啥会这样啊,那这个官方的扩展插件的作用是啥
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.
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 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.
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 uninstalling and reinstalling the extension and then restarting VS Code worked for me.
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.
still doesn't work even after a lot of restarts and reinstalling the extension. I'm using vscode insiders.
same
@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):
I will update my own issue with this information too #3453
I have Claude CLI version 1.0.53 and I keep getting this error.
happened to me only with the extension installed, after uninstalling it worked out
Doesn't work for me :(
I resolved by removing the Claude Desktop Windows app + VSCode extension followed by:
npm uninstall -g @anthropic-ai/claude-codeand thennpm install -g @anthropic-ai/claude-codeand restarting VSCode and re-installing only the VSCode extension. Seems it was the desktop app that broke my instance.
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)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.
I was able to resolve the issue by disabling the Claude Code extension. Seems to not be working with windows at the moment.
samee:
Mine is probably because of space in
Flex ComputersSame.
For me uninstall the vs code extension work !
Same issue. Fixed it by uninstalling the VS Code extension.
Same, uninstalling vscode extension indeed solves it.
It worked after I removed the VS Code extension
I don't think uninstalling the extension is a fix. The bug is to do with the VS Code interaction with Claude Code via the extension not working, removing the extension isn't a fix for that.
So far I've tried uninstalling and re-installing the extension multiple times (each time closing VS Code or even restarting the device), as well as uninstalling and re-installing
@anthropic-ai/claude-codeitself. Neither of these have resolved the issue.I've also tried starting VS Code as an administrator as the user above suggested, however with no success.
@alexdobson - I'm wondering if this issue is more an artifact of a problem with your initial install via npm? I can confirm that having the Claude Code extension installed in VS code _before_ I actually installed the npm package resulted in those file errors.
After uninstalling the Claude Code extension from VS code and restarting the VS code application, no further issues. Claude is able to create files, commit them for me, etc.
Updating node from 22.16.0 to 24.4.0 fixed this for me. Now it's working inside VS code too.
Fixed it by uninstalling the VS Code extension.
Unfortunately, I installed Claude Code first (via) npm, then installed the extension within VS Code afterwards, so I don't think that's the problem for me sadly.
Strangely, as I mentioned in my duplicate of this issues (#3453), after I installed the VS Code extension I installed the extension in Cursor, and in Cursor Claude Code and the extension work perfectly.
Also, this didn't fix this issue for me either (updated Node to latest current version v24.4.1).
so annoying , anthropic why cant you build a proper interface
so what is the fix? its just wasting our token for nothing
Yet to be fixed....
same.
Cursor Version: 0.50.7
VSCode Version: 1.96.2
Nodejs version: v24.4.1
I updated Nodejs version to the one mentioned above, then run Cursor as Admin and it solved the issue for me.
If you’re getting the error about scripts being disabled, just run this in PowerShell:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
It’ll let claude run without issues. 👍
Also, just a heads up, Claude Code seems to have a bug on Windows when editing files. It messes up the file paths (like c%3A%5C...) and crashes. Reading works okay, but editing doesn't.
Same. Just my two cents: For me it happens on Visual Studio Code but not on Cursor.
Same, uninstalling VS code extension solved the error, but I need this extenstion
The latest version of the plugin, v1.0.56, solved the issue for me: https://marketplace.visualstudio.com/items?itemName=anthropic.claude-code
The latest version of the plugin has also resolved the issue for me too.
Cursor uses open-vsx which is still on version 1.0.29 (https://open-vsx.org/extension/Anthropic/claude-code), until Anthropic publishes the update, the extension needs to be installed manually via vsix file to make it work in cursor
It works for me now in Cursor. To download vsix Extension from Marketplace:
PowerShell
Invoke-WebRequest -Uri "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/anthropic/vsextensions/claude-code/latest/vspackage" -OutFile "claude-code.vsix"
Command line (if you have curl)
curl -L "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/anthropic/vsextensions/claude-code/latest/vspackage" -o claude-code.vsix
this is now working for me when using the "Command Prompt". I still have the problem in Powershell and git bash
Windows Path Encoding Crash - File Edit Operations Broken
52 comments. Assigned to @ant-kurt. Reopened after claimed fix didn't work.
Root Cause
Claude Code's internal filesystem provider uses VSCode's custom URI scheme
_claude_fs_right:but fails to properly encode Windows paths.Broken path format:
Problem: The colon (
:) after_claude_fs_rightconflicts with Windows drive letter colon (C:).Why This Happens
VSCode filesystem providers expect URIs like:
But Claude Code generates:
This is invalid - needs to be:
Immediate Workaround
Option 1: Use Forward Slashes (partial fix)
Edit CLAUDE.md to use forward slashes for paths:
Option 2: Use WSL (full solution)
Option 3: Run from Root Directory (reduces path complexity)
Technical Fix (For Anthropic Team)
In filesystem provider registration:
Validation Test
After fix, this should work:
Why This Was Closed Prematurely
The fix worked for some Windows users but not all. Likely depends on:
Still broken for users with:
C:\Program Files\...C:\Users\José\...\\network\share\...Emergency Recovery
If Claude Code crashes on file edit:
---
This blocks ALL Windows VSCode users from file editing. Should be P0. Suggest comprehensive Windows path handling rewrite, not patchwork fixes.
The incorrect URI's can lead to downstream issues for LSP servers that expect that file URI's are valid URIs as specified by the LSP specification
See https://github.com/astral-sh/ty/issues/1328
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
I can confirm I am seeing this in VSCode in linux
The Claude Code VSCode extension is sending file-change notifications to rust-analyzer using a custom URI scheme (_claude_vscode_fs_right:) instead of a proper file:// URI. rust-analyzer tries to parse this as a URL, fails because it's not a valid URL scheme, and panics (rather than gracefully handling the error). Each crash triggers a restart, which immediately hits the same bad notification, creating an infinite crash loop until rust-analyzer gives up after 5 crashes in 3 minutes.