[Bug] Windows: LSP server receives malformed file URIs (file://C:\... instead of file:///C:/...)
Resolved 💬 2 comments Opened Mar 4, 2026 by CheolHoJung Closed Mar 4, 2026
Summary
On Windows, Claude Code sends incorrect file:// URIs to LSP servers.
The generated URIs use the format file://C:\path\to\file instead of
the correct RFC 8089 format file:///C:/path/to/file.
Environment
- OS: Windows 10 Pro
- Claude Code: latest
- LSP Server: Eclipse JDT Language Server (jdtls)
Steps to Reproduce
- Install a LSP plugin (e.g.
jdtls-lsp) on Windows - Open a Java project
- Attempt any LSP operation (documentSymbol, hover, etc.)
Expected Behavior
URIs sent to LSP servers should follow RFC 8089:
file:///C:/Users/username/project/src/Main.java
Actual Behavior
URIs are malformed:
file://C:\Users\username\project\src\Main.java
This causes LSP servers to fail with:
java.net.URISyntaxException: Illegal character in authority at index 9:
file://C:\Users\...
The issue affects all LSP operations including:
initializerequest (rootUri,workspaceFolders[].uri)textDocument/didOpentextDocument/documentSymboltextDocument/hovertextDocument/definition
Workaround
A Python proxy that intercepts all LSP messages and patches the URIs
before forwarding to the actual LSP server.
def fix_uri(uri):
if isinstance(uri, str) and uri.startswith('file://') and not uri.startswith('file:///'):
return 'file:///' + uri[7:].replace('\', '/')
return uri
Notes
This appears to be a Windows-specific issue where backslash path separators
and the missing third slash cause RFC 8089 non-compliant URIs to be generated.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗