{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-an-mcp-session-id-as-non-resumable-after-sse-to-streamable-http-migration",
  "title": "When must an instance treat an MCP session ID as non-resumable after SSE-to-streamable-HTTP migration",
  "date_of_record": "2026 November 28",
  "scope": "Applies to MCP servers and clients that expose tools over HTTP using the legacy HTTP+SSE transport (`GET /sse` + `POST /messages`) and are migrating to the Streamable HTTP transport (`POST /mcp` with `Mcp-Session-Id`), specifically when a client attempts to resume an in-flight tool call across the transport boundary or across a server restart. Does not apply to stdio transports or to purely stateless single-shot tool invocations with no resumption attempt.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-mcp-session-id-as-non-resumable-after-sse-to-streamable-http-migration.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-mcp-session-id-as-non-resumable-after-sse-to-streamable-http-migration.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-mcp-session-id-as-non-resumable-after-sse-to-streamable-http-migration.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1966,
    "python_slice_tokens": 426,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the session was lost.\" The failure is that the **session identifier survived the migration while the resumption contract attached to it did not.** Under HTTP+SSE, resumption semantics were implicit in the transport: the `GET /sse` stream carried a monotonically increasing `id:` field per event, and a client reconnecting with `Last-Event-I...",
    "what_was_observed": "A tool-call agent issued a long-running `POST /messages` against an SSE server, receiving a partial SSE stream. The server was upgraded mid-stream to Streamable HTTP. The client, on reconnect, sent the new `Mcp-Session-Id` (obtained from a fresh `initialize`) into a `POST /mcp` with the `initialize`-negotiated protocol version, and re-issued the same tool-call JSON-RPC request ID. Three distinct outcomes were observe...",
    "condition_of_validity": "The resumption attempt is only well-defined when **all** of the following hold: - The client can name the exact request it is resuming by a key the server is guaranteed to honor across the transport change. In practice this means the server must persist the JSON-RPC `id` → response mapping in a store that is shared between the SSE handler and the Streamable ...",
    "decision_boundary": "The operational decision is a single branch, evaluated *before* the retry is sent: - **Resume** only if the client holds a server-issued resumption token (a request ledger entry, a `Last-Request-Id`, or an application-level idempotency key) that the server confirms it will honor. Confirmation must be explicit — a `HEAD`/`GET` on the session that returns the ...",
    "operational_effect": "Agents that skip this branch exhibit three recurring pathologies: duplicated side effects after migration (outcome 1), truncated-but-valid results that poison downstream reasoning because the missing field is only detected several tool calls later (outcome 2), and over-aggressive checkpoint discard on `404` that forces the entire task to restart from cold st..."
  },
  "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": "5e729939d1aa94becdaafa33bf7625812d10c52ddd13045da7b6d67b6abc4ce4",
    "verified_classes": [
      "NonResumableSessionError",
      "TransportGeneration",
      "SessionHandle",
      "InFlightRequest"
    ],
    "verified_functions": [
      "assert_resumable",
      "plan_recovery",
      "fingerprint"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "NonResumableSessionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
