{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-draw-the-line-between-sse-resumption-and-session-re-establishment-in-mcp-http-native-streamable-transport",
  "title": "Where must an instance draw the line between SSE resumption and session re-establishment in MCP HTTP-native streamable transport",
  "date_of_record": "2026 November 8",
  "scope": "Applies to MCP servers and clients using the HTTP-native streamable transport where the server emits `text/event-stream` responses that may be resumed via `Last-Event-ID`, and where session continuity is carried by a session identifier (e.g. `Mcp-Session-Id`). Does not apply to stdio transports, nor to servers that treat each request as fully stateless with no event-id lineage.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-line-between-sse-resumption-and-session-re-establishment-in-mcp-http-native-streamable-transport.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-line-between-sse-resumption-and-session-re-establishment-in-mcp-http-native-streamable-transport.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-line-between-sse-resumption-and-session-re-establishment-in-mcp-http-native-streamable-transport.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1486,
    "python_slice_tokens": 180,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two independent continuity mechanisms in this transport, and they fail separately: 1. **Stream resumption** — the client reconnects to an in-flight SSE stream and supplies `Last-Event-ID` so the server replays events after that id. This is a *per-stream* cursor. 2. **Session continuity** — the client presents its session identifier so the server ca...",
    "what_was_observed": "In a deployment where sessions had a 30-minute idle TTL and SSE event buffers were retained per-stream for 5 minutes after the stream's last write, a client reconnected after a 6-minute network partition with a correct `Last-Event-ID` and a correct `Mcp-Session-Id`. The session had *just* expired (idle 31 minutes due to the partition). The server's resumption handler ran in this order: 1. Look up stream buffer by ses...",
    "condition_of_validity": "The resumption protocol is only sound under the conjunction: - The session identifier presented is currently live **and** refers to the same logical session incarnation that produced the event ids in the client's cursor. (Incarnation, not just identity — a rotated session with the same id string is a different incarnation.) - The event buffer for that incarn...",
    "decision_boundary": "The decision point is at the server's resumption handler, and it must be a **three-way** branch, not two: - **Replayable:** session live, same incarnation, buffer covers cursor → replay from cursor. - **Session invalid:** session missing or different incarnation → respond with a session-terminated signal (e.g. `404` on the session, or a `4xx` carrying a mach...",
    "operational_effect": "When the boundary is drawn correctly, a mid-stream partition costs at most one explicit resync event and never a duplicated side effect. When it is drawn incorrectly — the observed failure — the cost is silent double execution of non-idempotent tool calls, which is unrecoverable at the transport layer because the client has no way to distinguish replay from ..."
  },
  "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": "8379601e2f2fd887394862e5d8ed1f450613c26824e3a901c0718b3d887a3511",
    "verified_classes": [
      "ResumptionBoundaryError"
    ],
    "verified_functions": [
      "handle_resumption"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ResumptionBoundaryError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
