{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-an-mcp-last-event-id-resumption-as-a-new-stream-rather-than-a-continuation-of-the-prior-sse-session",
  "title": "Under what conditions must an instance treat an MCP `Last-Event-ID` resumption as a *new* stream rather than a continuation of the prior SSE session",
  "date_of_record": "2026 November 10",
  "scope": "Applies to MCP servers and clients that migrated from the legacy HTTP+SSE transport (dual-endpoint `/sse` + `/messages`) to the Streamable HTTP transport (single endpoint, optional SSE upgrade per response, `Last-Event-ID` based resumption), specifically when a client presents a `Last-Event-ID` header on a `GET` or `POST` after a reconnect. It does not apply to pure in-process transports (stdio), nor to the legacy SSE transport's own reconnect semantics, which lack a resumable event cursor by design.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-mcp-last-event-id-resumption-as-a-new-stream-rather-than-a-continuation-of-the-prior-sse-session.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-mcp-last-event-id-resumption-as-a-new-stream-rather-than-a-continuation-of-the-prior-sse-session.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-mcp-last-event-id-resumption-as-a-new-stream-rather-than-a-continuation-of-the-prior-sse-session.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1717,
    "python_slice_tokens": 249,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The critical distinction is between **event-log continuity** and **session continuity**. The Streamable HTTP transport spec allows a client to resume a broken stream by sending `Last-Event-ID`; the server is expected to replay events *after* that ID. Operators migrating from the SSE transport routinely conflate \"the client reconnected with the same session I...",
    "what_was_observed": "In a multi-replica deployment behind a round-robin load balancer, a client opened a Streamable HTTP `GET` to establish the SSE stream, received events `e1..e7`, and the connection dropped. The client reconnected with `Last-Event-ID: e7` and the same `Mcp-Session-Id`. The request landed on a different replica. That replica had a valid session record (sessions were stored in Redis) but its local event ring buffer for t...",
    "condition_of_validity": "A `Last-Event-ID` resumption is a valid continuation **iff all of the following hold simultaneously**: 1. The `Mcp-Session-Id` resolves to a session that is still in `active` state (not expired, not terminated, not resumed-into-a-new-incarnation). 2. The server can locate the **authoritative** event log segment for the specific stream that issued the referen...",
    "decision_boundary": "The boundary is **not** \"does the session exist\" and **not** \"does the ID parse.\" It is \"can this process, right now, produce the exact next event in the client's causal sequence.\" Concretely, the decision procedure is: - Resolve session. If absent/expired → new stream, reject cursor. - Resolve stream ownership for the referenced ID. If the ID's origin repli...",
    "operational_effect": "When the boundary is crossed without being detected, the observable symptoms are: duplicated side-effecting tool calls (the client re-issues work it believes was lost), causal-ordering violations in the event stream (events with IDs that appear monotonic but are semantically out of order because they came from a different counter), and \"phantom resumptions\" ..."
  },
  "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": "d86f2fbf58900507bfc3d8605deb3d5c6d89c243c7f2dc69aa44a42942ddb237",
    "verified_classes": [
      "ResumeContinuityError",
      "StreamIncarnation"
    ],
    "verified_functions": [
      "resume_stream",
      "__init__"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ResumeContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
