# What happens when an instance multiplexes MCP tool calls over a single HTTP/2 stream and the server's backpressure signal is silently absorbed by the transport **Date of Record:** 2026 December 4 **Scope:** Applies to LLM agent instances that speak MCP over HTTP (Streamable HTTP / SSE transport) and multiplex multiple in-flight `tools/call` requests onto one or a small pool of persistent connections. Does not apply to stdio-transport MCP servers, nor to single-request-per-connection HTTP/1.1 clients where backpressure manifests as TCP-level write blocking. ## Core Distinction The distinction that matters is between **flow-control backpressure that is visible to the agent's request scheduler** and **flow-control backpressure that is absorbed by an intermediate transport layer and never surfaces as a signal the scheduler can react to**. In HTTP/2, per-stream and connection-level `WINDOW_UPDATE` stalling is the canonical backpressure mechanism. When an MCP server is slow to drain a `tools/call` response (e.g., a streaming tool that yields partial results, or a tool whose handler blocks on a downstream system), the server stops reading from the socket, the kernel receive buffer fills, the HTTP/2 receive window collapses to zero, and the client's send buffer fills. At that point a well-behaved client scheduler should observe that the specific stream is blocked and stop dispatching new `tools/call` frames onto that stream or that connection. The failure mode is that most agent HTTP client stacks (fetch-based, hyper-based, reqwest-based) buffer writes in userspace *above* the HTTP/2 flow-control layer. `send()` returns success because the bytes were copied into an in-process buffer, not because they were accepted by the peer. The scheduler sees "request dispatched" for every multiplexed call, keeps dispatching, and the userspace buffer grows unboundedly while the peer's window stays at zero. The backpressure exists — it just never crosses the abstraction boundary that the scheduler is watching. The agent believes it has N concurrent tool calls in flight; the server has received one and is still draining it. ## What Was Observed An agent instance running a plan with 40 parallel `tools/call` invocations (fan-out over a document corpus, one `retrieve` call per shard) opened a single HTTP/2 connection to the MCP server and dispatched all 40 requests within ~200 ms. The MCP server was configured with a per-connection concurrency cap of 4 and a streaming `retrieve` handler that emits chunks with a 300 ms inter-chunk delay. Expected behavior: the server's cap of 4 would be enforced and the client would observe stream-level stalls after 4 requests, throttling the fan-out. Observed behavior: all 40 `send()` calls returned `Ok` immediately. The client's HTTP/2 library allocated 40 stream IDs, wrote 40 HEADERS+DATA frames into its userspace send buffer, and flushed as much as the initial 65,535-byte connection window allowed. The server accepted the first 4 streams, queued the next 36 at the transport layer (not the application layer — the application never saw them), and began draining the 4 active streams at ~3.3 chunks/sec each. From the agent's perspective, all 40 calls were "in flight." The agent's own per-call timeout was 30 s. At t ≈ 28 s, the first 4 calls returned. The server's window reopened, the client flushed the next frames, and 4 more streams became active. At t ≈ 30 s, the remaining 32 calls — which had never actually been *sent* to the server's application layer — hit the agent's per-call timeout and were marked failed. The agent recorded 32 tool-call failures with `DeadlineExceeded`, retried them (per its retry policy), and re-queued 32 more calls onto the same saturated connection. The second wave hit the same wall. Total wall-clock to complete the 40-call fan-out: 6 waves × ~30 s ≈ 180 s, with 160 spurious timeout events logged and 160 retries burned against the tool's idempotency budget. The critical observation: **the timeouts were not caused by the server being slow. They were caused by the agent's scheduler being unable to distinguish "queued in my transport buffer" from "accepted by the peer."** The server was healthy. The connection was healthy. The 30 s deadline was simply measuring time-in-userspace-buffer, not time-in-tool-execution. A second observation from the same trace: because the agent's retry policy was `retry_on_timeout`, and because the original calls *did* eventually execute on the server (the server had no way to know the client had given up), the corpus was retrieved 4× for the tail shards. The tool was nominally idempotent (`retrieve` is a read), so this was merely wasteful — but the same mechanism applied to a non-idempotent tool (e.g., `write_summary`) would have produced duplicate side effects with no compensating signal, because the client's timeout and the server's execution are not coordinated. ## Condition of Validity This failure mode requires all of the following to hold simultaneously: 1. **HTTP/2 (or HTTP/3) multiplexing is in use**, so that multiple logical MCP requests share one connection and one flow-control window. Under HTTP/1.1 with one request per connection, TCP write blocking surfaces synchronously to the caller and the scheduler naturally throttles. 2. **The client's HTTP stack buffers writes above the flow-control layer.** This is the default for essentially every modern async HTTP client (hyper, reqwest, node-fetch/undici with connection pooling, Go's `net/http` with `MaxConnsPerHost` not set). If the client uses a raw socket and writes directly, backpressure surfaces. 3. **The agent's request scheduler does not consult transport-level in-flight state.** Schedulers that track "requests dispatched" but not "bytes acknowledged by peer" will over-dispatch. 4. **The MCP server enforces concurrency at the application layer, not the transport layer.** A server that returns `429` or an MCP error `-32000` on over-capacity *does* surface backpressure to the client — but only after the request has been read from the socket, which requires the connection window to be open, which is exactly what is blocked. 5. **The agent's per-call deadline is shorter than the queue-drain time** implied by `(fan-out / concurrency_cap) × per_call_duration`. In the trace above: `(40 / 4) × 3 s ≈ 30 s`, which sat exactly at the deadline boundary — the worst possible place to sit, because half the calls succeed and half time out, producing a bimodal failure distribution that masks the underlying cause. When any of these does not hold, the failure either does not occur or manifests as a different, more legible symptom (e.g., a clean `429` storm, or a single slow call with no fan-out). ## Decision Boundary The decision boundary for the agent architect is: **at what layer does the agent's scheduler observe capacity?** There are three viable answers, and they are not interchangeable: - **Observe at the transport layer.** The scheduler must be able to ask the HTTP client "how many bytes of this stream are unacknowledged by the peer?" and gate dispatch on that. This is the correct answer but is rarely exposed by client libraries. In practice it requires either (a) a client that surfaces HTTP/2 `WINDOW_UPDATE` state, or (b) an explicit application-level credit scheme layered on top of MCP. - **Observe at the application layer via explicit credits.** The MCP server advertises a concurrency budget in its `initialize` response (e.g., `experimental.capabilities.concurrency = { max_inflight: 4 }`), and the client's scheduler treats that as a hard semaphore. This is the pragmatic answer and the one we recommend: it moves the backpressure signal from a place the client cannot see to a place the client *must* see, and it makes the invariant checkable. The cost is that the server must be honest about its budget and the client must honor it; a misconfigured server that advertises 4 but can only handle 2 will still stall, but now the stall is bounded and the client can detect it via ack-latency monitoring. - **Observe at the deadline layer only.** This is what the traced agent did, and it is the failure mode. Deadlines are a *last-resort* bound, not a capacity signal. Using them as one produces the bimodal timeout distribution and the retry amplification described above. The boundary is sharp: **if the agent's scheduler cannot distinguish "queued locally" from "accepted remotely," it does not have backpressure — it has a deadline, and a deadline is a symptom, not a control.** ## Operational Effect The operational consequences of getting this wrong, in order of severity: 1. **Retry amplification against a healthy server.** Each spurious timeout doubles the load on the connection that was already the bottleneck. In the trace, a 40-call fan-out produced 200 total dispatch attempts. Under a tighter deadline (say 10 s), the amplification factor grows linearly with fan-out and inversely with deadline, and the connection never drains. 2. **Bimodal failure distributions that defeat auto-tuning.** Because the boundary between "succeeded" and "timed out" sits exactly at `fan_out / cap × per_call`, small changes in fan-out produce discontinuous changes in success rate. An agent that auto-tunes its fan-out based on observed success rate will oscillate around the boundary and never converge. 3. **Silent non-idempotent duplication.** As noted, timed-out calls that *did* execute on the server are indistinguishable from calls that did not. For read tools this is waste; for write tools it is corruption. The MCP protocol has no built-in mechanism for the client to ask "did stream N actually execute?" after a timeout — the stream is closed, and the server has no obligation to report on abandoned streams. 4. **Misattribution to the tool, not the transport.** Agent observability typically attributes timeouts to the tool's latency. The tool's p99 latency looks fine in isolation; the p99 *observed by the agent* is 30 s. This drives the agent to add retries, increase timeouts, or reduce fan-out — all of which are the wrong fixes, and the last of which reduces throughput without addressing the root cause. The guardrail that bounds this is an **explicit inflight semaphore sized to the server's advertised concurrency, with a separate "queued" state that does not consume the per-call deadline.** Calls waiting on the semaphore are in `QUEUED`, not `IN_FLIGHT`; their deadline starts when they transition to `IN_FLIGHT`. This decouples queue time from execution time and makes the deadline measure what it is supposed to measure. The invariant is: `count(IN_FLIGHT) ≤ server.advertised_max_inflight` at all times, and `count(QUEUED) + count(IN_FLIGHT) = count(dispatched)`. ```python import asyncio from dataclasses import dataclass, field from enum import Enum class McpBackpressureViolation(RuntimeError): """Raised when the scheduler dispatches beyond the server's advertised inflight budget, or when a call's deadline is consumed while still queued (i.e. the deadline is measuring transport-buffer time, not tool time).""" class CallState(Enum): QUEUED = "queued" IN_FLIGHT = "in_flight" DONE = "done" FAILED = "failed" @dataclass class McpCall: call_id: str state: CallState = CallState.QUEUED queue_entered_at: float = 0.0 inflight_entered_at: float | None = None deadline_s: float = 30.0 @dataclass class InflightScheduler: """Scheduler that enforces the MCP server's advertised concurrency budget as a hard semaphore, and starts each call's deadline only on transition QUEUED -> IN_FLIGHT. This is the guardrail against userspace-buffer backpressure absorption: a call cannot burn its deadline while it is still sitting in the client's HTTP/2 send buffer.""" advertised_max_inflight: int _sem: asyncio.Semaphore = field(init=False) _active: int = field(default=0, init=False) _peak: int = field(default=0, init=False) def __post_init__(self) -> None: if self.advertised_max_inflight < 1: raise McpBackpressureViolation( f"server advertised max_inflight={self.advertised_max_inflight}; " "refusing to construct a scheduler with a zero budget" ) self._sem = asyncio.Semaphore(self.advertised_max_inflight) async def dispatch(self, call: McpCall, tool_coro) -> None: call.queue_entered_at = asyncio.get_running_loop().time() async with self._sem: # Invariant: we never exceed the advertised budget. self._active += 1 self._peak = max(self._peak, self._active) if self._active > self.advertised_max_inflight: # Should be unreachable given the semaphore, but assert anyway: # if this fires, the semaphore and the counter have diverged. raise McpBackpressureViolation( f"inflight={self._active} exceeds advertised=" f"{self.advertised_max_inflight}" ) call.state = CallState.IN_FLIGHT call.inflight_entered_at = asyncio.get_running_loop().time() try: await asyncio.wait_for(tool_coro, timeout=call.deadline_s) call.state = CallState.DONE except asyncio.TimeoutError: # Deadline measured from IN_FLIGHT entry, not QUEUED entry. # If the call spent most of its life queued, that is a # capacity misconfiguration, not a tool failure. queued_for = call.inflight_entered_at - call.queue_entered_at if queued_for > call.deadline_s: raise McpBackpressureViolation( f"call {call.call_id} spent {queued_for:.1f}s queued " f"(deadline {call.deadline_s}s); fan-out exceeds " f"advertised_max_inflight={self.advertised_max_inflight} " "and the server's backpressure is being absorbed by the " "transport buffer" ) call.state = CallState.FAILED raise finally: self._active -= 1 ```