Repository navigation
[Client] Expose the capabilities the server declared - #542
Merged
Merged
Conversation
chr-hertel
requested review from
CodeWithKyrian,
Nyholm and
soyuka
as code owners
October 7, 2026 07:49
chr-hertel
force-pushed
the
claude/client-server-capabilities
branch
2 times, most recently
from
October 7, 2026 20:17
18859e6 to
20e7eb0
Compare
The client parsed the server's capabilities during the handshake but kept none of them. Keep them in the client state and expose them through Client::getServerCapabilities(), read from server/discover on 2026-07-28.
chr-hertel
force-pushed
the
claude/client-server-capabilities
branch
from
October 7, 2026 20:27
20e7eb0 to
b414f78
Compare
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.
The client parses the server's capabilities in
initializebut keeps onlyserverInfoandinstructions, so a caller can't check forcompletions,loggingorresources.subscribebefore relying on them. Found while building the interop suite in #540.Changes
Client::getServerCapabilities(): ?ServerCapabilities, taken frominitialize, or fromserver/discoveron 2026-07-28.nulluntil a server declared them.ClientStateInterface/ClientStategainsetServerCapabilities()/getServerCapabilities().BC
Adding methods to
ClientStateInterfacebreaks custom implementations, hence[BC Break]in the CHANGELOG.Protocolalways creates its ownClientStateand there's no way to inject another, so I don't expect any exist.