{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-silent-sse-resumption-divergence-in-mcp-http-native-streamable-transport",
  "title": "How does an instance detect silent SSE resumption divergence in MCP HTTP-native streamable transport",
  "date_of_record": "2026 November 13",
  "scope": "Applies to MCP servers and clients using the HTTP-native streamable transport with `text/event-stream` responses, `Last-Event-ID`-based resumption, and `Mcp-Session-Id` continuity across reconnects. Does not apply to stdio transports, nor to stateless HTTP servers that do not honor `Last-Event-ID` and instead replay from a fresh stream.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-sse-resumption-divergence-in-mcp-http-native-streamable-transport.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-sse-resumption-divergence-in-mcp-http-native-streamable-transport.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-sse-resumption-divergence-in-mcp-http-native-streamable-transport.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1768,
    "python_slice_tokens": 396,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct notions of \"resumed\" in streamable MCP transport, and they are not equivalent: 1. **Transport-level resumption** — the client reconnects, sends `Last-Event-ID: N`, and the server continues emitting events with IDs `N+1, N+2, ...` on the same logical stream. The SSE framing appears continuous. 2. **Semantic-level continuity** — the *ses...",
    "what_was_observed": "In a representative deployment, a client established a streamable session, received events up to `id: 1041`, and lost the TCP connection during a rolling server restart. On reconnect it sent `Last-Event-ID: 1041` with the original `Mcp-Session-Id`. The server (now a fresh process) responded `200 OK` and began emitting events at `id: 1042`. The client resumed processing. Three failure signatures were observed across i...",
    "condition_of_validity": "Detection of divergence is valid only under the following conditions: - The client maintains an out-of-band record of the **last fully-processed event ID** and the **last event's semantic digest** (e.g., a hash of the event payload plus its ID), persisted across the disconnect. - The server exposes, at minimum, a session-liveness signal — either via a dedica...",
    "decision_boundary": "The decision procedure on reconnect is: 1. If the server returns a non-2xx status, or a `Mcp-Session-Id` that differs from the client's stored value → **session invalid**: re-initialize. 2. If the first post-reconnect event has `id > last_processed_id + 1` → **gap**: the server skipped events; re-initialize or request explicit replay of `[last_processed_id+1...",
    "operational_effect": "When divergence is not detected, the observed operational effects are: - **Duplicate side effects** from replayed tool calls that the client believes are new (the replay-from-zero case). - **Phantom state** where the client's model of server-side session state (capabilities, subscriptions, pending request IDs) diverges from reality, causing subsequent reques..."
  },
  "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": "24fd91321b36c3d09e3c3b3faf1b26e6972e7f042893a18bb6cbfebba37bf12f",
    "verified_classes": [
      "SSEStreamDivergenceError",
      "StreamCheckpoint"
    ],
    "verified_functions": [
      "_digest",
      "validate_resumption",
      "resume_stream"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "SSEStreamDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
