Repository navigation
fix(client): resume Streamable HTTP SSE streams independently - #1171
Merged
devcrocod merged 2 commits intoNov 12, 2026
Merged
Conversation
…n handling in transport logic.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block approval of the stream-isolation and cancellation changes.
No open issues 🎉
What changed in this PR
Fixes #1170 by isolating Streamable HTTP SSE streams in the Kotlin SDK client, so resuming one request no longer cancels other streams.
Changes:
- Runs standalone and resumed request streams in separate jobs, stopping resumptions when their requests are cancelled.
- Sends cancellation notifications without the original request’s resumption token.
- Adds regression tests for concurrent streams, cancellation, and cancellation send options.
| File | Description |
|---|---|
| kotlin-sdk-core/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ProtocolOutboundCancellationTest.kt | Verifies cancellation preserves relatedRequestId but omits the resumption token. |
| kotlin-sdk-core/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/Protocol.kt | Removes resumption options from cancellation sends. |
| kotlin-sdk-client/src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/StreamableHttpClientTransport.kt | Separates stream jobs and cancels resumptions by request ID. |
| integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/streamablehttp/StreamableHttpClientTransportIntegrationTest.kt | Tests stream independence and cancellation using scripted server routes. |
Review effort: Balanced
devcrocod
deleted the
devcrocod/streamable-http-independent-sse-streams
branch
November 12, 2026 15:38
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.
Run the standalone GET stream and each resumed request stream in separate jobs, so resuming one no longer cancels the others. A resumption stops when its request is cancelled.
Protocolno longer sendsnotifications/cancelledwith the request's resumption token, which made the transport resume a stream instead of sending the cancel.fixes #1170
How Has This Been Tested?
Integration tests against a scripted server: the GET stream survives a resumption, concurrent resumptions both complete, and a cancelled request stops resuming, both inline and with
resumptionToken. AProtocoltest checks the cancel options. Also checked against a TypeScript SDK 1.30.1 server withMCP-Protocol-Versionset.Breaking Changes
None
Types of changes
Checklist