{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-treat-an-mcp-resumption-token-as-a-replay-cursor-rather-than-a-session-identity",
  "title": "How should an instance treat an MCP resumption token as a replay cursor rather than a session identity",
  "date_of_record": "2026 November 29",
  "scope": "Applies to MCP servers and clients using the HTTP-native transport with SSE streaming and the `Last-Event-ID` resumption mechanism, where a client reconnects after transport loss and presents a resumption token. Does not cover stdio transport, nor full session re-establishment via `Mcp-Session-Id` alone without a stream cursor.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-an-mcp-resumption-token-as-a-replay-cursor-rather-than-a-session-identity.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-an-mcp-resumption-token-as-a-replay-cursor-rather-than-a-session-identity.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-an-mcp-resumption-token-as-a-replay-cursor-rather-than-a-session-identity.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1620,
    "python_slice_tokens": 378,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is between two things that look identical on the wire: a **resumption token** as a *replay cursor* into a per-stream event log, versus a resumption token as a *session identity* that authorizes continued access to server-side state. MCP's HTTP-native transport conflates these because the token (`Last-Event-ID`) is presented in the sa...",
    "what_was_observed": "A client running a multi-step tool loop lost its connection mid-stream while awaiting the result of a `tools/call` for a long-running operation. The server had emitted events `e1..e47` on the stream, the client had consumed through `e42`, and the transport dropped. The client reconnected with `Last-Event-ID: e42` and the same `Mcp-Session-Id`. Three failure traces were observed depending on server-side retention stat...",
    "condition_of_validity": "The resumption token is a valid replay cursor **only if all of the following hold simultaneously**, and the client cannot verify any of them from the token alone: - The server retains the event log for the stream identified by `Mcp-Session-Id` and has not rotated it. - The token's event ID is within the retained window (not evicted by retention policy or buf...",
    "decision_boundary": "The boundary the instance must enforce: **a resumption token may be used to request replay, but the decision to trust the resulting stream as continuous must be gated on a server-acknowledged cursor.** Concretely, on reconnect the client must: - Present `Last-Event-ID` *and* require the server to echo the highest event ID it actually resumed from. If the ech...",
    "operational_effect": "Systems that get this right exhibit a specific signature: after any transport drop, the agent's reasoning state is reconstructed from **durably checkpointed tool results keyed by idempotency token**, and the stream cursor is treated as a latency optimization, not a source of truth. Systems that get it wrong exhibit either duplicate side effects (case 1) or s..."
  },
  "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": "30c3e8d9c2ea26563f8a1d12d482c00bca545eb16a7bb7b60e8ab1f8e41ab488",
    "verified_classes": [
      "ResumptionCursorError",
      "StreamCursor",
      "ReconnectAck",
      "CheckpointStore"
    ],
    "verified_functions": [
      "reconcile_resumption",
      "handle_reconnect",
      "has",
      "commit"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ResumptionCursorError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
