{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-re-anchor-state-after-mcp-streamable-http-resumption-across-a-session-migration",
  "title": "Where must an instance re-anchor state after MCP Streamable HTTP resumption across a session migration",
  "date_of_record": "2026 November 30",
  "scope": "Applies to MCP servers/clients using the Streamable HTTP transport with `Mcp-Session-Id` headers, SSE event streams, and `Last-Event-ID` resumption — specifically when a session is re-homed to a different server instance (scale-out, rolling deploy, or load-balancer rebalance). Does not apply to stdio transport, nor to single-instance deployments where the stream and session live on the same process for their entire lifetime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-re-anchor-state-after-mcp-streamable-http-resumption-across-a-session-migration.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-anchor-state-after-mcp-streamable-http-resumption-across-a-session-migration.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-anchor-state-after-mcp-streamable-http-resumption-across-a-session-migration.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1865,
    "python_slice_tokens": 380,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The MCP Streamable HTTP spec bundles two independent continuity guarantees that are frequently conflated: **event-stream resumption** (a GET SSE stream can be reattached after a disconnect using `Last-Event-ID`, replaying missed events) and **session continuity** (the `Mcp-Session-Id` identifies a logical conversation whose server-side state — initialized ca...",
    "what_was_observed": "A three-replica MCP deployment fronted by a round-robin LB. Client opens `POST /mcp` with `initialize`, receives `Mcp-Session-Id: s-7f2a`. Server A pins the session and opens an SSE stream; client consumes `id: 41` (a `tools/call` progress event) and goes idle. A rolling deploy drains server A. The client's SSE connection drops with a TCP reset at event `id: 41`. Client reconnects via `GET /mcp` with `Mcp-Session-Id:...",
    "condition_of_validity": "Resumption via `Last-Event-ID` is a valid recovery signal **only if** the following invariant holds: *the event log's high-water mark and the session store's high-water mark are transactionally co-committed, or the session store is itself reconstructable from the event log.* In the deployment above, neither held — the log was a separate Redis stream written ...",
    "decision_boundary": "The server must decide, at the moment of a `GET /mcp` with both `Mcp-Session-Id` and `Last-Event-ID`, between three outcomes — and the choice is governed by a single check, not by whether the stream replays: 1. **Resume** (session store present on this instance, version ≥ replayed ID): replay events, continue. Safe. 2. **Re-establish** (session store absent,...",
    "operational_effect": "Downstream, the hollow-session state produces three concrete agent-layer failures: (a) **orphaned server→client requests** — an elicitation or sampling request issued by A before drain is never re-issued by B, so the client's agent loop waits on a future that will never resolve, and the tool call's side effect is half-applied; (b) **capability drift** — the ..."
  },
  "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": "c68b79e0e3a55aac205827e447984e9521e9b9c6b3436e7350498b1cd79c4822",
    "verified_classes": [
      "HollowSessionResumeError"
    ],
    "verified_functions": [
      "admit_resume",
      "handle_get_resume"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "HollowSessionResumeError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
