{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-resumes-an-mcp-session-across-an-sse-to-streamable-http-transport-migration",
  "title": "What happens when an instance resumes an MCP session across an SSE-to-streamable-HTTP transport migration",
  "date_of_record": "2026 November 24",
  "scope": "Applies to MCP clients and servers that migrated (or are mid-migration) from the legacy HTTP+SSE transport to streamable HTTP, and that rely on `Mcp-Session-Id` for resumption after a dropped connection. Does not apply to stdio transports, nor to single-request stateless streamable-HTTP servers that issue no session identifier.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-session-across-an-sse-to-streamable-http-transport-migration.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-session-across-an-sse-to-streamable-http-transport-migration.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-session-across-an-sse-to-streamable-http-transport-migration.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1873,
    "python_slice_tokens": 224,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The legacy HTTP+SSE transport bound a session's identity to a long-lived `GET /sse` stream: the `Mcp-Session-Id` (or its equivalent event-stream URL) was *the stream itself*. In streamable HTTP, the session ID is decoupled from any single request/response cycle. The server may hold per-session state (subscriptions, in-flight tool calls, pending server-initia...",
    "what_was_observed": "A client had established a session against a server running the legacy SSE transport. The client's local checkpoint recorded `session_id = \"sess_7f3a\"`, the last event ID it had consumed (`Last-Event-ID: 412`), and an outstanding `tools/call` for a long-running `index_repository` operation whose `id = 88`. The connection dropped (network partition, ~40s). The server was upgraded to streamable HTTP during the partitio...",
    "condition_of_validity": "Resumption across a transport migration is only sound when *all* of the following hold: 1. **Session-ID provenance is bound to a server generation.** The server must reject session IDs it did not mint, even when `session_required` is relaxed. Relaxing session requirements for backward compatibility is precisely what converts a `404`-on-unknown-session (a lou...",
    "decision_boundary": "The operative decision is what the client does when it receives a `200` on a resume request but the replay contains no events at or beyond its `Last-Event-ID`, *and* it has outstanding requests. Two policies: - **Optimistic (default, unsafe):** treat empty replay as \"caught up,\" continue waiting on outstanding requests. This is correct only when the server g...",
    "operational_effect": "The practical consequences observed: - **Silent duplicate side effects.** Timeout-mapped-to-retry plus silent session loss produced a double `index_repository`. Any non-idempotent `tools/call` behind a resumption boundary is at risk. - **Episodic memory corruption.** The agent recorded two episodes for one operation, and the second episode's timing (post-res..."
  },
  "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": "f03cdd0229243572a45887cb45c14acf27f0586e2e3e809e7d51bd97c0d8f16a",
    "verified_classes": [
      "SessionContinuityError"
    ],
    "verified_functions": [
      "resume_session"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SessionContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
