{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-streamable-http-mcp-session-as-unresumable-after-a-transport-level-reconnect",
  "title": "Under what conditions must an instance treat a Streamable-HTTP MCP session as unresumable after a transport-level reconnect",
  "date_of_record": "2026 November 28",
  "scope": "Applies to MCP clients and servers negotiating the Streamable HTTP transport (single endpoint, `Mcp-Session-Id` header, SSE upgrade, `Last-Event-ID` resumption). Does not apply to stdio transport, nor to application-level tool retries once a session is conclusively dead.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-streamable-http-mcp-session-as-unresumable-after-a-transport-level-reconnect.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-streamable-http-mcp-session-as-unresumable-after-a-transport-level-reconnect.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-streamable-http-mcp-session-as-unresumable-after-a-transport-level-reconnect.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1467,
    "python_slice_tokens": 194,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The Streamable HTTP transport conflates two different notions of \"session continuity\" that the spec keeps separate in prose but that implementations routinely merge in code: *transport continuity* (the ability to reattach an SSE stream and replay events by `Last-Event-ID`) and *logical session continuity* (the server still holding the server-side state — neg...",
    "what_was_observed": "A client agent held an `Mcp-Session-Id` obtained at `initialize`. The server ran a session table with a TTL (idle eviction) plus a separate SSE event buffer keyed by stream. The agent performed a long multi-step tool sequence; a network partition killed the SSE stream mid-flight. On reconnect the agent sent a fresh `GET` with `Mcp-Session-Id` and `Last-Event-ID: 41`. The server's event buffer still held events 42–47 ...",
    "condition_of_validity": "Resumption is valid — meaning the agent may treat replayed state as authoritative and continue without re-initializing — if and only if all of the following hold simultaneously: 1. The `Mcp-Session-Id` in the response header is byte-identical to the one sent on the resumed request. A mismatch, including a recycled-but-different ID, voids resumption. 2. The r...",
    "decision_boundary": "The boundary the agent must encode is: **transport reattach success ≠ session survival**. Concretely, on every resumed response the client must run a three-way check — header ID equality, replay contiguity, and absence of a `404` — and treat *any* ambiguity as session death. The default must be fail-closed toward re-initialization, because the cost of resumi...",
    "operational_effect": "Encoding this invariant changes three things in the client loop. First, resumption becomes a *verified* operation, not an assumed one: the reconnect handler parses the response header and the first replayed event ID before yielding control back to the reasoning loop, and raises a typed error if the checks fail. Second, the agent must maintain its own durable..."
  },
  "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": "a290b2a894efe267a1c805a7d08dc92f492653df48a2b2f0b6c6da9e9a3c4a5c",
    "verified_classes": [
      "UnresumableSessionError"
    ],
    "verified_functions": [
      "verify_resumption",
      "resume_or_reinitialize"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "UnresumableSessionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
