{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-an-mcp-last-event-id-as-a-proof-obligation-rather-than-a-cursor-hint",
  "title": "In what scenarios must an instance treat an MCP `Last-Event-ID` as a proof obligation rather than a cursor hint",
  "date_of_record": "2026 November 25",
  "scope": "Applies to MCP servers and clients using the HTTP-native transport where a single logical session is carried by a streamable SSE response (`text/event-stream`) and resumption is requested via `Last-Event-ID` plus a session identifier header. Does not apply to stdio transport, nor to stateless request/response MCP deployments where no `Mcp-Session-Id` is issued.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-an-mcp-last-event-id-as-a-proof-obligation-rather-than-a-cursor-hint.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-an-mcp-last-event-id-as-a-proof-obligation-rather-than-a-cursor-hint.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-an-mcp-last-event-id-as-a-proof-obligation-rather-than-a-cursor-hint.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2496,
    "python_slice_tokens": 464,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The MCP streamable HTTP transport conflates two distinct objects under one header name. `Last-Event-ID` is, on the wire, a *cursor* — an opaque string the server emitted earlier. But the resumption contract the client actually needs is a *proof obligation*: \"the events I have not yet seen, delivered exactly once, with no gap and no duplication, in a session ...",
    "what_was_observed": "A long-running agent task held an MCP session against a tool server. The server emitted events on the SSE stream with `id:` fields set to a monotonic per-session counter (`\"1\"`, `\"2\"`, …). The client persisted `Last-Event-ID` after each successfully parsed event. The task ran for roughly nine minutes; the underlying tool call was a multi-step code-search that streamed partial results. At T+7:12 the server process was...",
    "condition_of_validity": "The invariant that makes `Last-Event-ID` resumption sound is a *triple binding*: the cursor is valid only if (a) the session ID it was minted under is still live on the server, (b) the server can produce, from its retained buffer, every event with sequence strictly greater than the cursor, and (c) the server can *prove* (a) and (b) rather than infer them fro...",
    "decision_boundary": "The boundary between \"resume\" and \"restart\" must be decided by the server and *signaled explicitly*, not inferred by the client from event ID shape. Concretely: - On a resume request, the server performs a three-way classification: `SESSION_LIVE_AND_BUFFERED` (cursor is within the retained range), `SESSION_LIVE_BUFFER_TRUNCATED` (session valid, but `cursor+1...",
    "operational_effect": "The practical consequence is that HTTP-native MCP resumption is only safe when the server can *prove* continuity and the client *demands* it. Without the triple binding, the transport degrades from \"exactly-once event delivery across reconnects\" to \"at-least-once with silent duplication across epoch boundaries and at-most-once with silent gaps across buffer ..."
  },
  "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": "394ec4e7ac768463bf60144c081fcf8133634bc07c23efe4744387bd4b9f5b16",
    "verified_classes": [
      "ResumptionContinuityError",
      "SessionEpoch",
      "Cursor"
    ],
    "verified_functions": [
      "validate_resume",
      "resume_or_fail"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 11,
    "raised_exceptions": [
      "ResumptionContinuityError"
    ],
    "sample_fail_closed_invariants": [
      "resume requested without Last-Event-ID; cannot establish continuity baseline",
      "server cannot report retained buffer range; gap undetectable",
      "no first event observed after resume; continuity unproven",
      "first resumed event carries a different epoch than the verified session"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
