[BUG] `_claude_fs_right:/Users...` URL crashes rust-analyzer
Status Closed — not planned
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 10 comments · opened Jun 3, 2025 · closed Jan 22, 2026
originally reported at https://github.com/rust-lang/rust-analyzer/issues/19910
Environment
- Claude CLI version: 1.0.9
- Operating System: macOS 14.7.6
- Terminal: VSCode 1.100.2
Bug Description
workspace/didChangeWatchedFiles LSP call with _claude_fs_right:/Users/e/Documents/GitHub/hotline/runtime/src/shim_gen.rs URL crashes rust-analyzer LSP: "relative URL without a base"
Steps to Reproduce
- Use Claude code to propose an edit with the Claude Code VSCode extension enabled, so it opens a VSCode native diff viewer pane
- Accept the diff
- Check the "rust-analyzer Language Server" Output pane in VSCode
Expected Behavior
No LSP crash
Actual Behavior
thread 'LspServer' panicked at crates/rust-analyzer/src/handlers/dispatch.rs:420:17:
Invalid request
Method: workspace/didChangeWatchedFiles
error: relative URL without a base: "_claude_fs_right:/Users/e/Documents/GitHub/hotline/runtime/src/shim_gen.rs"
stack backtrace:
0: __rustc::rust_begin_unwind
1: core::panicking::panic_fmt
2: rust_analyzer::handlers::dispatch::NotificationDispatcher::on_sync_mut
3: rust_analyzer::main_loop::<impl rust_analyzer::global_state::GlobalState>::handle_event
4: rust_analyzer::main_loop::<impl rust_analyzer::global_state::GlobalState>::run
5: rust_analyzer::main_loop::main_loop
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
thread 'main' panicked at /Users/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/jod-thread-1.0.0/src/lib.rs:33:22:
called `Result::unwrap()` on an `Err` value: Any { .. }
stack backtrace:
0: __rustc::rust_begin_unwind
1: core::panicking::panic_fmt
2: core::result::unwrap_failed
3: stdx::thread::JoinHandle<T>::join
4: rust_analyzer::with_extra_thread
5: rust_analyzer::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[Info - 4:58:26 AM] Connection to server got closed. Server will restart.
true
[Error - 4:58:26 AM] Server process exited with code 101.
10 Comments
We're having the same problem in the Bicep extension (https://github.com/Azure/bicep/issues/14140)
Context I shared elsewhere:
It looks like the fix is that the claude-code extension should not be creating files with a scheme set to
_claude_fs_right, and instead pick a value that adheres to the URI RFC: https://datatracker.ietf.org/doc/html/rfc3986#section-3.1Yes, this is a very annoying issue for me too. Claude Code always crashes rust-analyzer:
Any idea of a patch here? I'm using Claude Code in Cursor. The rust-analyzer is crashing every few minutes. Similar to the issues above - MacOS; Cursor; Claude Code.
If you're having a tough time solving the issue... you can temporarily set the following in you IDE settings.json file:
This will keep the rust-analyzer off client file-watch events; this solves the issue on my MBP while using Cursor/VS Code.
As an aside, Zed has none of these issues... even if the CC integration is less than complete. Just a note.
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.
this is still happening as of
2.0.62Still experiencing this issue
Environment:
ty(Astral's type checker)Error message:
Reproduction:
Occurs when Claude Code proposes file edits and the diff viewer opens. The invalid
_claude_fs_right:URI scheme is sent to LSP servers viaworkspace/didChangeWatchedFiles.Additional context:
This affects multiple LSP servers - not just rust-analyzer. I'm seeing it with
ty(the new type checker from Astral/ruff team). Any LSP server that strictly validates file URIs will fail on this.Is there a timeline for a fix, or a workaround to prevent these notifications from being sent to LSP servers?
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.
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.