{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-acknowledges-an-sse-event-id-it-has-not-yet-durably-committed-resumability-gaps-in-mcp-http-native-transport-with-stream",
  "title": "What happens when an instance acknowledges an SSE event ID it has not yet durably committed: resumability gaps in MCP HTTP-native transport with streamable SSE and session resumption tokens",
  "date_of_record": "2026 November 14",
  "scope": "Applies to MCP servers implementing the HTTP-native transport with streamable SSE (single POST endpoint that upgrades to `text/event-stream`, `Last-Event-ID` resume semantics, and `Mcp-Session-Id` resumption tokens). Does not apply to stdio transports, nor to servers that buffer the full event stream in durable storage before emitting `id:` fields.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-acknowledges-an-sse-event-id-it-has-not-yet-durably-committed-resumability-gaps-in-mcp-http-native-transport-with-stream.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-acknowledges-an-sse-event-id-it-has-not-yet-durably-committed-resumability-gaps-in-mcp-http-native-transport-with-stream.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-acknowledges-an-sse-event-id-it-has-not-yet-durably-committed-resumability-gaps-in-mcp-http-native-transport-with-stream.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1298,
    "python_slice_tokens": 257,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The MCP streamable-HTTP transport treats the SSE `id:` field as a *resumption cursor*, not merely a sequence marker. When a client reconnects with `Last-Event-ID: N`, the server is contractually obligated to replay every event after `N`. The non-obvious boundary is this: **the event ID is an acknowledgment of durability, not of emission.** If the server assi...",
    "what_was_observed": "Under a load test with an MCP server fronting a Redis-backed event log, clients received `id: 1041` for a `notifications/tools/list_changed` event. The server process was killed (SIGKILL) 3 ms later, before the `XADD` to the Redis stream completed. On reconnect the client sent `Last-Event-ID: 1041`. The server's stream head was at `1040`. The server, treating `Last-Event-ID` as authoritative, resumed from `1041` and ...",
    "condition_of_validity": "This boundary applies when all of the following hold: (1) the server assigns SSE `id:` values from a monotonically increasing source that is *not* the durable commit itself (e.g., an in-memory counter, a wall-clock, or a pre-allocated range); (2) the write to durable storage is asynchronous relative to the `id:` emission on the wire; (3) the client honors `L...",
    "decision_boundary": "The correct invariant is: **never emit an `id:` that is not already durable.** Two implementation strategies satisfy it. (A) *Commit-then-emit*: perform the durable write, obtain the storage-assigned offset, and use that offset as the `id:`. This makes `Last-Event-ID` a true log position. Cost: one storage round-trip on the hot path before the client sees th...",
    "operational_effect": "With commit-then-emit, replay after reconnect is exact and `Last-Event-ID` never exceeds the durable head; the only cost is latency. With emit-then-reconcile, the server must expose the durable head and the client must implement a re-sync path on `gap`. The failure mode to instrument against is a `Last-Event-ID` strictly greater than the server's durable hea..."
  },
  "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": "86ac94071570886154f521aeb0d57218cf8db3758626b9ddf65f1c801b3302fe",
    "verified_classes": [
      "ResumabilityViolation",
      "ResumeCheck"
    ],
    "verified_functions": [
      "validate_resume",
      "assign_event_id",
      "resume_or_resync"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ResumabilityViolation"
    ],
    "sample_fail_closed_invariants": [
      "attempted to emit id before durable commit"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
