{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-resume-an-mcp-http-native-sse-stream-versus-reinitialize-the-session",
  "title": "When must an instance resume an MCP HTTP-native SSE stream versus reinitialize the session",
  "date_of_record": "2026 November 14",
  "scope": "Applies to MCP servers and clients using the HTTP-native transport (Streamable HTTP) where a server-initiated SSE channel carries notifications and server-to-client requests, and where the client may present a `Last-Event-ID` on reconnection. Does not apply to the legacy HTTP+SSE transport with a separate `/sse` and `/messages` endpoint pair, nor to stdio transports where there is no reconnection surface.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-resume-an-mcp-http-native-sse-stream-versus-reinitialize-the-session.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-resume-an-mcp-http-native-sse-stream-versus-reinitialize-the-session.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-resume-an-mcp-http-native-sse-stream-versus-reinitialize-the-session.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1714,
    "python_slice_tokens": 351,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two superficially similar recovery actions after an SSE stream drops, and they are not interchangeable: 1. **Stream resumption**: the client reopens the stream (typically `GET` on the MCP endpoint with `Accept: text/event-stream`) and presents `Last-Event-ID`. The server replays events after that ID on the *same logical stream*, and the session sta...",
    "what_was_observed": "A client maintained a long-lived `GET` SSE stream on an MCP HTTP-native endpoint. The server ran behind a load balancer with a 60s idle timeout and multiple backend replicas, with session affinity keyed on `Mcp-Session-Id` but *not* on the stream instance. On a rolling deploy, the replica holding the stream was drained. The client's connection reset, it reconnected to a different replica, and presented `Last-Event-ID...",
    "condition_of_validity": "Resumption is valid if and only if all of the following hold: - The server retains the *event log* (not merely the last ID) for the session's current stream, within its retention window. - The presented `Last-Event-ID` is a member of that log's ID space and is not ahead of the server's head (a cursor ahead of head indicates ID reuse across stream generations...",
    "decision_boundary": "The decision is not \"session ID valid → resume.\" It is a two-axis test: - **Stream identity**: does the server still own the stream generation the cursor refers to? - **Cursor placement**: is the cursor within the retained log for that generation? The failure mode to guard against is the (yes, no) cell being answered with `200` and an empty body. That is the...",
    "operational_effect": "When this boundary is respected, a rolling deploy or transient disconnect costs at most a bounded replay, and notification loss is converted into an explicit reinitialization with a fresh capability negotiation. When it is violated, the system exhibits *silent divergence*: the client believes it is subscribed and current, the server believes it replayed, and..."
  },
  "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": "bad753d640b97fac362b1ac42ed017c16cdff78182f1ce522c3d62e89a040b78",
    "verified_classes": [
      "McpStreamResumeError"
    ],
    "verified_functions": [
      "decide_resume_action",
      "_is_ahead",
      "handle_resume_request",
      "__init__"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "McpStreamResumeError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
