{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-mcp-stream-resumption-when-the-last-event-id-cursor-has-been-reaped-by-the-server-s-replay-window",
  "title": "Under what conditions must an instance refuse MCP stream resumption when the Last-Event-ID cursor has been reaped by the server's replay window",
  "date_of_record": "2026 November 26",
  "scope": "Applies to MCP clients operating over the HTTP-native transport with Server-Sent Events streaming and `Last-Event-ID`-based resumption (SSE reconnect semantics). Does not apply to stdio transport, to stateless request/response MCP servers, or to servers that advertise no event replay capability.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-mcp-stream-resumption-when-the-last-event-id-cursor-has-been-reaped-by-the-server-s-replay-window.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-mcp-stream-resumption-when-the-last-event-id-cursor-has-been-reaped-by-the-server-s-replay-window.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-mcp-stream-resumption-when-the-last-event-id-cursor-has-been-reaped-by-the-server-s-replay-window.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1686,
    "python_slice_tokens": 252,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two superficially similar reconnection scenarios in MCP HTTP-native streaming, and they demand opposite client behaviors: 1. **Transient disconnect with a live replay window.** The TCP/HTTP connection drops; the server retains the event buffer keyed by the last emitted `id`; the client reconnects with `Last-Event-ID` and resumes from the exact byte...",
    "what_was_observed": "A tool-calling agent maintained an MCP session against an HTTP-native server emitting tool-progress and partial-result events. Each event carried an `id`. During a long-running `search` tool call, the client's network path flapped for ~40 seconds. The server's replay buffer was bounded to the last 256 events *and* a 30-second TTL — both evicted the client's cursor before reconnect. On reconnect the client sent `Last-...",
    "condition_of_validity": "Resumption is valid **iff** the client can prove the first event received after reconnect is the immediate successor of its last-seen event, or that the server explicitly attests to gap-free continuation. Concretely, resumption is safe only when at least one holds: - **Contiguous successor:** the first post-reconnect event `id` is the expected successor unde...",
    "decision_boundary": "The boundary is the gap-detection predicate, and it must be strict: - If `first_id_after_reconnect == expected_successor(last_seen_id)` **and** the id scheme is declared contiguous → resume, splice is legal. - If `first_id_after_reconnect > expected_successor(last_seen_id)` → **gap detected** → do not splice; escalate to re-baseline. - If `first_id_after_rec...",
    "operational_effect": "When the client enforces the strict predicate: 1. On gap, the agent aborts the in-flight reasoning step, marks the tool call `indeterminate`, and re-invokes it with an idempotency key so the server can deduplicate. 2. The partial result from before the gap is quarantined, not committed to episodic memory — it is a *lower bound*, not a fact. 3. The session's ..."
  },
  "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": "a1cc87fea10a11905f0b9ff0d53877f161b3ea3c3477e6fd3efa49a30cf6f792",
    "verified_classes": [
      "ResumptionContinuityError",
      "ResumeState"
    ],
    "verified_functions": [
      "validate_resumption",
      "resume_stream"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ResumptionContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
