{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-draw-the-resumption-boundary-when-an-mcp-server-migrates-from-sse-to-streamable-http-and-a-client-replays-a-stale-last-event-id",
  "title": "Where must an instance draw the resumption boundary when an MCP server migrates from SSE to streamable HTTP and a client replays a stale `Last-Event-ID`?",
  "date_of_record": "2026 December 2",
  "scope": "Applies to MCP clients and servers transitioning from the legacy HTTP+SSE transport (two-endpoint: GET event stream + POST message endpoint) to the streamable HTTP transport with `Mcp-Session-Id` and resumable streams via `Last-Event-ID`. Does not cover stdio transport, in-process transports, or WebSocket-based custom transports.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-resumption-boundary-when-an-mcp-server-migrates-from-sse-to-streamable-http-and-a-client-replays-a-stale-last-event-id.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-resumption-boundary-when-an-mcp-server-migrates-from-sse-to-streamable-http-and-a-client-replays-a-stale-last-event-id.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-resumption-boundary-when-an-mcp-server-migrates-from-sse-to-streamable-http-and-a-client-replays-a-stale-last-event-id.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1771,
    "python_slice_tokens": 378,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The legacy SSE transport and the streamable HTTP transport both expose a resumption token (`Last-Event-ID`), but they bind that token to **different continuity domains**. In SSE, `Last-Event-ID` is a per-connection cursor into a single long-lived event stream owned by one GET request; the server is expected to replay events after that ID on the *same* logica...",
    "what_was_observed": "A reference MCP server was migrated from the SSE transport to streamable HTTP. The server retained backward compatibility: it accepted `Last-Event-ID` on `GET /mcp` and, if the header was present, attempted replay from an in-memory ring buffer keyed by event ID. A client agent had been running against the SSE endpoint with session `sse-7f3a`, holding `Last-Event-ID: 4821`. The server was redeployed. The client's reco...",
    "condition_of_validity": "A `Last-Event-ID` replay is only valid when all of the following hold simultaneously: 1. The `Last-Event-ID` was minted by the **same stream** identified by the current `(Mcp-Session-Id, stream)` binding the server resolves on this request. 2. The server's event-ID space for that stream is **monotonic and never reset** across the lifetime of the session, inc...",
    "decision_boundary": "The boundary is: **on any streamable-HTTP reconnect where the presented `Last-Event-ID` is not found in the current stream's replay buffer, the server MUST NOT fall through to \"stream new events with fresh IDs.\"** It must choose one of two explicit outcomes: - If the `(Mcp-Session-Id, stream)` binding is still live and the cursor is simply older than the buf...",
    "operational_effect": "For the agent, the observable effect was a hang on a `tools/call` whose result notification was emitted with event ID `2` (below the client's stored `4821`) and discarded. The agent's tool-call timeout was 300s; the hang consumed the full window and then the agent retried the tool call, producing a duplicate side effect on the downstream tool. The duplicate ..."
  },
  "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": "9039568e3103ddd4601d33613ce6556dd829d9a7d6b135ce4a40d883bb357091",
    "verified_classes": [
      "ResumptionCursorMismatch",
      "StreamableSession"
    ],
    "verified_functions": [
      "resume_stream",
      "handle_reconnect",
      "__init__",
      "emit"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ResumptionCursorMismatch"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
