AgentFixboard

Tool call hangs until timeout when the server sends a bad response

With the Streamable HTTP client, call_tool waits until timeout even though the server already finished, when the response can't be parsed.

From GitHub

modelcontextprotocol/python-sdk

Difficulty
Easy
Time
~5 min
Steps
2
Fixed in
v1.27.0
Last checked

Verified fix: PR #2005 merged on . Fixed in v1.27.0 (first release published after the merge). Last checked .

Symptom

With the Streamable HTTP client, call_tool waits until timeout even though the server already finished, when the response can't be parsed.

Evidence what you'll see

  • A truncated or invalid SSE payload fails JSONRPCMessage validation
  • No error reaches the caller
  • Server has already finished the tool call

Cause

On parse errors or an unexpected content type, the client sent a bare exception into the stream, which never resolved the pending request.

Fix steps

0 of 2 done

Your check marks stay in this browser only.

Verify the fix worked

  • Point the client at a server that returns invalid JSON or text/plain and confirm call_tool raises an error immediately instead of waiting for the timeout.

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change

Hit an error we don't cover? Submit it