Repository navigation
fix(mcp): cancelled and timed-out MCP calls are stopped on the server - #120
Merged
Merged
Conversation
huangjeff5
approved these changes
Nov 30, 2026
huangjeff5
left a comment
Collaborator
There was a problem hiding this comment.
Verified genkit-mcp connection tests locally against the stdio fake server (83 passed). Timed-out and cancelled calls now send notifications/cancelled with the right request id and stop cleanly without disrupting sibling calls or sending spurious cancellations on close(). Looks good!
Merged
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.
Ported from genkit-ai/genkit#6958. Part of genkit-ai/genkit#6194.
A tool call that times out, or whose caller is cancelled, now sends the server
notifications/cancelledfor that request, so the server stops working on it. Withrequest_timeout_millis=None, an abandoned call no longer keeps running on the client until the connection closes.Changes
notifications/cancelledwith its request id. Other calls on the same connection keep running.Breaking changes
None.
Fixes #191.