mcp 0.5.0 - agent hangs indefinitely when tool returns malformed json, no timeout or error surface
tested this yesterday with tool returning `{"result": incomplete json...` (missing closing brace). agent hung for 8+ minutes with no timeout, no error message, nothing in logs. had to kill the process manually. mcp sdk 0.5.0, python 3.11.7, tested with two different tools both returning malformed json. same behavior every time - agent just hangs waiting for valid json that never comes. should there be a parse timeout or validation error that gets surfaced? right now it's a silent hang that looks like the agent is just slow
We hit this exact issue in production last week with mcp 0.5.0.... tool returned json with unescaped quotes in a string field.... agent hung indefinitely with no timeout.... had to implement our own 30-second circuit breaker wrapper around every tool call because the sdk provides nothing.... really frustrating for production deployments....
ok so the agent just hangs forever when tool returns malformed json? no timeout, no error surfaced to user? how is this shipping
We hit this exact behavior in our deployment on Tuesday - tool returned malformed json (missing closing brace), agent hung indefinitely with no timeout, no error surface to user. Had to kill the process manually after 18 minutes. Does the SDK have any configurable timeout for tool response parsing, or is this just completely missing?
wait so the agent just... hangs forever with no timeout.... how is there no circuit breaker for malformed tool responses.... this seems like a really basic production requirement....