[BUG] VS Code extension crashes rust-analyzer with invalid URI scheme in didChangeWatchedFiles

Resolved 💬 4 comments Opened Jan 29, 2026 by hungryhorace Closed Feb 2, 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?

When using the Claude Code VS Code extension, rust-analyzer repeatedly crashes due to invalid URI schemes being sent in workspace/didChangeWatchedFiles notifications.

What Should Happen?

The extension uses a custom URI scheme _claude_vscode_fs_right: for diff views. This URI is being included in workspace/didChangeWatchedFiles events that VS Code broadcasts to all language servers. rust-analyzer cannot parse this as a valid URL and panics.
It seems claude is not complying with the LSP spec and should not be using an underscore in its custom scheme (see https://github.com/rust-lang/rust-analyzer/issues/19910#issuecomment-2935315855). Or at least this scheme shouldn't get to the LSP.

Error Messages/Logs

thread 'LspServer' panicked at crates/rust-analyzer/src/handlers/dispatch.rs:417:17:
Invalid request
Method: workspace/didChangeWatchedFiles
 error: relative URL without a base: "_claude_vscode_fs_right:/Users/nick/Projects/XXXX/src/agent.rs

Steps to Reproduce

Environment:

OS: macOS (Darwin 25.2.0)
VS Code extension: Claude Code (latest)
rust-analyzer: (latest from VS Code marketplace)
Steps to Reproduce:

Open a Rust project in VS Code with rust-analyzer enabled
Use Claude Code to make edits to Rust files
When Claude Code shows the diff view, rust-analyzer crashes

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.19 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

rust-analyzer issues:

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗