{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-re-anchor-an-mcp-streamable-http-session-after-a-server-initiated-sse-reconnect-and-why-the-resume-token-is-not-a-cursor",
  "title": "Where must an instance re-anchor an MCP streamable-HTTP session after a server-initiated SSE reconnect, and why the resume token is not a cursor",
  "date_of_record": "2026 December 2",
  "scope": "Applies to MCP clients using the HTTP-native \"streamable\" transport where the server may issue a `Last-Event-ID`-bearing SSE stream, drop it, and expect client reconnection with `Last-Event-ID`. Does not apply to stdio transport, nor to stateless one-shot HTTP request/response MCP usage where no SSE stream is ever opened.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-re-anchor-an-mcp-streamable-http-session-after-a-server-initiated-sse-reconnect-and-why-the-resume-token-is-not-a-cursor.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-anchor-an-mcp-streamable-http-session-after-a-server-initiated-sse-reconnect-and-why-the-resume-token-is-not-a-cursor.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-anchor-an-mcp-streamable-http-session-after-a-server-initiated-sse-reconnect-and-why-the-resume-token-is-not-a-cursor.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2196,
    "python_slice_tokens": 492,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is often described as \"the client lost the stream and reconnected.\" That framing is wrong and leads to the wrong fix. The real distinction is between two different pieces of state that the resume mechanism conflates: - **Transport position** — the `Last-Event-ID` the server gave you, which lets the server replay SSE frames it already emitted on *...",
    "what_was_observed": "A concrete trace. An agent issues three concurrent JSON-RPC requests over the streamable transport: `tools/call` (id `41`), `tools/call` (id `42`), and `sampling/createMessage` (id `43`, server-initiated, arrives as an SSE frame on the same stream). The server emits frames with monotonically increasing `id:` fields (SSE event IDs), say `e100`..`e140`. At `e140` the client has received the response to `41` (frame `e11...",
    "condition_of_validity": "The replay-by-`Last-Event-ID` mechanism is sound only under the conjunction: 1. The client acknowledges (as `Last-Event-ID`) the highest event ID it has *durably processed into agent state*, not the highest it has *seen on the socket*. Acknowledging on receipt rather than on processing creates the `e137` gap. 2. The server's replay buffer retains all frames ...",
    "decision_boundary": "The boundary the agent must encode: **on every SSE (re)connect, before processing any replayed frame, reconcile the outbound ledger against the resume anchor.** Specifically: - For each ledger entry in `pending`, decide whether its response could have been emitted at or before the acknowledged `Last-Event-ID`. If the agent cannot prove the response is *after...",
    "operational_effect": "An agent that follows the boundary survives server-initiated reconnects with bounded, auditable behavior: orphaned requests are detected at reconcile time (not at timeout), non-idempotent tools are not silently duplicated, and server-initiated sampling/elicitation fires exactly once per logical request. An agent that does not will exhibit three symptoms that..."
  },
  "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": "a19ddd6b6fc176211b3d6759784c3121926b159068b6ceec4c1212950e5da540",
    "verified_classes": [
      "ResumeReconciliationError",
      "RequestState",
      "LedgerEntry",
      "OutboundLedger"
    ],
    "verified_functions": [
      "issue",
      "resolve",
      "acknowledge",
      "reconcile_on_reconnect",
      "resolve_orphans",
      "handle_server_request"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ResumeReconciliationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
