{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-silent-sse-resumption-gap-when-an-mcp-streamable-http-session-reconnects-across-a-load-balanced-edge",
  "title": "How does an instance detect a silent SSE resumption gap when an MCP streamable-HTTP session reconnects across a load-balanced edge",
  "date_of_record": "2026 December 1",
  "scope": "Applies to MCP servers and clients using the streamable-HTTP transport with `Last-Event-ID`-based SSE resumption, where the client may reconnect to a different backend instance behind a load balancer. Does not apply to stdio transport, to stateless one-shot JSON-RPC POSTs, or to deployments with sticky client affinity guaranteed at the network layer.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-silent-sse-resumption-gap-when-an-mcp-streamable-http-session-reconnects-across-a-load-balanced-edge.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-silent-sse-resumption-gap-when-an-mcp-streamable-http-session-reconnects-across-a-load-balanced-edge.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-silent-sse-resumption-gap-when-an-mcp-streamable-http-session-reconnects-across-a-load-balanced-edge.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1960,
    "python_slice_tokens": 283,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two semantically different notions of \"the stream resumed.\" The transport-level notion is: the HTTP reconnection succeeded, the server accepted the `Last-Event-ID` header, and a `200` SSE stream is flowing again. The protocol-level notion is: the server's event log for *this* session actually contains every event with an ID strictly greater than `L...",
    "what_was_observed": "A tool-calling agent drove a long-running `tools/call` over streamable HTTP. The server emitted progress notifications and streamed the tool result as multiple SSE events with monotonically increasing IDs (`evt-1001` … `evt-1487`). At `evt-1203` the client's TCP connection was reset (idle timeout at an intermediate proxy, 60s). The client reconnected with `Last-Event-ID: evt-1203` to the same DNS name. The load balan...",
    "condition_of_validity": "The invariant that makes resumption safe is: > For a resumption request carrying `Last-Event-ID = L` on session `S`, the server MUST either (a) emit, as the first event on the new stream, an event with ID strictly greater than `L` **and** be able to prove contiguity from `L` (i.e., `L` is in its retained log and no retained event between `L` and the first em...",
    "decision_boundary": "The client-side decision boundary is a single predicate evaluated on every resumption response, before any event is admitted to the session buffer: - **Accept** the resumption iff: response status is `200`; the response echoes the same `Mcp-Session-Id`; the first event ID parses as an integer strictly greater than the sent `Last-Event-ID`; and the ID sequenc...",
    "operational_effect": "The consequence of missing this boundary is not a crash—it is *silent state truncation that the agent's reasoning layer cannot distinguish from success*. Because MCP tool results are opaque payloads, a truncated `tool_result` is still valid JSON and still parses; the agent proceeds on partial data. The blast radius scales with how much of the tool result was..."
  },
  "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": "6c9e7261730adb95ffe0165d11bb07ee3054dede0629b06c0869770b17ed7929",
    "verified_classes": [
      "SilentResumptionGap",
      "ResumptionResponse"
    ],
    "verified_functions": [
      "_parse_id",
      "admit_resumption",
      "resume_stream"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "SilentResumptionGap"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
