{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-the-last-event-id-cursor-against-a-server-side-replay-window-when-resuming-an-mcp-http-native-streaming-session",
  "title": "Where must an instance reconcile the `Last-Event-ID` cursor against a server-side replay window when resuming an MCP HTTP-native streaming session",
  "date_of_record": "2026 November 25",
  "scope": "Applies to MCP clients resuming a dropped HTTP-native SSE/streaming session against a server that supports `Last-Event-ID`-based replay. Does not cover stdio transport, WebSocket transports, or servers that do not implement event-ID replay semantics (for those, resume is equivalent to cold restart and the invariant below is vacuous).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-the-last-event-id-cursor-against-a-server-side-replay-window-when-resuming-an-mcp-http-native-streaming-session.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-the-last-event-id-cursor-against-a-server-side-replay-window-when-resuming-an-mcp-http-native-streaming-session.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-the-last-event-id-cursor-against-a-server-side-replay-window-when-resuming-an-mcp-http-native-streaming-session.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1678,
    "python_slice_tokens": 216,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **cursor validity** and **cursor presence**. A resuming MCP client that sends `Last-Event-ID: N` is asserting two separate things: (a) that it processed every event up to and including ID `N`, and (b) that the server still retains every event with ID greater than `N`. The HTTP spec and the MCP streaming conventions onl...",
    "what_was_observed": "An MCP client maintaining an SSE stream to a tool-server received events `id: 1` through `id: 47` for an in-flight `tools/call` (a long-running filesystem scan emitting progress notifications followed by a final result). The TCP connection dropped at event 47. The client reconnected with `Last-Event-ID: 47`. The server's replay ring held only the last 32 events (`id: 16 .. 47`), and — critically — the drop occurred *...",
    "condition_of_validity": "Resumption via `Last-Event-ID` is valid if and only if three conditions hold simultaneously at the moment the reconnect request is issued: 1. **Cursor monotonicity at the applied boundary.** The `Last-Event-ID` sent must equal the highest event ID the *application* has durably applied, not the highest frame the *transport* has read. Buffered-but-unapplied fr...",
    "decision_boundary": "The boundary is crossed when `applied_cursor < window_floor`. At that point the client has three options and must choose deliberately: - **Reject and cold-start.** Discard the session, re-issue the original request with its idempotency token, and accept that any partial state from the interrupted call is lost. Correct when the call is idempotent and cheap to...",
    "operational_effect": "The operational consequence is that **stream resumption is not a continuity mechanism; it is a bounded-replay mechanism whose bounds are set by the server, not the client.** Any agent architecture that treats `Last-Event-ID` as a durable cursor will eventually observe a gap-induced state divergence, and the divergence will be silent because the protocol has ..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "a3d96388278414acf4838508157fa4807aa108655c481834dd42cae72a494d27",
    "verified_classes": [
      "McpResumeInvariantError"
    ],
    "verified_functions": [
      "resume_stream"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "McpResumeInvariantError"
    ],
    "sample_fail_closed_invariants": [
      "retry idempotency token differs from original; concurrent execution cannot be deduplicated and replayed result may be a "
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
