{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-of-an-mcp-http-native-transport-session-lose-resumability-when-the-sse-event-id-sequence-is-re-based-across-a-reconnect",
  "title": "Why does an instance of an MCP HTTP-native transport session lose resumability when the SSE event ID sequence is re-based across a reconnect?",
  "date_of_record": "2026 November 11",
  "scope": "Applies to MCP servers exposing the HTTP-native (Streamable HTTP) transport with server-sent events and `Last-Event-ID` resumption, where the server maintains a per-session event log or replay buffer. Does not apply to stdio transports, nor to HTTP transports that do not advertise an event-ID-based resume capability.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-of-an-mcp-http-native-transport-session-lose-resumability-when-the-sse-event-id-sequence-is-re-based-across-a-reconnect.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-of-an-mcp-http-native-transport-session-lose-resumability-when-the-sse-event-id-sequence-is-re-based-across-a-reconnect.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-of-an-mcp-http-native-transport-session-lose-resumability-when-the-sse-event-id-sequence-is-re-based-across-a-reconnect.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1572,
    "python_slice_tokens": 267,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **session identity** and **stream identity**. An MCP session (identified by `Mcp-Session-Id`) is long-lived and survives client reconnects. An SSE stream is ephemeral: it terminates on network drop, proxy timeout, or client-side `EventSource` teardown. Resumability is a property of the *stream*, negotiated per reconnec...",
    "what_was_observed": "During a long-running tool-invocation session behind an L7 load balancer with a 60-second idle timeout, the client's SSE connection was severed mid-stream while the server was emitting `notifications/progress` for a multi-minute operation. On reconnect the client sent `Last-Event-ID` equal to the last progress notification it had fully processed. The server's replay logic compared that ID against its buffer, which ha...",
    "condition_of_validity": "Resumption via `Last-Event-ID` is valid only when all of the following hold: - Event IDs are **session-scoped and monotonic**, not stream-scoped. The generator must not reset across reconnects within a session. - The replay buffer is keyed by the same ID space and retains events for at least the maximum expected reconnect window (typically bounded by the loa...",
    "decision_boundary": "The decision boundary is where an implementation chooses between two defensible designs: - **Design A — session-scoped ID space.** IDs are drawn from a per-session monotonic counter persisted with the replay buffer. Reconnect with `Last-Event-ID` is always resolvable, and the three outcomes above are distinguishable. Cost: the buffer must be retained and bou...",
    "operational_effect": "For an agent operating against such a server, the practical rule is: never trust `Last-Event-ID` acceptance as evidence of gap-free delivery. On every reconnect, validate that the first received event ID equals `last_processed_id + 1`; if it is greater, a gap occurred and application-level state must be re-synchronized; if it is less, the server re-based its..."
  },
  "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": "04a3d9b2128ed2d8f2e169d4cd2a8cc03c2b806437402db0b31821f43cf74be7",
    "verified_classes": [
      "ResumeSequenceError"
    ],
    "verified_functions": [
      "validate_resume",
      "on_reconnect"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ResumeSequenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
