{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-a-resumed-mcp-stream-when-the-server-s-last-event-id-replay-window-has-already-been-evicted-by-backpressure-driven-co",
  "title": "How should an instance reconcile a resumed MCP stream when the server's `Last-Event-ID` replay window has already been evicted by backpressure-driven compaction",
  "date_of_record": "2026 December 1",
  "scope": "Applies to MCP clients using the HTTP-native streaming transport (SSE-based `GET` stream plus `POST` message channel) where the server advertises `Last-Event-ID`-based resumption. Does not cover stdio transport, WebSocket transports with application-level acks, or servers that hold unbounded replay buffers.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-resumed-mcp-stream-when-the-server-s-last-event-id-replay-window-has-already-been-evicted-by-backpressure-driven-co.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-resumed-mcp-stream-when-the-server-s-last-event-id-replay-window-has-already-been-evicted-by-backpressure-driven-co.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-a-resumed-mcp-stream-when-the-server-s-last-event-id-replay-window-has-already-been-evicted-by-backpressure-driven-co.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2295,
    "python_slice_tokens": 378,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"the connection dropped.\" Connection drops are expected and are exactly what resumption is for. The failure is a **semantic mismatch between two independently-negotiated guarantees**: the client's resumption contract (deliver every event with `id > Last-Event-ID`) and the server's retention contract (keep at most *N* events or *B* byt...",
    "what_was_observed": "A tool-calling agent maintained a long-lived MCP session against a server that streamed `notifications/tools/list_changed`, progress notifications for long-running tool calls, and `sampling/createMessage` requests back to the client. The server's replay buffer was configured to 512 events / 2 MiB, compacted on overflow by dropping the oldest. Sequence observed in a captured trace: 1. Client is at `Last-Event-ID: 8841...",
    "condition_of_validity": "The invariant \"resumption delivers a contiguous suffix of the event stream\" holds only when the server's retention window is strictly larger than the maximum event gap a client can produce, i.e. `retention_events > max_client_stall_events`. This is unenforceable in general because `max_client_stall_events` is a function of client-side processing latency, whi...",
    "decision_boundary": "The client sits on a boundary between two failure modes when it detects a gap: - **Treat as continuation** (assume the hole is benign): cheap, keeps the session, but risks acting on stale state — e.g. believing a tool is still running when its completion notification was in the hole, or missing a `list_changed` and calling a tool that no longer exists. - **T...",
    "operational_effect": "Without an explicit continuity assertion, an MCP client under backpressure exhibits a characteristic pathology: **silent event-stream splicing**. Symptoms downstream are misleading — a tool call that \"hangs\" (its gating `sampling` request was lost), a tool invocation against a stale schema (a `list_changed` was lost), or a duplicated side effect (the client ..."
  },
  "matched_failure_symptoms": [
    "HTTP_429_BURST_STARVATION"
  ],
  "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": "707a1f5537fdda6e75bab2d0d6ef16a12f7f712013a6d6ff615c902ee52d58f7",
    "verified_classes": [
      "McpResumeGapError",
      "ResumeContext"
    ],
    "verified_functions": [
      "_is_successor",
      "reconcile_resume"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "McpResumeGapError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
