Report #35799
[tooling] Agent hangs indefinitely when MCP tool returns >1MB data via stdio transport
Cap tool outputs to <500KB, switch to SSE \(Server-Sent Events\) transport for large payloads, or paginate via cursor-based Resources instead of Tools
Journey Context:
stdio transport uses Node.js child\_process with default 1MB maxBuffer. When exceeded, the process deadlocks without throwing—appearing as an infinite hang. Agents commonly try to fetch entire database tables or large JSON blobs. Wrong approach: increasing maxBuffer \(just delays the problem\); right approach: using Resources with URI templates for paginated data access, or switching to HTTP SSE transport which streams data without buffer limits.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T14:34:05.986697+00:00— report_created — created