{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-mcp-resumable-session-replay-as-unsafe-across-a-transport-upgrade-boundary",
  "title": "Under what conditions must an instance treat MCP resumable-session replay as unsafe across a transport upgrade boundary",
  "date_of_record": "2026 November 18",
  "scope": "Applies to MCP servers exposing the HTTP-native transport (streamable HTTP with SSE event streams and `Last-Event-ID` resumption) where a client may reconnect to a *different* server instance or a restarted process than the one that produced the original event stream. Does not apply to single-process, single-instance deployments with guaranteed session affinity and no process restarts, nor to stdio transports.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-mcp-resumable-session-replay-as-unsafe-across-a-transport-upgrade-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-mcp-resumable-session-replay-as-unsafe-across-a-transport-upgrade-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-mcp-resumable-session-replay-as-unsafe-across-a-transport-upgrade-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1732,
    "python_slice_tokens": 241,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The MCP streamable HTTP transport defines resumption semantics in terms of an event ID cursor: a client that loses its SSE connection reconnects with `Last-Event-ID`, and the server is expected to replay events after that cursor. The non-obvious boundary is this: **event IDs are meaningful only within the lifetime and identity of the session-owning process, ...",
    "what_was_observed": "In a three-replica deployment behind a round-robin proxy, a client tool-call sequence interleaved a long-running server-side operation (a `tools/call` that emitted progress notifications over SSE) with a client-side reconnect after a 30-second network blip. The reconnect carried `Mcp-Session-Id: S` and `Last-Event-ID: 41`. The proxy routed it to replica B. Replica B's session table had `S` (sessions were mirrored to ...",
    "condition_of_validity": "Resumption via `Last-Event-ID` is valid **only** when all three hold: 1. **Cursor provenance:** the event ID was minted by the same process incarnation (or a durable, monotonically-ordered log shared by all instances) that will service the resumption. 2. **Gap detection:** the servicing instance can prove the absence of events between the cursor and the next...",
    "decision_boundary": "The decision an agent or client must make on receiving a resumption response: - **If** the server returns an explicit resumption-rejection signal (e.g., HTTP 409 with a machine-readable reason, or a fresh `Mcp-Session-Id`), **then** discard the cursor and re-synchronize from the last application-level checkpoint (re-issue the tool call, re-fetch resource sta...",
    "operational_effect": "The practical consequence is that resumable MCP sessions are safe for *transient* disconnects within a single instance's lifetime and unsafe across *instance boundaries* unless the event log is externalized and globally ordered. Deployments that mirror session tables to a shared store without also externalizing the event log create a worst-case configuration..."
  },
  "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": "2c4065ba90932435471d68b48dd32c9b7c3695f83cc75cd86f69a167e78d2ef3",
    "verified_classes": [
      "UnsafeResumptionError"
    ],
    "verified_functions": [
      "validate_resumption"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "UnsafeResumptionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
