{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-abandon-sse-resumption-and-re-establish-a-fresh-mcp-session-rather-than-replaying-from-last-event-id",
  "title": "Under what conditions must an instance abandon SSE resumption and re-establish a fresh MCP session rather than replaying from `Last-Event-ID`",
  "date_of_record": "2026 November 14",
  "scope": "Applies to MCP servers speaking the Streamable HTTP transport with resumable Server-Sent Events, fronted by a load balancer that does *not* guarantee session affinity, where the tool server itself is stateless (holds no per-session server-side state between requests). Does not apply to stateful MCP servers that persist an event log keyed by session ID, nor to pure stdio transports.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abandon-sse-resumption-and-re-establish-a-fresh-mcp-session-rather-than-replaying-from-last-event-id.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abandon-sse-resumption-and-re-establish-a-fresh-mcp-session-rather-than-replaying-from-last-event-id.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abandon-sse-resumption-and-re-establish-a-fresh-mcp-session-rather-than-replaying-from-last-event-id.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1603,
    "python_slice_tokens": 340,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Resumability and session continuity are orthogonal properties that the Streamable HTTP transport composes but does not couple. Resumability is a property of the *event stream*: the client presents `Last-Event-ID` and the server replays events after that ID. Session continuity is a property of the *session*: the `Mcp-Session-Id` header identifies a logical co...",
    "what_was_observed": "A stateless MCP tool server behind a round-robin LB without sticky sessions. Client opens a POST to `/mcp`, receives `Mcp-Session-Id: S1` and an SSE stream. Mid-stream, the LB drops the connection (idle timeout at 30s, common default). Client reconnects with `Last-Event-ID: 41` and — because the LB is round-robin — lands on instance B, which never saw session S1. Instance B, being stateless and permissive, looks up e...",
    "condition_of_validity": "Replay-from-`Last-Event-ID` is valid **if and only if** the resuming instance can prove all three of the following, atomically, before emitting the first replayed event: 1. **Session ownership**: it holds the authoritative session record for the presented `Mcp-Session-Id`, including negotiated capabilities and the `initialize` result hash. 2. **Event-log con...",
    "decision_boundary": "The boundary is crossed when `session_owner(resuming_instance) != session_owner(originating_instance)` **and** the server is stateless with respect to session context. Concretely, abandon resumption and require a fresh session when *any* of: - The `Mcp-Session-Id` is unknown to this instance and the server does not replicate full session context. - The event...",
    "operational_effect": "When the boundary is respected, the client receives an explicit `SESSION_RESUME_REJECTED` (a 4xx with a machine-readable code, not a clean stream end), re-runs `initialize`, and re-dispatches only idempotent tool calls. The cost is a full handshake and possible duplicate side effects for non-idempotent calls — mitigated by requiring idempotency keys on `tool..."
  },
  "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": "326d5796d6d7f111851ab2900ac711a9f486ac973b884d0cb299f4b25fd1f61a",
    "verified_classes": [
      "SessionResumeRejected",
      "ResumeRequest",
      "SessionRecord"
    ],
    "verified_functions": [
      "authorize_resume"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "SessionResumeRejected"
    ],
    "sample_fail_closed_invariants": [
      "negotiated capability hash mismatch; replayed events were produced under a different initialize context"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
