{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-resumes-an-mcp-session-across-the-sse-to-streamable-http-transport-boundary-and-the-server-s-last-event-id-replay-window",
  "title": "What happens when an instance resumes an MCP session across the SSE-to-streamable-HTTP transport boundary and the server's `Last-Event-ID` replay window has already collapsed",
  "date_of_record": "2026 November 25",
  "scope": "Applies to MCP clients that persist a `Mcp-Session-Id` across reconnects and attempt resumption against a server migrated from the legacy HTTP+SSE transport to streamable HTTP with `Last-Event-ID` replay. Does not apply to pure stdio transports, nor to servers that hold sessions in-memory with unbounded event logs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-session-across-the-sse-to-streamable-http-transport-boundary-and-the-server-s-last-event-id-replay-window.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-session-across-the-sse-to-streamable-http-transport-boundary-and-the-server-s-last-event-id-replay-window.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-session-across-the-sse-to-streamable-http-transport-boundary-and-the-server-s-last-event-id-replay-window.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1823,
    "python_slice_tokens": 203,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The legacy MCP HTTP+SSE transport and the streamable-HTTP transport both expose a resumption surface, but they mean *different things* by it. In legacy SSE, the client opens `GET /sse`, receives an `endpoint` event naming a per-connection POST URL, and every subsequent server→client message flows over that single long-lived event stream. `Last-Event-ID` on r...",
    "what_was_observed": "A client agent was mid-tool-call: it had issued `tools/call` for a long-running retrieval, received SSE event `id: 41` carrying a partial `notifications/progress`, and was awaiting the terminal `result`. The network dropped. On reconnect the client sent: The server had been migrated to streamable HTTP two hours prior. Its replay buffer is keyed by `(Mcp-Session-Id, request_id)`, not by a session-global counter, and t...",
    "condition_of_validity": "The silent-reset behavior is only safe under a condition the migrated deployment did not satisfy: **that the client treats `Last-Event-ID` as advisory and re-derives stream identity from the response, not from the request.** Concretely, a client is only entitled to assume continuity if it can observe one of: 1. The first replayed event's `id` is strictly gre...",
    "decision_boundary": "The boundary is the moment the client decides whether to trust `Last-Event-ID` as a deduplication cursor versus as a *hint*. The rule that bounds the failure: - **If** the client cannot verify that the resumption response belongs to the same request-stream that minted the `Last-Event-ID` (no scoping token, no monotonicity check, no explicit replay-miss signa...",
    "operational_effect": "The practical consequence is that a session that *appears* resumed is a session whose state may be silently forked. The agent's episodic memory of the tool call (events 1–41, cursor advanced) and the server's actual state (re-dispatched call, cursor at zero) diverge, and the divergence is invisible until a downstream consumer validates against ground truth. ..."
  },
  "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": "15938e6b8d54a82be9c3f219cd6e9060bf003e8ecc6f707264336e1fc4bc2175",
    "verified_classes": [
      "ResumptionContinuityError"
    ],
    "verified_functions": [
      "resume_stream"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ResumptionContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
