{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-an-mcp-last-event-id-resumption-as-a-poisoned-continuation-rather-than-a-legitimate-replay",
  "title": "When must an instance treat an MCP `Last-Event-ID` resumption as a poisoned continuation rather than a legitimate replay?",
  "date_of_record": "2026 November 21",
  "scope": "Applies to MCP servers and clients operating the Streamable HTTP transport (single `/mcp` endpoint, `POST` for requests, optional `GET` for a server-initiated SSE stream, `Last-Event-ID` header for resumption) and to clients mid-migration from the legacy HTTP+SSE transport (separate `GET /sse` stream plus `POST /messages`). It does not cover stdio transport, WebSocket transports, or pure request/response JSON mode with no event stream.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-mcp-last-event-id-resumption-as-a-poisoned-continuation-rather-than-a-legitimate-replay.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-mcp-last-event-id-resumption-as-a-poisoned-continuation-rather-than-a-legitimate-replay.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-mcp-last-event-id-resumption-as-a-poisoned-continuation-rather-than-a-legitimate-replay.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2251,
    "python_slice_tokens": 294,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *event replay* and *session replay*. The `Last-Event-ID` header is defined by the SSE spec as a cursor into a byte stream: the client says \"I last saw event `N`, resume after it.\" It carries no claim about *which logical operation* those events belonged to. In the Streamable HTTP transport, however, the same header is ...",
    "what_was_observed": "A representative trace, reproduced across two server implementations and three client SDKs: 1. Client opens a session via `POST /mcp` with `initialize`. Server returns `Mcp-Session-Id: s_7f3a`. A `GET /mcp` SSE stream is opened; the server assigns event IDs from a per-session counter: `evt-1` (progress), `evt-2` (progress). 2. The client issues a long tool call (`tools/call`, e.g. a code-execution sandbox op) on a se...",
    "condition_of_validity": "The invariant that makes `Last-Event-ID` resumption sound is: > For a given `Mcp-Session-Id`, the mapping from event ID to (exchange ID, sequence position) is injective and stable for the lifetime of the session, and the server retains every event with ID greater than any cursor it will accept. Equivalently, three conditions must all hold: 1. **ID uniqueness...",
    "decision_boundary": "The decision an agent runtime must make on every reconnect: - **Resume** only if the server advertises a resumption capability with a durable cursor (e.g., a `Mcp-Session-Id`-scoped `Last-Event-ID` namespace, or an explicit `resumption-token` in the `initialize` result) *and* the client's cursor was minted in the same session *and* the server's response to a...",
    "operational_effect": "The practical consequence is that **stream resumption in MCP is a liveness feature, not a correctness feature.** It keeps the connection from tearing down; it does not guarantee the logical exchange survives. Operators who treat `Last-Event-ID` as a durable checkpoint — the way one treats a Kafka consumer offset — will observe exactly the two failure modes a..."
  },
  "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": "8d11b599e967d7841b4456287c6924d33c8775a78795c8509cd15c1e8c0d1278",
    "verified_classes": [
      "PoisonedContinuationError"
    ],
    "verified_functions": [
      "resume_stream",
      "guarded_reconnect"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "PoisonedContinuationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
