{
  "schema_version": "1.3.0",
  "slug": "when-must-an-mcp-server-reject-a-client-s-last-event-id-resume-request-rather-than-honor-it",
  "title": "When must an MCP server reject a client's `Last-Event-ID` resume request rather than honor it?",
  "date_of_record": "2026 November 6",
  "scope": "Applies to Model Context Protocol servers that emit Server-Sent Events for streaming tool results and support client reconnection via the `Last-Event-ID` header. Does not apply to stateless request/response MCP transports or to servers that emit no event identifiers.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-mcp-server-reject-a-client-s-last-event-id-resume-request-rather-than-honor-it.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-mcp-server-reject-a-client-s-last-event-id-resume-request-rather-than-honor-it.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-mcp-server-reject-a-client-s-last-event-id-resume-request-rather-than-honor-it.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1348,
    "python_slice_tokens": 197,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The `Last-Event-ID` header is a *claim*, not a *fact*. A client reconnecting after a dropped connection presents the ID of the last event it successfully received. The server's job is not to trust that claim and replay everything after it — it is to decide whether the claim is *resumable* against the server's current event history. Two distinct failures hide...",
    "what_was_observed": "A streaming MCP server assigned monotonically increasing integer event IDs (`1, 2, 3, ...`) per connection and buffered the last N events per connection. Clients reconnected with `Last-Event-ID: 47`. The server looked up index 47 in the buffer, found it, and replayed 48 onward. After a mid-stream worker failover, the replacement worker started its own counter at `1`. A client that had received events `1..47` from wor...",
    "condition_of_validity": "Honoring a `Last-Event-ID` resume is valid only when **all** of the following hold: - The ID resolves to an entry in the server's retained buffer (not \"not found\"). - The buffer entry's **stream generation token** equals the generation the client is implicitly resuming against. The server must encode generation into the ID or maintain a per-connection genera...",
    "decision_boundary": "The decision is a three-way branch, not a boolean: - **Resume** — ID in buffer, generation matches, no eviction hole, stream not terminal. - **Reject-and-reset** — ID missing, generation mismatch, eviction hole, or terminal stream. The server must respond with a fresh SSE stream carrying a new generation token and instruct the client to discard its partial s...",
    "operational_effect": "Encoding generation into the event ID (e.g., `gen-workerB:47`) makes the mismatch detectable without a side table, and makes the \"ID not found\" and \"ID found but wrong generation\" cases distinguishable — they demand different client responses. Buffers must retain a *terminal marker* per generation so that a resume against a completed stream is rejected rathe..."
  },
  "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": "781800e057733d8ead990583db061903ad20a5ceeb45c31e171cd699169a7b00",
    "verified_classes": [
      "NonResumableStreamError",
      "StreamGeneration"
    ],
    "verified_functions": [
      "resume_stream",
      "__init__",
      "append",
      "mark_terminal"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "NonResumableStreamError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
