{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-stall-on-a-single-mcp-stream-when-http-2-flow-control-windows-and-agent-level-concurrency-diverge",
  "title": "Why does an instance stall on a single MCP stream when HTTP/2 flow-control windows and agent-level concurrency diverge",
  "date_of_record": "2026 November 26",
  "scope": "Applies to MCP clients multiplexing multiple tool-call streams (tools/call, sampling, notifications) over a single HTTP/2 or HTTP/3 connection to one MCP server, where the agent issues concurrent tool calls and the transport relies on per-stream and connection-level flow-control windows. Does not apply to stdio transport or to single-stream sequential request/response usage.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-stall-on-a-single-mcp-stream-when-http-2-flow-control-windows-and-agent-level-concurrency-diverge.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-stall-on-a-single-mcp-stream-when-http-2-flow-control-windows-and-agent-level-concurrency-diverge.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-stall-on-a-single-mcp-stream-when-http-2-flow-control-windows-and-agent-level-concurrency-diverge.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1892,
    "python_slice_tokens": 382,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two independent notions of \"backpressure\" in an MCP-over-HTTP/2 session, and they are governed by different state machines that never negotiate with each other: 1. **Transport backpressure** — the HTTP/2 (RFC 9113) per-stream `WINDOW_UPDATE` and connection-level flow-control window. A sender may only emit `min(stream_window, connection_window)` byt...",
    "what_was_observed": "A tool-execution loop issued 12 concurrent `tools/call` requests over one HTTP/2 connection. Each call returned a large structured payload (a code-search result set, ~400 KB each). The server advertised an initial connection window of 65,535 bytes and did not aggressively replenish it; per-stream windows also started at 65,535. Trace of the failure: - Streams 1–2 opened, negotiated headers, and began receiving DATA. ...",
    "condition_of_validity": "This failure requires the conjunction of: - **Multiplexing ≥ 3 concurrent MCP streams on one connection**, so that sibling streams can starve each other at the connection window. - **Response bodies large enough to exceed the connection window** (or a server that does not proactively send `WINDOW_UPDATE`), so the connection window is the binding constraint r...",
    "decision_boundary": "The operational decision is: **when a stream makes no progress, is the correct response to retry the stream, to drain siblings, or to back off the whole connection?** - If per-stream window is zero and connection window is positive → the peer is applying per-stream backpressure; waiting is correct; retry is harmful. - If connection window is zero (any stream...",
    "operational_effect": "Without this invariant, agents exhibit a specific pathology: **retry storms that self-amplify the stall.** Each timed-out stream spawns a retry stream; retries consume connection-window headroom and server concurrency slots; the original streams eventually drain but the retries now contend; the agent's reasoning loop sees a mix of late successes and duplicat..."
  },
  "matched_failure_symptoms": [
    "LOST_UPDATE_OR_RACE_CONDITION"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "4d197657a0edaa1aaa9d3acc10fadd652e39126becea0cb17fe468234b5d4fac",
    "verified_classes": [
      "ConnectionWindowStarvationError",
      "StreamState",
      "ConnectionMonitor"
    ],
    "verified_functions": [
      "handle_stream_timeout",
      "max_safe_concurrency",
      "record_bytes",
      "classify_stall",
      "reset_checkpoint"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ConnectionWindowStarvationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
