Hi! Claude Code recently got built-in LSP support and added this project as an official plugin. I was trying it out but immediately ran into this error:
2026-01-22T20:28:36.152Z [DEBUG] [LSP PROTOCOL plugin:csharp-lsp:csharp-ls] Received response 'initialize - (0)' in 793ms.
2026-01-22T20:28:36.152Z [DEBUG] [LSP PROTOCOL plugin:csharp-lsp:csharp-ls] Sending notification 'initialized'.
2026-01-22T20:28:36.153Z [DEBUG] LSP server plugin:csharp-lsp:csharp-ls initialized
2026-01-22T20:28:36.153Z [DEBUG] LSP server instance started: plugin:csharp-lsp:csharp-ls
2026-01-22T20:28:36.166Z [DEBUG] [LSP PROTOCOL plugin:csharp-lsp:csharp-ls] Received request 'client/registerCapability - (2)'.
2026-01-22T20:28:36.167Z [DEBUG] [LSP PROTOCOL plugin:csharp-lsp:csharp-ls] Sending response 'client/registerCapability - (2)'. Processing request took 0ms
2026-01-22T20:28:36.180Z [DEBUG] [LSP SERVER plugin:csharp-lsp:csharp-ls] 15:28:36.180 warn: Initialization[0]
handleInitialized: dynamic cap registration has failed with System.AggregateException: One or more errors occurred. (Unhandled method client/registerCapability)
---> StreamJsonRpc.RemoteMethodNotFoundException: Unhandled method client/registerCapability
at StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](RequestId id, String targetName, IReadOnlyList`1 arguments, IReadOnlyList`1 positionalArgumentDeclaredTypes, IReadOnlyDictionary`2 namedArgumentDeclaredTypes, CancellationToken cancellationToken, Boolean isParameterObject)
--- End of inner exception stack trace ---
2026-01-22T20:28:36.184Z [DEBUG] [LSP PROTOCOL plugin:csharp-lsp:csharp-ls] Received request 'workspace/configuration - (3)'.
2026-01-22T20:28:36.184Z [DEBUG] LSP: Received workspace/configuration request from plugin:csharp-lsp:csharp-ls
2026-01-22T20:28:36.185Z [DEBUG] [LSP PROTOCOL plugin:csharp-lsp:csharp-ls] Sending response 'workspace/configuration - (3)'. Processing request took 1ms
2026-01-22T20:28:36.423Z [DEBUG] [LSP PROTOCOL plugin:csharp-lsp:csharp-ls] Received request 'window/workDoneProgress/create - (4)'.
2026-01-22T20:28:36.423Z [DEBUG] [LSP PROTOCOL plugin:csharp-lsp:csharp-ls] Sending response 'window/workDoneProgress/create - (4)'. Processing request took 0ms
2026-01-22T20:28:36.426Z [DEBUG] [LSP SERVER plugin:csharp-lsp:csharp-ls] 15:28:36.425 fail: serverEventLoop[0]
serverEventLoop: crashed with System.AggregateException: One or more errors occurred. (Unhandled method window/workDoneProgress/create)
---> StreamJsonRpc.RemoteMethodNotFoundException: Unhandled method window/workDoneProgress/create
at StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](RequestId id, String targetName, IReadOnlyList`1 arguments, IReadOnlyList`1 positionalArgumentDeclaredTypes, IReadOnlyDictionary`2 namedArgumentDeclaredTypes, CancellationToken cancellationToken, Boolean isParameterObject)
--- End of inner exception stack trace ---
System.AggregateException: One or more errors occurred. (Unhandled method window/workDoneProgress/create)
---> StreamJsonRpc.RemoteMethodNotFoundException: Unhandled method window/workDoneProgress/create
at StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](RequestId id, String targetName, IReadOnlyList`1 arguments, IReadOnlyList`1 positionalArgumentDeclaredTypes, IReadOnlyDictionary`2 namedArgumentDeclaredTypes, CancellationToken cancellationToken, Boolean isParameterObject)
--- End of inner exception stack trace ---
After that there are a bunch of additional errors but they're all Unhandled method window/workDoneProgress/create.
I wanted to get a better idea if this was on the csharp-ls side or the Claude Code client side before opening a ticket, so I asked Claude to try and diagnose the issue. I am not a F# expert, but wanted to leave it here just in case (at the risk of posting AI slop 😅).
I also noticed this note:
|
// TODO: Send notifications / requests to client only if client support it |
Diagnosis from Claude:
Root Cause: The csharp-language-server crashes on startup when the LSP client (Claude Code's LSP plugin) doesn't
implement the window/workDoneProgress/create method.
Sequence of Events:
- During workspace initialization, workspaceWithSolutionsLoaded calls progressReporter.Begin() (Workspace.fs:430)
- ProgressReporter.Begin() calls client.WindowWorkDoneProgressCreate (ProgressReporter.fs:16)
- WindowWorkDoneProgressCreate calls sendServerRequest.Send "window/workDoneProgress/create" (Client.fs:45)
- When the client doesn't implement this method, StreamJsonRpc throws a RemoteMethodNotFoundException
- The exception propagates up through the server event loop and crashes it (ServerState.fs:590-592)
Key Insight: The ProgressReporter is designed to gracefully handle when WindowWorkDoneProgressCreate returns an Error
result (lines 18-19 in ProgressReporter.fs set canReport <- false). However, the RemoteMethodNotFoundException is
thrown as an exception rather than returned as an Error result, bypassing this graceful handling.
The Fix: Modify WindowWorkDoneProgressCreate in Client.fs to catch RemoteMethodNotFoundException (and potentially
other RPC exceptions) and return an Error result instead of letting the exception propagate.
Hi! Claude Code recently got built-in LSP support and added this project as an official plugin. I was trying it out but immediately ran into this error:
After that there are a bunch of additional errors but they're all
Unhandled method window/workDoneProgress/create.I wanted to get a better idea if this was on the csharp-ls side or the Claude Code client side before opening a ticket, so I asked Claude to try and diagnose the issue. I am not a F# expert, but wanted to leave it here just in case (at the risk of posting AI slop 😅).
I also noticed this note:
csharp-language-server/src/CSharpLanguageServer/Lsp/Client.fs
Line 12 in f4c1c9f
Diagnosis from Claude:
Root Cause: The csharp-language-server crashes on startup when the LSP client (Claude Code's LSP plugin) doesn't
implement the window/workDoneProgress/create method.
Sequence of Events:
Key Insight: The ProgressReporter is designed to gracefully handle when WindowWorkDoneProgressCreate returns an Error
result (lines 18-19 in ProgressReporter.fs set canReport <- false). However, the RemoteMethodNotFoundException is
thrown as an exception rather than returned as an Error result, bypassing this graceful handling.
The Fix: Modify WindowWorkDoneProgressCreate in Client.fs to catch RemoteMethodNotFoundException (and potentially
other RPC exceptions) and return an Error result instead of letting the exception propagate.