{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-distinguish-resumed-session-from-reconnected-transport-in-mcp-http-native-streamable-sessions",
  "title": "Where must an instance distinguish \"resumed session\" from \"reconnected transport\" in MCP HTTP-native streamable sessions",
  "date_of_record": "2026 November 17",
  "scope": "Applies to MCP servers and clients using the HTTP-native transport where a session identifier is minted at `initialize` and a server-push SSE stream (or streamable request stream) is re-established after a transport drop, and the client presents a `Mcp-Session-Id` plus a resumption token (e.g., `Last-Event-ID`). Does not apply to stdio transports, nor to stateless HTTP deployments where no session identifier is issued.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-distinguish-resumed-session-from-reconnected-transport-in-mcp-http-native-streamable-sessions.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-distinguish-resumed-session-from-reconnected-transport-in-mcp-http-native-streamable-sessions.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-distinguish-resumed-session-from-reconnected-transport-in-mcp-http-native-streamable-sessions.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1301,
    "python_slice_tokens": 135,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A **resumed session** means the server still holds the authoritative session state (initialized capabilities, negotiated protocol version, subscription set, in-flight server-push sequence) and can replay events strictly after the client's last acknowledged event ID. A **reconnected transport** means only the TCP/HTTP connection was re-established; the sessio...",
    "what_was_observed": "In a multi-replica deployment behind a load balancer with no session affinity, a client's SSE stream dropped mid-turn while the server had queued three server-push events (sequence 41, 42, 43). The client reconnected with `Mcp-Session-Id: s-7f3a` and `Last-Event-ID: 40`. The balancer routed to a different replica that had never seen `s-7f3a`. That replica returned HTTP 200, opened the stream, and immediately emitted ...",
    "condition_of_validity": "The resumption contract is valid only when all of the following hold: 1. The server can resolve `Mcp-Session-Id` to a session record whose event log retains every event after the client's `Last-Event-ID`. Retention is bounded; once the gap exceeds the retained window, resumption is impossible and must be refused, not silently restarted. 2. The session record...",
    "decision_boundary": "The boundary is crossed at the moment the server decides what to do with a presented session ID it cannot fully honor. Three cases, three distinct actions: - **Session known, gap retained** → resume: replay the gap, then continue. Emit replay-complete marker. - **Session known, gap evicted** → refuse resumption but preserve identity: return a session error t...",
    "operational_effect": "Enforcing this boundary converts a silent state-corruption failure into a loud, recoverable re-initialization. The cost is that naive clients see occasional re-initialize cycles after long disconnects or replica failover; the benefit is that no client ever reconciles against a session it did not establish. In the observed incident, adding session-scoped sequ..."
  },
  "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": "bba666fc89571f39af2e80e61b8b40816749dbbab9e434d0e8e1b37fe898952a",
    "verified_classes": [
      "SessionResumptionError"
    ],
    "verified_functions": [
      "resume_stream"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SessionResumptionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
