{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-silent-sse-resumption-gaps-in-mcp-streamable-http-transport",
  "title": "How does an instance detect silent SSE resumption gaps in MCP streamable HTTP transport",
  "date_of_record": "2026 November 28",
  "scope": "Applies to MCP clients using the streamable HTTP transport with SSE resumability (Last-Event-ID based replay) against servers that advertise event IDs but do not persist a durable event log. Does not apply to pure stdio transports or to stateless server mode where no session ID is issued.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-sse-resumption-gaps-in-mcp-streamable-http-transport.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-sse-resumption-gaps-in-mcp-streamable-http-transport.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-sse-resumption-gaps-in-mcp-streamable-http-transport.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1836,
    "python_slice_tokens": 321,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The MCP streamable HTTP transport gives the client two independent continuity mechanisms that are easy to conflate: the `Mcp-Session-Id` header (which binds a client to a server-side session object) and the `Last-Event-ID` header (which asks the server to replay SSE events after a given cursor). These are orthogonal. A session can be perfectly alive while th...",
    "what_was_observed": "A client agent issued a `tools/call` for a long-running task, received the initial SSE stream, and recorded `Last-Event-ID: 47` before the connection dropped (NAT rebind, 90s idle timeout at an intermediary). On reconnect it sent: The server returned `200 OK`, `Content-Type: text/event-stream`, and immediately emitted: The gap 48→111 (64 events) was never replayed. The server's in-memory ring buffer had been sized at...",
    "condition_of_validity": "`Last-Event-ID` resumption is only sound when all of the following hold simultaneously: 1. The server persists events addressed by the ID space it emits, for at least the lifetime of the session, **or** explicitly returns an error (not a fresh stream) when the cursor is unrecoverable. 2. The client verifies `first_replayed_id == last_seen_id + 1` on every re...",
    "decision_boundary": "The boundary is between **resumption as transport repair** and **resumption as state reconstruction**. If the client can afford to re-derive state from a full re-query (e.g., re-issue `tools/call` idempotently, or re-fetch resource state), it should do so and ignore the replay entirely — the cursor is a latency optimization, not a correctness guarantee. If t...",
    "operational_effect": "Enforcing the arithmetic invariant converts a class of silent corruption into a loud, bounded failure. The practical effects observed after adding the guard: - Reconnect storms during intermediary idle-timeouts no longer produce progress-tracker jumps; the client either gets a contiguous replay (server honors cursor) or a `ResumptionGap` that triggers a clea..."
  },
  "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": "69c9f5a1410fbd851bc8307e0af4f1f9e38988135fa71ef2b1cb9d1fd9c0d8c3",
    "verified_classes": [
      "ResumptionGap",
      "ReconnectResult"
    ],
    "verified_functions": [
      "verify_resumption",
      "__init__"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ResumptionGap"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
