{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-an-mcp-last-event-id-resumption-as-a-new-logical-tool-call-rather-than-a-continuation-and-how-does-the-resump",
  "title": "In what scenarios must an instance treat an MCP `Last-Event-ID` resumption as a *new* logical tool call rather than a continuation, and how does the resumption token's scope silently expire",
  "date_of_record": "2026 November 26",
  "scope": "Applies to MCP clients using the HTTP-native transport (Streamable HTTP with `text/event-stream` responses) that persist and replay `Last-Event-ID` across reconnects, particularly when a stream is interrupted after the server has already committed side effects. Does not apply to stdio transport, nor to pure request/response tool calls that never emit a resumable event stream.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-an-mcp-last-event-id-resumption-as-a-new-logical-tool-call-rather-than-a-continuation-and-how-does-the-resump.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-an-mcp-last-event-id-resumption-as-a-new-logical-tool-call-rather-than-a-continuation-and-how-does-the-resump.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-an-mcp-last-event-id-resumption-as-a-new-logical-tool-call-rather-than-a-continuation-and-how-does-the-resump.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2012,
    "python_slice_tokens": 456,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The MCP Streamable HTTP transport provides two superficially similar resumption primitives that are governed by *different* lifetimes and different failure semantics: 1. **The session** — identified by the `Mcp-Session-Id` header, created at `initialize`, and valid until the server decides to terminate it (or a TTL elapses). The session scopes *capability ne...",
    "what_was_observed": "A client agent issued a `tools/call` for a long-running operation (a filesystem scan emitting progress events). The server streamed 14 events with `id: 100` through `id: 113`, then the connection dropped mid-stream (load balancer idle timeout at 60s). The client reconnected with the same `Mcp-Session-Id` and `Last-Event-ID: 113`. The server had, in the intervening ~4 seconds, done three things: - Emitted the final re...",
    "condition_of_validity": "The invariant — \"a `Last-Event-ID` reconnect whose stream yields no replay can be treated as continuation\" — holds **only** when all of the following are true: - The server advertises resumability for the stream (it emitted `id:` values in the original stream, so it opted in). - The reconnect response either (a) replays events with `id:` strictly greater tha...",
    "decision_boundary": "The boundary is between two client behaviors on an empty-or-truncated resumption: - **Continuation interpretation** (unsafe): assume the stream ended because the work finished. Correct only when the client already holds a terminal marker (a JSON-RPC `result`/`error` event, or a server-declared completion sentinel). - **Re-drive interpretation** (safe): treat...",
    "operational_effect": "The concrete architectural guardrail: **never let an SSE resumption be the sole authority for tool-call completion.** The client state machine for a `tools/call` over Streamable HTTP must have three terminal states — `completed(result)`, `failed(error)`, and `unknown` — and the `unknown` state must be reachable from \"reconnect yielded no terminal event.\" Fro..."
  },
  "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": "ff69905ec6d2597bcd96a1583aa89da37b540113bc6e777fdc79cfae1d0e10cb",
    "verified_classes": [
      "ResumptionStateError",
      "CallState",
      "ResumableToolCall"
    ],
    "verified_functions": [
      "handle_resumption",
      "on_reconnect_stream_closed",
      "require_redrive"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ResumptionStateError"
    ],
    "sample_fail_closed_invariants": [
      "cannot re-drive without idempotency key; duplicate side effects possible"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing",
      "uuid"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
