{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-a-resumed-mcp-stream-whose-last-event-id-replay-diverges-from-the-client-s-post-fallback-cursor",
  "title": "How should an instance reconcile a resumed MCP stream whose Last-Event-ID replay diverges from the client's POST-fallback cursor",
  "date_of_record": "2026 November 28",
  "scope": "Applies to MCP servers exposing the HTTP-native \"streamable\" transport (single endpoint, GET for server→client SSE, POST for client→server, `Last-Event-ID` resumption) where a client may drop the SSE leg and fall back to POST polling mid-session. Does not apply to stdio transport or to pure SSE-with-separate-endpoint legacy transports where resumption and request submission share no cursor.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-resumed-mcp-stream-whose-last-event-id-replay-diverges-from-the-client-s-post-fallback-cursor.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-resumed-mcp-stream-whose-last-event-id-replay-diverges-from-the-client-s-post-fallback-cursor.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-resumed-mcp-stream-whose-last-event-id-replay-diverges-from-the-client-s-post-fallback-cursor.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1965,
    "python_slice_tokens": 302,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the stream dropped.\" It is that the streamable transport has **two independent progress cursors** that the spec treats as one session: the SSE `Last-Event-ID` (server-assigned, monotonic per stream) and the client's POST request sequence (client-assigned, ordered by the client's own send loop). On resumption after a fallback, the server r...",
    "what_was_observed": "A client agent issued `tools/call` for a long-running tool over POST while holding an SSE stream open on the same session. Sequence: 1. SSE stream at `Last-Event-ID: 41`. Server had emitted through event 47 (tool progress notifications) but the client's TCP leg stalled after 41. 2. Client's POST send-loop timed out waiting for the `tools/call` response, classified the transport as degraded, and opened a **fallback PO...",
    "condition_of_validity": "The invariant that must hold for safe resumption is: > For a given session, the set of server events delivered to the client after a resumption must be a *superset* of the events the client has already applied, with no event whose causal antecedent (the POST that generated it) is not also in the client's applied request set. This holds only when **the client...",
    "decision_boundary": "The boundary is between two defensible client policies, and the choice is forced by whether the server exposes a head-advance primitive: - **If the server exposes `GET /session/{id}/head` (or equivalent) returning the current `Last-Event-ID`:** the client may fall back, but must first `head`-advance its cursor to the server's head, then issue the fallback PO...",
    "operational_effect": "An instance that falls back without head-advance will, with high probability on any tool whose execution emits progress events, produce a conversation state containing **phantom progress** — progress notifications for an execution the agent's request ledger does not contain. Downstream effects compound: - The agent's next `tools/call` may be a compensating a..."
  },
  "matched_failure_symptoms": [
    "HTTP_502_503_504_CASCADE"
  ],
  "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": "73cbb39d0bfe9efa3fe696614f0ae03ef4686505d52e0ab184a3ee08b8b5375b",
    "verified_classes": [
      "ResumptionDivergence",
      "RequestLedger",
      "StreamableSession"
    ],
    "verified_functions": [
      "contains",
      "fallback_to_post",
      "apply_replayed_event"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ResumptionDivergence"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
