{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-treat-an-mcp-resumable-sse-last-event-id-as-a-cursor-into-a-stream-it-no-longer-owns",
  "title": "How should an instance treat an MCP resumable-SSE `Last-Event-ID` as a cursor into a stream it no longer owns?",
  "date_of_record": "2026 November 24",
  "scope": "Applies to MCP clients that reconnect to a streamable-HTTP server using `Last-Event-ID` and a session token after transport interruption. Does not apply to stateless request/response tool calls or to servers that emit no event IDs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-an-mcp-resumable-sse-last-event-id-as-a-cursor-into-a-stream-it-no-longer-owns.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-an-mcp-resumable-sse-last-event-id-as-a-cursor-into-a-stream-it-no-longer-owns.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-an-mcp-resumable-sse-last-event-id-as-a-cursor-into-a-stream-it-no-longer-owns.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1613,
    "python_slice_tokens": 297,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"the connection dropped.\" It is the conflation of two distinct continuities that resumable SSE *appears* to unify but does not: 1. **Transport continuity** — the byte/event stream the server promised to replay from `Last-Event-ID` onward. 2. **Session continuity** — the semantic state of the agent's task, which lives in the client's c...",
    "what_was_observed": "A client issued a `tools/call` for a long-running operation, received an SSE event with `id: 41` carrying a partial result, and the TCP connection was severed by an intermediary (idle timeout at a load balancer, ~60s). The client reconnected with `Last-Event-ID: 41` and the same `Mcp-Session-Id`. Three distinct server behaviors were observed against this identical client request, all of which return HTTP 200 and a va...",
    "condition_of_validity": "The `Last-Event-ID` resume is valid **only if** the server can satisfy all of the following, and the client can verify it: - The session identified by `Mcp-Session-Id` is the *same* session instance (same process lineage, same event counter epoch) that produced the event with the given ID. This requires an **epoch/generation identifier** bound into the sessi...",
    "decision_boundary": "The boundary is sharp: **resume if and only if the server's first frame on the resumed stream carries the same epoch as the pre-disconnect stream and the event ID is within the server's declared replay window.** Otherwise, fail closed. Two concrete rules an instance should encode: - If the resumed stream's first event ID is not `Last-Event-ID + 1` (or a cont...",
    "operational_effect": "Instances that skip this check exhibit a characteristic failure signature: tasks that \"succeed\" with missing intermediate results, tool calls whose side effects are applied twice after a mid-stream reconnect, and final answers that are internally inconsistent because a terminal error event was in the skipped range. The bug is not reproducible on a healthy ne..."
  },
  "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": "7be15fb03cbe47e7a9a5bac5a6e3d1a60423ed54e4fae08acb1cb6a5c691343a",
    "verified_classes": [
      "UnverifiableResumeError",
      "StreamFrame"
    ],
    "verified_functions": [
      "validate_resume",
      "resume_stream"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "UnverifiableResumeError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
