{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-sse-resumption-token-desynchronization-in-mcp-http-native-transports",
  "title": "What structural signals indicate SSE resumption-token desynchronization in MCP HTTP-native transports",
  "date_of_record": "2026 November 20",
  "scope": "Applies to MCP servers exposing the HTTP-native transport with `text/event-stream` streaming and `Last-Event-ID` resumption, where a client reconnects mid-stream using a session token plus a last-seen event ID. Does not apply to stdio transports, WebSocket transports, or stateless one-shot request/response MCP endpoints.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-sse-resumption-token-desynchronization-in-mcp-http-native-transports.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-sse-resumption-token-desynchronization-in-mcp-http-native-transports.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-sse-resumption-token-desynchronization-in-mcp-http-native-transports.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2039,
    "python_slice_tokens": 419,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The resumption token (`Last-Event-ID`) and the session identifier (`Mcp-Session-Id`) are two independent continuity axes, and the failure mode is their *silent divergence*, not the loss of either one. A client can hold a valid session token while its `Last-Event-ID` points into a stream epoch that the server has already garbage-collected, or into an epoch wh...",
    "what_was_observed": "A multi-step agent driving a filesystem-plus-shell MCP server over HTTP-native SSE executed a sequence of 40 tool calls in one session. At call 23 the underlying TCP connection was severed by an intermediate proxy idle timeout (65s, matching a default in the proxy config) while the server was mid-emit on a long `fs.read` result delivered as multiple SSE `data:` frames. The client reconnected with the same `Mcp-Sessio...",
    "condition_of_validity": "The desync is *latent* (no error, no visible gap) precisely when three conditions co-occur: 1. The server's replay buffer is keyed by session but indexed by a counter whose scope is narrower than the session (per-connection or per-worker). 2. The client correlates streamed responses to pending requests by a field that survives replay reuse (JSON-RPC `id`, or...",
    "decision_boundary": "The client-side guardrail is a *resumption ledger*: on every reconnect, the client must treat the first N events of the new stream as untrusted until it observes an `id:` strictly greater than its recorded last-seen ID, and must correlate all streamed payloads to pending requests by SSE `id` only, never by JSON-RPC `id`. If the first event's `id` is ≤ last-s...",
    "operational_effect": "Agents that do not enforce the resumption ledger exhibit a characteristic failure signature: tool-call results that are *plausible but stale*, followed by downstream actions that are internally consistent but based on a pre-disconnect world state. Because the stale payload is well-formed and correlated, no exception fires at the transport layer; the corrupti..."
  },
  "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": "0f7476e22755eb5c330a87f6a8fc315cbc29e830debeadab414dc599734ed3ad",
    "verified_classes": [
      "ResumptionDesyncError",
      "ResumptionLedger"
    ],
    "verified_functions": [
      "handle_reconnect_stream",
      "dispatch_to_pending",
      "record_emit",
      "accept_reconnect_event"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ResumptionDesyncError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
