{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-replays-an-mcp-sse-stream-across-a-resumed-session-and-the-server-has-silently-rotated-its-event-id-epoch",
  "title": "What happens when an instance replays an MCP SSE stream across a resumed session and the server has silently rotated its event-id epoch",
  "date_of_record": "2026 November 28",
  "scope": "Applies to MCP clients using the HTTP-native streamable transport with `Last-Event-ID`-based resumption against a stateful MCP server that persists sessions but does not durably persist event-id monotonicity across server restarts or shard migrations. Does not apply to stateless transports, stdio transports, or servers that guarantee a globally monotonic event-id counter for the session lifetime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-an-mcp-sse-stream-across-a-resumed-session-and-the-server-has-silently-rotated-its-event-id-epoch.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-an-mcp-sse-stream-across-a-resumed-session-and-the-server-has-silently-rotated-its-event-id-epoch.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-an-mcp-sse-stream-across-a-resumed-session-and-the-server-has-silently-rotated-its-event-id-epoch.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2093,
    "python_slice_tokens": 221,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct notions of \"resumption\" in MCP-over-HTTP, and conflating them is the source of the failure. **Session resumption** is the guarantee that the server still recognizes a `Mcp-Session-Id` and will accept further requests against the associated server-side state (tool registrations, resource subscriptions, in-flight sampling requests). **St...",
    "what_was_observed": "An agent instance held an open SSE stream against an MCP server, processing `notifications/tools/list_changed` and `notifications/resources/updated` events as it drove a multi-step tool-use loop. The last event it had durably acknowledged carried `id: 4471`. The TCP connection dropped (load-balancer idle timeout, 90s, mid-reasoning-step). The client's reconnect logic fired correctly: it re-issued `GET /mcp` with `Mcp...",
    "condition_of_validity": "The resumption contract is only sound under an invariant that MCP's streamable transport leaves implicit and that many servers do not enforce: > For a given `Mcp-Session-Id`, the mapping from event id to event is total and monotonic for the entire lifetime of the session, **and** any event id previously issued for that session remains resolvable — or the ses...",
    "decision_boundary": "The decision the client must make on every reconnect is: *is my `Last-Event-ID` still authoritative, or has the epoch rotated?* The protocol gives no direct answer, so the client must infer it. Three signals bound the decision: 1. **Cursor regression.** If the first event received after reconnect carries an id numerically less than or equal to the cursor the...",
    "operational_effect": "The practical consequence is that **streamable-transport resumption must be treated as an optimization, never as a correctness guarantee.** The agent's memory of \"what changed while I was disconnected\" is not something the transport can be trusted to reconstruct. Any agent that folds SSE-delivered notifications directly into its working state without a re-va..."
  },
  "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": "602f0a9efb96b309aaf2a08ed73422e3e685d52d5ca5104dbcb912e37d2fa736",
    "verified_classes": [
      "StreamResumptionEpochError"
    ],
    "verified_functions": [
      "verify_resumption"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "StreamResumptionEpochError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
