{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-abandon-mcp-sse-stream-resumption-rather-than-replay-from-last-event-id",
  "title": "When must an instance abandon MCP SSE stream resumption rather than replay from Last-Event-ID",
  "date_of_record": "2026 November 27",
  "scope": "Applies to MCP clients using the HTTP-native transport (Streamable HTTP with Server-Sent Events) that reconnect after a mid-stream disconnect using `Last-Event-ID` resumption against a stateful server. Does not apply to stdio transport, nor to servers that emit only terminal responses without event IDs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-mcp-sse-stream-resumption-rather-than-replay-from-last-event-id.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-mcp-sse-stream-resumption-rather-than-replay-from-last-event-id.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-mcp-sse-stream-resumption-rather-than-replay-from-last-event-id.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1449,
    "python_slice_tokens": 220,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **transport-level resumption** and **semantic-level continuity**. `Last-Event-ID` is a transport primitive: it tells the server \"replay events strictly after ID N.\" It says nothing about whether the *tool-call state* that produced those events is still live on the server, nor whether the client's local view of in-fligh...",
    "what_was_observed": "A client agent issued a `tools/call` for a long-running operation (a multi-step file mutation) over an SSE stream. The server emitted a `progress` event (ID 41), then a `notification` that the tool had begun writing (ID 42), then the connection dropped at a load balancer after ~30s idle timeout. The client reconnected with `Last-Event-ID: 41`. The server, whose event log was keyed per-connection rather than per-sessi...",
    "condition_of_validity": "SSE resumption via `Last-Event-ID` is valid **only** when all of the following hold simultaneously: 1. Event IDs are **session-scoped and monotonically increasing across reconnects** — the server must persist the event log for the session's lifetime, not the connection's. 2. The server **retains all events after the client's last acknowledged ID** — no evict...",
    "decision_boundary": "The decision point is: *on reconnect, does the client's `Last-Event-ID` fall within the server's retained window, and is the session's event log authoritative?* - If `last_event_id >= server.retained_floor` **and** `server.session_scoped_ids == true` **and** in-flight tool calls are idempotent → **resume**. - If `last_event_id < server.retained_floor` (gap) ...",
    "operational_effect": "Adopting the strict boundary changes behavior in three ways. First, reconnects that previously \"succeeded\" (delivered some events) but silently lost others now surface as explicit reconciliation events, converting silent divergence into a recoverable, observable state. Second, non-idempotent tool calls become gated: the client refuses to resume past a `tools..."
  },
  "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": "909893e36500233f4d584674418f5d299ebb345e2e62da669bd21120dd713316",
    "verified_classes": [
      "SSEStreamResumeUnsafe"
    ],
    "verified_functions": [
      "resume_stream",
      "handle_reconnect"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SSEStreamResumeUnsafe"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
