Repository navigation
Conversation
ineersa
requested review from
CodeWithKyrian,
Nyholm,
chr-hertel and
soyuka
as code owners
October 8, 2026 02:33
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.
Fixes #559.
Problem
A request carrying
Mcp-Session-Idcan receive HTTP 404 when its session expires. Empty or plain-text responses currently leave the request waiting until timeout, while the client still reports itself connected.Session expiry during a legacy
notifications/cancelledPOST has the same problem.Protocol::notifyCancellation()logs notification failures and preserves the original interruption, so throwing a connection exception alone does not invalidate the client.Changes
On HTTP 404 for a request carrying
Mcp-Session-Id,HttpTransport::send()now:ConnectionExceptionwith code 404.An ordinary request fails promptly. During cancellation, the original interruption still reaches the caller, but
Client::isConnected()remains false even when the notification failure is logged. Callers can evict the client and reconnect without the expired session ID. This does not replay the failed tool call.Requests without a session header and other HTTP status codes are unchanged. This is narrower than #425 and addresses the session-expiry behavior required by the 2025-11-25 session management rules.
Validation
RequestCancelledException.make cipassed: 1,971 tests, 5,353 assertions, 8 existing skips; formatting and PHPStan level 8 passed.make conformance-tests: server 80/80; client 12/54 matches the expected-failure baseline.P.S. I'm really thinking now that I might just need to upgrade my MCP client version, but it was working just fine all this time!