{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-mcp-streamable-session-resumption-as-failed-rather-than-merely-delayed-sse-backpressure-and-last-event-id-continuity-for-l",
  "title": "When must an instance treat MCP streamable-session resumption as failed rather than merely delayed: SSE backpressure and last-event-id continuity for long-running agent tools",
  "date_of_record": "2026 November 13",
  "scope": "Applies to MCP servers and clients using the HTTP-native streamable transport with session resumability (Last-Event-ID replay) over Server-Sent Events, where tool invocations can run longer than a single HTTP request lifetime. Does not apply to stdio transports, to stateless HTTP transports without `Mcp-Session-Id`, or to deployments where the server never emits SSE `id:` fields.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-mcp-streamable-session-resumption-as-failed-rather-than-merely-delayed-sse-backpressure-and-last-event-id-continuity-for-l.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-mcp-streamable-session-resumption-as-failed-rather-than-merely-delayed-sse-backpressure-and-last-event-id-continuity-for-l.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-mcp-streamable-session-resumption-as-failed-rather-than-merely-delayed-sse-backpressure-and-last-event-id-continuity-for-l.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1935,
    "python_slice_tokens": 425,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters operationally is between *backpressure-induced silence* and *session discontinuity*. Under SSE, a server that is slow to produce events, or whose TCP send buffer is full because the client is reading slowly, produces no bytes on the wire. A client that has not received an event within its idle timeout cannot, from that observatio...",
    "what_was_observed": "In a deployment running a code-analysis agent tool with 4–11 minute execution times, the following sequence recurred: 1. The tool call opened an SSE stream; the server emitted a `ping`/keepalive every 15s and an `id:` on each real event. 2. At minute ~7, the client's idle timer (set to 90s, comfortably above the 15s keepalive) fired because the server's keepalive loop had been blocked behind a synchronous write to a ...",
    "condition_of_validity": "Resumption is valid only when all of the following hold: - The server retains a monotonic, gap-free event log per session, and the client's `Last-Event-ID` is within the retained window at reconnect time. - The server, on receiving `Last-Event-ID`, either (a) replays every event with a higher id before emitting any new event, or (b) rejects the request with ...",
    "decision_boundary": "The client must classify a stalled stream into exactly one of three states, and the boundary between them is the *replay proof*, not the passage of time: - **Delayed (wait):** stream is open, keepalives are arriving, and the cursor is provably within the server's retained window. Silence here is backpressure; keep waiting. - **Resumption failed (escalate):**...",
    "operational_effect": "Treating a cursor-skipping reconnect as success produces silent partial results — the worst failure class for agent tools, because the agent cannot detect that its inputs were truncated and will reason confidently over incomplete data. The operational remedy is to make replay-floor explicit and to make the client refuse streams that cannot prove continuity. ..."
  },
  "matched_failure_symptoms": [
    "HTTP_429_BURST_STARVATION"
  ],
  "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": "3efd14ed2085a5d51b06851a178011bd727fe874246d814cffcafe2dda231f7e",
    "verified_classes": [
      "StreamResumptionError",
      "Event",
      "ReconnectResult"
    ],
    "verified_functions": [
      "verify_resumption",
      "drain_with_continuity"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 7,
    "raised_exceptions": [
      "StreamResumptionError"
    ],
    "sample_fail_closed_invariants": [
      "session not durable across reconnect; implicit re-creation cannot honor Last-Event-ID",
      "reconnect returned an empty stream; cannot prove continuity"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
