{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-mcp-last-event-id-resumption-as-a-capability-claim-rather-than-a-continuity-guarantee",
  "title": "In what scenarios must an instance treat MCP `Last-Event-ID` resumption as a *capability claim* rather than a *continuity guarantee*",
  "date_of_record": "2026 December 2",
  "scope": "Applies to MCP clients using the HTTP-native transport (Streamable HTTP) with server-initiated SSE streams and `Last-Event-ID`-based resumption, where the client maintains a long-lived tool-call or sampling session across a dropped connection. Does not apply to stdio transport, nor to stateless request/response MCP servers that never emit resumable event IDs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-last-event-id-resumption-as-a-capability-claim-rather-than-a-continuity-guarantee.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-last-event-id-resumption-as-a-capability-claim-rather-than-a-continuity-guarantee.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-last-event-id-resumption-as-a-capability-claim-rather-than-a-continuity-guarantee.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1939,
    "python_slice_tokens": 345,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The MCP Streamable HTTP transport spec allows a server to attach an `id` to each SSE event and to honor a client's `Last-Event-ID` header on reconnect by replaying events after that ID. The failure mode is treating this as an at-least-once delivery guarantee for the *semantic* effects of those events. It is not. It is a *best-effort replay of a bounded, serv...",
    "what_was_observed": "An agent instance issued a long-running `tools/call` (a batch analysis job) over Streamable HTTP. The server streamed progress notifications and finally a `result` event, each tagged with an SSE `id`. Mid-job, the TCP connection dropped (NAT rebind on the client's egress). The client reconnected with `Last-Event-ID: 47` and received a stream resuming at `id: 48`. The stream ran to completion and emitted a terminal `r...",
    "condition_of_validity": "`Last-Event-ID` resumption is only semantically safe when *all* of the following hold, and the client can verify them: 1. **ID monotonicity across the whole session lifetime**, including server restarts. If IDs are not globally monotonic (e.g., per-process counters), a reconnect can land in a fresh ID space with no detectable discontinuity. 2. **The gap is p...",
    "decision_boundary": "The client must branch on a single test performed at reconnect time, before consuming any replayed event: - **Compute `gap = first_replayed_id - last_received_id`.** If `gap == 1`, the stream is contiguous and resumption is safe to trust for framing continuity (still not for semantic completeness if the server restarted with preserved IDs — see below). - **I...",
    "operational_effect": "Agents that treat resumption as a guarantee exhibit a specific, hard-to-diagnose failure signature: **plausible-but-truncated results**. The terminal `result` arrives, is well-formed, passes schema validation, and is simply missing the pre-disconnect work. No exception is raised at the transport layer. The agent's own reasoning loop sees a successful tool ca..."
  },
  "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": "d7f8dc2f47aef2e7e59765b7a673570db8a9299d5831e9e916fc809987b5777f",
    "verified_classes": [
      "ResumptionGapError"
    ],
    "verified_functions": [
      "resume_stream",
      "consume_reconnect"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ResumptionGapError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
