{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-mcp-streamable-http-sse-resumption-as-a-session-scoped-contract-rather-than-a-transport-level-replay",
  "title": "In what scenarios must an instance treat MCP Streamable HTTP SSE resumption as a session-scoped contract rather than a transport-level replay",
  "date_of_record": "2026 November 18",
  "scope": "Applies to MCP servers and clients using the Streamable HTTP transport (single endpoint, `POST` for client→server messages, `GET` for the server→client SSE stream, `Last-Event-ID` for resumption) where the server issues resumption tokens and a `Mcp-Session-Id` header. Does not apply to the deprecated HTTP+SSE dual-endpoint transport, nor to stdio transports where session continuity is implicit in the process.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-streamable-http-sse-resumption-as-a-session-scoped-contract-rather-than-a-transport-level-replay.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-streamable-http-sse-resumption-as-a-session-scoped-contract-rather-than-a-transport-level-replay.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-streamable-http-sse-resumption-as-a-session-scoped-contract-rather-than-a-transport-level-replay.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1966,
    "python_slice_tokens": 409,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is this: **the SSE `Last-Event-ID` and the `Mcp-Session-Id` are two independent resumption mechanisms that are frequently conflated, and the server's resumption token is bound to the session, not to the stream.** A client that reconnects its `GET` stream with a valid `Last-Event-ID` but a missing, expired, or rotated `Mcp-Session-Id`...",
    "what_was_observed": "In a deployment where an MCP server fronted a set of long-running tool invocations (each `tools/call` producing a stream of progress notifications followed by a final result event), the following sequence was reproduced: 1. Client opens `POST /mcp` with an `initialize` request. Server responds with an `Mcp-Session-Id: S1` header and a JSON-RPC result. 2. Client opens `GET /mcp` with `Mcp-Session-Id: S1`. Server begin...",
    "condition_of_validity": "The resumption contract is valid — i.e., a client may rely on `Last-Event-ID` to recover missed events — only when **all** of the following hold simultaneously: 1. The reconnect request carries the **same** `Mcp-Session-Id` that was active when the events were emitted. 2. The server still holds the session (it has not expired the session, and the request has...",
    "decision_boundary": "Operationally, the client's decision tree at reconnect time: - **Session ID present and server accepts it, event ID resolvable** → resume the stream. This is the only case where replay is safe. - **Session ID present, server returns `404` (session unknown/expired)** → do *not* retry the stream. Re-`initialize`, obtain a new session, and **reconcile in-flight...",
    "operational_effect": "The practical consequence is that **resumption tokens are a session-scoped optimization, not a delivery guarantee.** Systems that build on the Streamable HTTP transport must carry two independent pieces of durable state across reconnects — the session identity and the last-seen event ID — and must treat the loss of either as a request-level reconciliation ev..."
  },
  "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": "d53b1e01f9d30351e028505a879840dd79559e3cca07c0c3bed01f3fa23a1fdf",
    "verified_classes": [
      "McpResumptionError"
    ],
    "verified_functions": [
      "resume_stream",
      "handle_reconnect"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "McpResumptionError"
    ],
    "sample_fail_closed_invariants": [
      "cannot resume: no Mcp-Session-Id presented; Last-Event-ID is meaningless without its minting session"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
