{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-abandon-mcp-http-native-transport-session-resumption-rather-than-retry-the-last-event-id-stream",
  "title": "When must an instance abandon MCP HTTP-native transport session resumption rather than retry the `Last-Event-ID` stream",
  "date_of_record": "2026 November 15",
  "scope": "Applies to MCP servers and clients using the HTTP-native transport (streamable HTTP with SSE event streams, `Mcp-Session-Id`, and `Last-Event-ID` resumption) where events are buffered per session and replayed on resume. Does not apply to stdio transport, nor to stateless HTTP request/response deployments that do not issue session identifiers or event IDs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-mcp-http-native-transport-session-resumption-rather-than-retry-the-last-event-id-stream.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-mcp-http-native-transport-session-resumption-rather-than-retry-the-last-event-id-stream.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-mcp-http-native-transport-session-resumption-rather-than-retry-the-last-event-id-stream.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1588,
    "python_slice_tokens": 330,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Session resumption and backpressure are frequently conflated because both surface as a stalled or failed `GET` stream. They are different failure surfaces: - **Resumption failure** is an *identity* problem: the client presents a `Last-Event-ID` that the server cannot map to a replayable position in the session's event history (evicted, never assigned, or bel...",
    "what_was_observed": "In a deployment where each MCP session kept a bounded replay ring (capacity N events) to support `Last-Event-ID` resumption, the following sequence was reproduced: 1. Client opens `GET /mcp` with `Mcp-Session-Id: S` and no `Last-Event-ID`; server streams events `e1..eN` then continues live. 2. Client's reader stalls (slow consumer, GC pause, or blocked tool handler). The server's per-session write buffer fills. The s...",
    "condition_of_validity": "The rule \"retry `Last-Event-ID` until success\" is valid **only** when all of the following hold: - The server guarantees replay retention at least as long as the client's maximum reconnect-plus-backoff window (i.e., ring capacity × emission rate ≥ max client stall duration). - Event IDs are monotonic and scoped to the session, not the connection. - The serve...",
    "decision_boundary": "On a failed resume attempt, classify before acting: - **`404`/`410` with an explicit \"event id not retained\" body, or a cursor older than the server's advertised retention horizon** → the cursor is *unreplayable*. Abandon resumption. Do not retry the same `Last-Event-ID`. Re-initialize the session (new `Mcp-Session-Id`) and re-fetch state via a tool/resource...",
    "operational_effect": "Clients that conflate the two exhibit a characteristic pathology: a slow consumer triggers backpressure, the reconnect-on-idle behavior triggers an eviction, and the retry loop pins the server in a state where every resume fails while the client believes it is recovering. The session never makes progress, and server-side stream contexts leak. The correct pos..."
  },
  "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": "5fa761be9c1580d3931cd640e098e77dd93635e27e8afb89761fe35d351f5905",
    "verified_classes": [
      "UnreplayableCursorError",
      "SessionWedgedError",
      "ResumeOutcome",
      "ResumeResponse"
    ],
    "verified_functions": [
      "classify",
      "resume_stream",
      "handle_resume_or_abandon"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SessionWedgedError",
      "UnreplayableCursorError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
