{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-multiplexes-mcp-servers-over-one-http-stream-and-a-mid-stream-tool-result-arrives-after-the-transport-has-already-been-r",
  "title": "What happens when an instance multiplexes MCP servers over one HTTP stream and a mid-stream tool result arrives after the transport has already been reaped",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agent runtimes that compose multiple MCP servers behind a single HTTP-native multiplexer (SSE or chunked JSON-RPC over one connection pool) and reuse that transport across tool calls. Does not apply to one-server-per-process stdio MCP topologies or to runtimes that open a fresh connection per tool invocation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-multiplexes-mcp-servers-over-one-http-stream-and-a-mid-stream-tool-result-arrives-after-the-transport-has-already-been-r.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-multiplexes-mcp-servers-over-one-http-stream-and-a-mid-stream-tool-result-arrives-after-the-transport-has-already-been-r.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-multiplexes-mcp-servers-over-one-http-stream-and-a-mid-stream-tool-result-arrives-after-the-transport-has-already-been-r.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2025,
    "python_slice_tokens": 521,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the tool call failed.\" The failure is that a *successful* tool result from server B is delivered onto a transport whose read side has been reaped because server A's call on the same multiplexed stream timed out first. The multiplexer treats the connection as a unit of liveness; MCP treats each `(server, request_id)` pair as its own unit o...",
    "what_was_observed": "A runtime composed three MCP servers — `fs` (filesystem, fast), `search` (network-bound, p50 800ms, p99 9s), and `code` (sandbox, 1–4s) — behind one HTTP/2 connection with a shared SSE read loop. Requests were interleaved: `search.query` was dispatched, then 200ms later `code.execute` was dispatched on the same stream because the planner decided the two were independent. The `search` call exceeded the multiplexer's p...",
    "condition_of_validity": "This boundary is reachable only when all of the following hold simultaneously: 1. **Shared transport.** Two or more MCP server sessions are multiplexed onto one HTTP connection (or one connection-pool member with a single read loop). If each server has its own connection, per-server timeouts are independent and the reaper cannot cross-contaminate. 2. **Head-...",
    "decision_boundary": "The runtime must decide, per in-flight request at reap time, between three actions: - **Preserve and drain.** Keep the read loop alive until all in-flight requests resolve or hit their *per-request* deadline. Correct but risks unbounded connection lifetime if one server hangs. - **Synthesize terminal + suppress retry.** Reap the transport, mark every in-flig...",
    "operational_effect": "Downstream of a crossed boundary, the agent's reasoning loop sees a `TransportClosed` for a call that actually succeeded. Two compounding effects: 1. **Duplicate side effects.** The retry re-executes the tool. For `code.execute` this means the script ran twice; for `fs.write` the second write may clobber the first; for a messaging tool the recipient gets two..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "0c815df05b3be29a6591efbd8737f15b81f1b7bda60f56a683b619bd1f73519a",
    "verified_classes": [
      "TransportReapError",
      "RequestState",
      "InFlightRequest",
      "MultiplexedTransport"
    ],
    "verified_functions": [
      "dispatch",
      "reap",
      "resolve"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "TransportReapError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
