Repository navigation
chore: bump go-sdk to v1.8.0 and detect input validation failures as tool errors - #10019
Merged
Merged
Conversation
…s tool errors Since go-sdk v1.7, input schema validation failures are tool error results, not protocol errors. Without detecting them, the retry for stringified tool arguments never runs.
nishantmonu51
approved these changes
Oct 14, 2026
8 tasks
nishantmonu51
added a commit
that referenced
this pull request
Oct 21, 2026
…mp to v1.8.0 (#10039) * fix: MCP requests no longer share an AI session after the go-sdk bump to v1.8.0 Since go-sdk v1.8.0, a stateless streamable HTTP handler neither reads nor sets the Mcp-Session-Id header (SEP-2567), and ServerOptions.GetSessionID is not consulted. Rill runs both its MCP servers stateless and keys AI sessions on that header, so after #10019 every request to the runtime's /mcp endpoint created its own ai_sessions row, and the admin service's unified MCP server stopped issuing session IDs, so it never forwarded one to the runtime. Issue and preserve the header in Rill's own HTTP middleware instead of relying on the SDK: a request without a session ID gets a new one, and every response carries the session ID it was served with, which MCP clients echo on subsequent requests. This does not depend on the SDK's MCPGODEBUG=allowsessionsinstateless compatibility flag, which is removed in v1.9. Tests assert that all the requests of one client connection share one AI session, on both the 2025 protocol versions (initialize handshake) and the 2026-07-28 version. * fix: address review on MCP session IDs - Retry the session lookup when the insert races with a concurrent request that addresses the same new session ID - Return no server for non-POST MCP requests, so probes do not create AI sessions - Reject malformed client-supplied session IDs in the middleware - Export the header name and drop duplicate comments and a redundant guard
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.
github.com/modelcontextprotocol/go-sdkfrom v1.4.1 to v1.8.0. Split out of Add external MCP servers asmcpconnectors with per-user OAuth #10009, which needs it for the external MCP client.invalid paramsprotocol errors.isMCPInputValidationFailuredetects both, so the retry for stringified tool arguments still runs. MCP clients now get these failures as tool errors.SameSite=Laxwith CORS that disallows credentials.Checklist:
Developed in collaboration with Claude Code