Repository navigation
Conversation
… of hanging its thread In a sandbox, client.mcp.execute goes through one shared gumcp_client session on a background loop, and the calling thread waited on it with no deadline. When a response was lost (a load balancer 502 on one POST tore down the session in gumstack-mcp 0.1.38), every thread waiting on that session blocked until the agent's own shell timeout killed the script, with no error. Each direct-transport call now has a 330 s deadline, above the backend's 300 s per-tool-call limit, so it only ends a call that will never be answered. It returns the same tool_execution_failed / "Tool call timed out after Ns." result as the HTTP path and logs a warning. The deadline cancels the hung call, which makes gumcp_client drop that server's session so the next call reconnects. The deadline is asyncio.wait_for rather than an anyio scope: the first call connects lazily and leaves the session's anyio scopes open in its task, so an enclosing anyio scope could not exit cleanly. A broken session's "cancel scope" CancelledError is converted inside the wait_for task so the existing mcp_server_connection_failed mapping still sees its message on Python 3.10. Co-authored-by: Cursor <cursoragent@cursor.com>
…gged after the released 0.5.9 The release workflow requires the tag to match _version.py, and v0.5.9 is already on PyPI. Co-authored-by: Rahul Behal <rahulbehal01@hotmail.com>
…raint each one guards The 330 s value must stay above the backend's limit and the in-task conversion exists for a Python 3.10/3.11 quirk; the test-double docstrings repeated their code and are removed. Co-authored-by: Rahul Behal <rahulbehal01@hotmail.com>
cursor
Bot
force-pushed
the
rahul-fix-mcp-call-deadline
branch
from
October 28, 2026 23:49
71927d4 to
1c73ef9
Compare
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.
Summary
mcp.executecall now has a 330 s deadline, above the backend's tool-call limit, so a lost answer fails instead of hanging its thread.tool_execution_failed; the next call reconnects.Test plan
pytest tests/sdk/test_gumcp_transport.py: 29 passed.Exceptions
tool_execution_failed/api_errorenvelope, not a client-side type (R3).implementationmarker, like the file's other tests.Release order: gumloop/gumstack-mcp-python#38, then gumloop/guMCP-client#46, then #92; sandbox versions are raised in gumloop_backend after release.
Raised from Cursor Cloud agent
run-9314e1d4