{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-an-mcp-streamable-session-resumption-after-a-202-accepted-and-why-the-sse-upgrade-negotiation-s-last-event-id-cursor-is-n",
  "title": "When must an instance refuse an MCP streamable-session resumption after a 202 Accepted, and why the SSE-upgrade negotiation's `Last-Event-ID` cursor is not a proof of replay",
  "date_of_record": "2026 November 28",
  "scope": "Applies to MCP servers and clients using the HTTP-native \"streamable\" transport, where a client may POST a request, receive a `202 Accepted` with a `Mcp-Session-Id`, and later attempt to resume a server-initiated SSE stream via `GET` with `Last-Event-ID`. Does not apply to stdio transports, to non-streamable HTTP request/response servers, or to resumptions where the server retains a full event log with monotonic, gap-free sequence numbers.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-an-mcp-streamable-session-resumption-after-a-202-accepted-and-why-the-sse-upgrade-negotiation-s-last-event-id-cursor-is-n.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-an-mcp-streamable-session-resumption-after-a-202-accepted-and-why-the-sse-upgrade-negotiation-s-last-event-id-cursor-is-n.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-an-mcp-streamable-session-resumption-after-a-202-accepted-and-why-the-sse-upgrade-negotiation-s-last-event-id-cursor-is-n.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1826,
    "python_slice_tokens": 318,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct things a resumption request can mean, and conflating them is the failure: 1. **Stream re-attachment** — the client wants the *transport* to be reconnected to an existing logical stream so that *future* server-initiated messages (notifications, progress, sampling requests) reach it. This is about liveness. 2. **Replay continuity** — the...",
    "what_was_observed": "A long-running agent task issued a `tools/call` over the streamable transport. The server responded `202 Accepted` with a session header and opened a server-initiated SSE channel on the same session for progress and for a mid-task `sampling/createMessage` request. The agent's SSE reader consumed events `1..47`, but the agent's *state commit* (writing the sampled result and the progress checkpoint into its episodic st...",
    "condition_of_validity": "The resumption is only safe when the client can prove the following, and it must prove it *before* sending `Last-Event-ID`: - **Commit-cursor ≥ receive-cursor at disconnect.** The `Last-Event-ID` the client sends must be the highest event ID that has been *durably committed to agent state*, not the highest *received by the reader*. If the reader is ahead of ...",
    "decision_boundary": "The boundary is a single comparison the client must make at reconnect time, and it is not the comparison most implementations make. Most implementations compare `last_received_event_id` against the server's offered resume point. That is the wrong comparison and it is exactly what produces the silent gap. The correct boundary is: where `server_replay_floor` i...",
    "operational_effect": "Refusing the resume is expensive but bounded; accepting it is cheap but unbounded in blast radius. The operational consequences of the boundary: - **Refuse-and-rederive** costs a re-issued tool call or sampling request and a re-run of the affected reasoning segment. It is local, observable, and terminates. - **Accept-and-assume** produces fabricated tool arg..."
  },
  "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": "0f69cdafe606d0d402bc6cc88b34fe76dd17b928f2f4be0ab986ba98cecdb63d",
    "verified_classes": [
      "UnsafeResumptionError",
      "ResumeContext"
    ],
    "verified_functions": [
      "decide_resumption",
      "resume_stream"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "UnsafeResumptionError"
    ],
    "sample_fail_closed_invariants": [
      "server did not advertise replay floor; cannot prove commit_cursor is within replayable history. Refuse cursor-based resu"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
