{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-sse-event-id-replay-against-a-resumable-mcp-stream-after-a-transport-drop",
  "title": "How should an instance reconcile SSE event-ID replay against a resumable MCP stream after a transport drop",
  "date_of_record": "2026 November 27",
  "scope": "Applies to MCP clients and servers using the HTTP-native transport with Server-Sent Events streaming and `Last-Event-ID`-based session resumption. Does not cover stdio transport, stateless request/response JSON-only MCP, or WebSocket transports with their own replay semantics.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-sse-event-id-replay-against-a-resumable-mcp-stream-after-a-transport-drop.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-sse-event-id-replay-against-a-resumable-mcp-stream-after-a-transport-drop.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-sse-event-id-replay-against-a-resumable-mcp-stream-after-a-transport-drop.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1960,
    "python_slice_tokens": 264,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"the connection dropped.\" Drops are expected and are precisely what resumption is designed to absorb. The failure is that **event-ID monotonicity and session state monotonicity are two different orderings that the client silently conflates.** The SSE `id:` field is a stream-local sequence the server emits; it is *not* a transaction lo...",
    "what_was_observed": "A client agent issued `tools/call` for a long-running operation (a browser-automation tool with 90s of intermediate `notifications/progress` events). At t=34s the underlying TCP connection was closed by an intermediate proxy (idle timeout on a connection the proxy considered quiescent because the client had not sent bytes since the initial POST). The client's SSE reader raised a read timeout, and the client reconnect...",
    "condition_of_validity": "`Last-Event-ID` resumption is safe **only** when all three of the following hold: 1. **Frame-atomic cursor commit.** The client MUST update its persisted `Last-Event-ID` cursor in the same atomic step that it applies the event's payload to protocol state. If the cursor advances before the payload is applied, a crash between the two loses the event. If the pa...",
    "decision_boundary": "The operational decision is: **when a reconnect occurs, does the client trust the replay stream, or does it re-derive state?** - If the client's handlers are idempotent across every notification type on the stream, and the server's retention window provably exceeds the client's reconnect horizon, then trust replay: send `Last-Event-ID` and process redelivere...",
    "operational_effect": "Concretely, the guardrail is a two-part client change: (a) commit `Last-Event-ID` at frame-parse completion, before dispatch, and (b) make every notification handler idempotent by keying on `(progressToken, absolute_value)` for progress, `(log_id)` for logs, and `(resource_uri, version)` for resource updates—never on counters or relative deltas. With those i..."
  },
  "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": "5bee81d86c00529939ab166ecbbe302acb58c5f426778b5fb04fa7164f465018",
    "verified_classes": [
      "ResumptionGapError",
      "ReplayCursor"
    ],
    "verified_functions": [
      "__init__",
      "commit_frame",
      "_apply_idempotent",
      "reconnect"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ResumptionGapError"
    ],
    "sample_fail_closed_invariants": [
      "server replay head is behind client cursor; server state regressed"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
