Repository navigation
Conversation
A CreateMessageHandler, or an ElicitationHandler for a form elicitation, that returned nil, nil made the client dereference the nil result and crash. CreateMessageWithToolsHandler and URL elicitation sent the nil to the server instead. Report an error naming the handler in all four cases, as readResource does for a resource handler.
This branch has not been deployed
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.
A sampling or elicitation handler returning
(nil, nil)could panic in the client or send a null result back to the server. These handler paths report-32603by wrappingjsonrpc2.ErrInternal, while preserving errors returned by the handler.Tests cover both sampling handlers and form/URL elicitation. Four direct tests check the error code and sentinel; eight multi-round-trip cases check propagation on 2026-07-28 and 2025-11-25 sessions.
Validation after integrating current main:
go test -race ./...,go vet ./..., CI-pinnedstaticcheckv0.6.1, formatting, and diff checks pass locally on Go 1.25.6. The latest public commit also passed all nine GitHub checks, including Go 1.25/1.26 tests, race, client/server conformance, lint, and CodeQL.