Implement shutdown and exit RPCs per LSP specification#102
Merged
Conversation
- Added Shutdown request and Exit notification imports from async_lsp - Implemented shutdown request handler that logs and returns empty response - Implemented exit notification handler that logs the event - Registered both handlers in the router - Fixed code formatting in workspace_symbol.rs Co-authored-by: coder3101 <22212259+coder3101@users.noreply.github.com>
As per LSP specification: - Exit with code 0 if shutdown was received before exit - Exit with code 1 if exit was received without shutdown Added shutdown_received flag to track whether shutdown RPC was called, and use it in exit handler to determine the appropriate exit code. Co-authored-by: coder3101 <22212259+coder3101@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement shutdown and exit RPCs for clean exit
Implement shutdown and exit RPCs per LSP specification
Jan 31, 2026
coder3101
approved these changes
Jan 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
VS Code LSP client was failing with
No such method shutdownwhen stopping the server. The server lacked implementation of the required lifecycle RPCs.Changes
shutdown_receivedflagshutdown_received: boolfield inProtoLanguageServerto determine exit behaviorImplementation
The
LifecycleLayermiddleware handles state transitions; these handlers provide the required lifecycle endpoints and exit code semantics.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
docs.rs/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)microsoft.github.io/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.