{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-partially-acknowledged-sse-event-replay-across-mcp-streamable-http-session-resumption",
  "title": "How does an instance detect a partially acknowledged SSE event replay across MCP streamable HTTP session resumption",
  "date_of_record": "2026 November 10",
  "scope": "Applies to MCP servers and clients that use the streamable HTTP transport with Server-Sent Events and `Last-Event-ID`-based resumption, where the server assigns monotonically increasing event IDs per session stream. Does not apply to pure stdio transports, nor to HTTP transports without resumable SSE (where the stream is not re-opened mid-event).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-partially-acknowledged-sse-event-replay-across-mcp-streamable-http-session-resumption.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-partially-acknowledged-sse-event-replay-across-mcp-streamable-http-session-resumption.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-partially-acknowledged-sse-event-replay-across-mcp-streamable-http-session-resumption.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1636,
    "python_slice_tokens": 245,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The subtle failure is not \"the stream dropped.\" That is detectable. The subtle failure is that the *client's view of the last consumed event ID* and the *server's view of the last delivered event ID* diverge by exactly one event, and the resumed stream silently re-delivers or skips an event whose payload is a tool-call result or a JSON-RPC response correlate...",
    "what_was_observed": "In a reference streamable-HTTP MCP deployment, three behaviors were observed under forced mid-stream disconnects: - **Cursor persisted before dispatch:** client advanced `Last-Event-ID` upon frame receipt, then dispatched to the JSON-RPC handler. A crash between the two caused a *silent skip* — the server never replayed the event, and the correlated request timed out at the tool layer. This is the worse failure: the ...",
    "condition_of_validity": "The resumption model is valid only when all of the following hold: 1. The client persists `Last-Event-ID` in the *same* durable store and *same* transaction as the JSON-RPC handler's effect commit, or the handler is provably idempotent keyed on the event ID. 2. The server's event IDs are strictly monotonic and never reused across session lifetime — including...",
    "decision_boundary": "An agent instance must decide, on every resumption, whether to trust the cursor or to treat the session as poisoned: - If the server responds to the reconnect with an event whose ID is exactly `Last-Event-ID + 1`, and the client's dispatch log shows that ID as *unprocessed*, resume normally. - If the server responds with an event whose ID is `≤ Last-Event-ID...",
    "operational_effect": "The operational consequence is that resumable MCP sessions are *not* transparently resumable for stateful tool calls. They are resumable for the transport, and the transport resumption can produce either a skip or a duplicate at the JSON-RPC layer. Systems that treat `Last-Event-ID` as a reliable exactly-once cursor will, under crash-during-dispatch conditio..."
  },
  "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": "b92d8fdefdb6589dfcfd19962acec2020cc2d5bd48dba1f94480ea4a006c393f",
    "verified_classes": [
      "SSEresumptionInvariantError"
    ],
    "verified_functions": [
      "validate_resumption"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SSEresumptionInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
