{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-the-resumption-gap-in-mcp-http-native-transport-when-server-initiated-sse-reconnection-silently-loses-in-flight-events",
  "title": "How does an instance detect the \"resumption gap\" in MCP HTTP-native transport when server-initiated SSE reconnection silently loses in-flight events",
  "date_of_record": "2026 November 15",
  "scope": "Applies to MCP servers exposing the HTTP-native (streamable HTTP) transport with SSE streaming, where clients resume a session via `Last-Event-ID` after a reconnect. Does not apply to stdio transport, nor to non-resumable one-shot SSE responses lacking a session identifier, nor to deployments that replay from a durable event log keyed by monotonic sequence.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-the-resumption-gap-in-mcp-http-native-transport-when-server-initiated-sse-reconnection-silently-loses-in-flight-events.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-the-resumption-gap-in-mcp-http-native-transport-when-server-initiated-sse-reconnection-silently-loses-in-flight-events.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-the-resumption-gap-in-mcp-http-native-transport-when-server-initiated-sse-reconnection-silently-loses-in-flight-events.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1549,
    "python_slice_tokens": 286,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **transport-level reconnection success** and **session-level continuity**. A reconnecting client can receive a `200 OK`, a valid `Content-Type: text/event-stream`, and even a fresh `event:`/`data:` frame — and still have silently lost one or more server-initiated JSON-RPC messages that were emitted during the disconnec...",
    "what_was_observed": "In a deployment where the MCP server emitted server-initiated notifications and requests (e.g., `notifications/tools/list_changed`, `sampling/createMessage`) over a per-session SSE channel: 1. The client's connection dropped (LB idle timeout at 60s, no keepalive from server). 2. During the ~4s outage, the server emitted three events with `id:` values `1021`, `1022`, `1023`. 3. The client reconnected with `Last-Event-...",
    "condition_of_validity": "This analysis holds when and only when all of the following are true: - The transport is MCP HTTP-native with a resumable SSE stream and a session identifier. - The server assigns SSE `id:` fields but does **not** durably buffer unacknowledged events for replay (the spec's resumption language is permissive; buffering is optional). - Events can be emitted dur...",
    "decision_boundary": "The decision boundary is: **treat `Last-Event-ID` resumption as a transport hint, never as a continuity guarantee.** - If the server guarantees replay of all events since the last acknowledged id (durable buffer, no eviction within session TTL), a client may trust resume for continuity. - If the server cannot make that guarantee — which is the default for st...",
    "operational_effect": "Operationally, this manifests as **silent request orphaning** and **stale-state drift**. Server-initiated `sampling/createMessage` and `elicitation/create` requests emitted during the gap are never delivered; the server's request times out with no client-visible error. Notifications such as `tools/list_changed` are lost, so the client's tool cache diverges u..."
  },
  "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": "24a6535ccd980758b576b4d564d92a986e9475be17420fcb6ba9892fcfaeb91a",
    "verified_classes": [
      "ResumptionGapError",
      "ResumeState"
    ],
    "verified_functions": [
      "detect_resumption_gap",
      "on_reconnect"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ResumptionGapError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
