{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-sse-replay-cursors-when-an-mcp-streamable-http-session-resumes-against-a-load-balanced-replica-that-never-saw-the-ori",
  "title": "How should an instance reconcile SSE replay cursors when an MCP streamable-HTTP session resumes against a load-balanced replica that never saw the original stream",
  "date_of_record": "2026 November 29",
  "scope": "Applies to MCP servers exposing the streamable-HTTP transport with `Last-Event-ID`-based resumption across more than one backend replica, where the resumption request may land on a replica that did not originate the stream. Does not apply to single-process servers, to stateless request/response tool calls with no event stream, or to the deprecated standalone HTTP+SSE transport where a single long-lived connection is pinned to one process.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-sse-replay-cursors-when-an-mcp-streamable-http-session-resumes-against-a-load-balanced-replica-that-never-saw-the-ori.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-sse-replay-cursors-when-an-mcp-streamable-http-session-resumes-against-a-load-balanced-replica-that-never-saw-the-ori.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-sse-replay-cursors-when-an-mcp-streamable-http-session-resumes-against-a-load-balanced-replica-that-never-saw-the-ori.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2288,
    "python_slice_tokens": 349,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the session was lost.\" Sessions are cheap; a session ID is a bearer token that a replica can rehydrate from a shared store. The failure is more specific: **the event-stream resumption cursor (`Last-Event-ID`) is a per-stream, per-process monotonic sequence, but the resumption protocol treats it as a session-global, cluster-global address....",
    "what_was_observed": "A three-replica deployment behind a round-robin load balancer served a single MCP session. The client opened a streamable-HTTP POST, received `Mcp-Session-Id: s-9f2a`, and the server began emitting SSE events numbered `1, 2, 3, ...` scoped to that stream. At event `47` the TCP connection was severed by an idle-timeout on the load balancer. The client, per the resumption contract, reissued the request with `Mcp-Sessio...",
    "condition_of_validity": "The resumption cursor is only meaningful under an invariant that must be enforced, not assumed: > **A `Last-Event-ID` is valid if and only if it was minted by the same logical event log that will service the resumption, and that log is totally ordered and durable across the resumption boundary.** Three sub-conditions must all hold for a resume to be safe: 1....",
    "decision_boundary": "The instance must decide, on every resumption attempt, between three actions, and the decision is not \"did the session exist\" but \"can this replica prove it can honor this exact cursor\": - **Honor the resume** only if the cursor is present in the shared, durable event log for this session *and* the log is the same namespace the cursor was minted from. This r...",
    "operational_effect": "The downstream consequences are not \"a dropped event.\" They are: - **Ledger divergence.** The client's model of tool-call outcomes is missing transitions the server believes occurred. Subsequent `tools/call` requests are issued against a stale world-model, and the agent's reasoning compounds the error — it may re-issue a call the server already executed (ide..."
  },
  "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": "465da3c877ad883d667863525ab14a54fe5d6a11c0abe00e3ef5880922eb5a47",
    "verified_classes": [
      "UnresolvableResumeCursor"
    ],
    "verified_functions": [
      "resume_stream"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "UnresolvableResumeCursor"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
