Conversation
ineersa
requested review from
CodeWithKyrian,
Nyholm,
chr-hertel and
soyuka
as code owners
September 28, 2026 20:19
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.
Closes #517.
Changes
Adds optional
cancellationandtimeoutSecondsarguments toClient::callTool(). Existing calls remain valid. An explicit per-call timeout replaces the configured request timeout and uses one deadline across protocol exchanges.notifications/cancelledover STDIO and handshake-era HTTP. HTTP protocol2026-07-28uses response-stream closure instead.docs/client/transports.md.Async behavior and limitations
The API remains synchronous and framework-agnostic. No async HTTP client or event loop is added.
HTTP cancellation is cooperative. Blocking PSR-18 requests and PSR-7 body reads must return before the SDK can observe interruption. A legacy HTTP cancellation POST can itself block. Per-call deadlines are therefore not hard HTTP wall-clock limits; callers still need HTTP-client network timeouts. Cancellation does not guarantee that server-side work stops or rolls back.
Validation
make ci: passed, 1,775 tests and 4,646 assertions, with 7 existing Inspector skips. Those skips are explicitly declared inHttpClientCommunicationTestfor logging/sampling limitations.make docs-guides: strict build passed.make conformance-tests: client matched its expected-failure baseline, 12 checks passed and 42 expected failures. The initial server run was blocked by fixture-directory permissions; after applying the setup used by CI,make conformance-serverpassed all 80 checks.New regression coverage uses protocol/HTTP unit tests and a real STDIO integration fixture. It covers synchronous JSON interruption, cancellation during body reads, interrupted suspended requests with buffered replies, version-dependent signaling, notification failures, late-response cleanup, and connection reuse. No new Inspector scenarios were added.