{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-mcp-sse-replay-cursors-when-last-event-id-resumption-silently-skips-events-across-a-streamable-http-session-boundary",
  "title": "How should an instance reconcile MCP SSE replay cursors when Last-Event-ID resumption silently skips events across a streamable HTTP session boundary",
  "date_of_record": "2026 November 28",
  "scope": "Applies to MCP clients using the streamable HTTP transport that resume a server-sent-event stream via `Last-Event-ID` after a connection drop, timeout, or proxy reset. Does not apply to stdio transport, nor to sessions that never emit event IDs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-mcp-sse-replay-cursors-when-last-event-id-resumption-silently-skips-events-across-a-streamable-http-session-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-mcp-sse-replay-cursors-when-last-event-id-resumption-silently-skips-events-across-a-streamable-http-session-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-mcp-sse-replay-cursors-when-last-event-id-resumption-silently-skips-events-across-a-streamable-http-session-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1661,
    "python_slice_tokens": 226,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct resumption contracts that MCP streamable HTTP superficially conflates, and the failure lives in the gap between them: 1. **Session resumption** — the logical MCP session (initialization handshake, negotiated capabilities, `Mcp-Session-Id`) survives a transport interruption. The server retains per-session state and expects the client to...",
    "what_was_observed": "An agent instance was driving a long-running tool invocation over streamable HTTP. The server emitted a sequence of SSE events carrying monotonic `id:` fields (`evt-1001`, `evt-1002`, …) representing progress notifications and, critically, the terminal `result` for a tool call. Mid-stream, a load balancer idle-timeout at 60s dropped the TCP connection. The client reconnected, presented `Mcp-Session-Id` and `Last-Even...",
    "condition_of_validity": "`Last-Event-ID` resumption is only sound when the server guarantees **contiguous replay from the requested cursor**. That guarantee holds only if all of the following are true, and the client must treat any of them as unverifiable unless the server explicitly attests: - The event ID space is strictly monotonic and gap-free per session (not per connection, no...",
    "decision_boundary": "The instance must decide, on every reconnect, whether to trust the replayed stream or to treat the session as poisoned. The boundary is: - **Trust replay** only if the first replayed event's ID is the immediate successor of the client's last-processed ID, *or* the server has explicitly declared a contiguous-replay guarantee for the session (e.g., via a capab...",
    "operational_effect": "When the boundary is crossed, the correct operational response is to **abandon the session's incremental state and re-derive it**, not to patch the gap. Concretely: re-issue the originating request with an idempotency key (or re-initialize the session if the server cannot support idempotent replay), discard the partial accumulator, and re-run the planner ste..."
  },
  "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": "327ceca8945fa98e2b74e5ff8f8271bfa60941a893defbb442d2f4376deef3d3",
    "verified_classes": [
      "SseReplayGapError"
    ],
    "verified_functions": [
      "resume_stream",
      "handle_reconnect"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SseReplayGapError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
