Repository navigation
fix(mcp): let a remote tool call run for 10 minutes, not 60 seconds - #518
Merged
Merged
Conversation
Both HTTP transports bounded every request at 60 s, tools/call included, so a remote tool that builds, drives a browser or generates media failed with a timeout while the same tool over stdio (no bound) worked. tools/call now waits up to 10 minutes on Streamable HTTP and on the legacy SSE answer; initialize, listings and notifications keep the 60 s bound so a dead server still fails fast at startup. Co-Authored-By: Claude Fable 5.2 <[email protected]>
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.
Problem
Both HTTP transports bounded every request at 60 s,
tools/callincluded. A remote tool that builds, drives a browser or generates media failed with a timeout, while the same tool over stdio (which has no bound) worked.Decision
tools/callwaits up to 10 minutes; everything else keeps 60 s.whycodes run,serveor CI nobody is there to press Esc, and a dead server would hold the run forever. An interactive user can still cancel at any time; that path is unchanged.initializeand the listings run at startup, where a dead server should fail in a minute, not ten.The longer bound applies to the Streamable HTTP POST and, on the legacy transport, to both the POST and the wait for the answer on the SSE stream. stdio is unchanged (still unbounded).
Verification
a_tool_call_may_outlast_the_protocol_request_bound: a server answers after twice the protocol bound;tools/callsucceeds,tools/listtimes out.a_legacy_tool_call_waits_longer_for_its_sse_answer: same for the SSE answer wait.cargo test -p whycodes-mcp: 81 + 10 passed. Clippy, fmt, budget scripts: green.cargo llvm-cov clean;http.rsshows the same 6 lines asmain(warn!field lines this Windows host reports and CI does not). The fullscripts/coverage.shworkspace run was not done locally.🤖 Generated with Claude Code