{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-abandon-mcp-streamable-session-resumption-and-force-a-fresh-sse-negotiation-after-a-last-event-id-replay-gap",
  "title": "In what scenarios must an instance abandon MCP streamable-session resumption and force a fresh SSE negotiation after a `Last-Event-ID` replay gap",
  "date_of_record": "2026 November 26",
  "scope": "Applies to MCP clients using the HTTP-native streamable transport with `Last-Event-ID`-based resumption against a server that also exposes the legacy SSE endpoint as a fallback. Does not apply to pure stdio transports or to servers that never emit event IDs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-abandon-mcp-streamable-session-resumption-and-force-a-fresh-sse-negotiation-after-a-last-event-id-replay-gap.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-abandon-mcp-streamable-session-resumption-and-force-a-fresh-sse-negotiation-after-a-last-event-id-replay-gap.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-abandon-mcp-streamable-session-resumption-and-force-a-fresh-sse-negotiation-after-a-last-event-id-replay-gap.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1918,
    "python_slice_tokens": 336,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the stream dropped.\" Streams drop constantly and resumption is designed for that. The failure is a **silent replay gap**: the client reconnects with `Last-Event-ID: N`, the server accepts the request (HTTP 200), resumes the stream, and begins emitting events at `N+k` where `k > 1` — or begins emitting a *different* logical sequence entire...",
    "what_was_observed": "A client agent held an MCP session over streamable HTTP, mid-way through a long `tools/call` whose result was being streamed as a sequence of `notifications/progress` events (event IDs 40–97) followed by a terminal `result` (event ID 98). The connection dropped at event 61 due to a load-balancer idle timeout (90s, no keepalive configured server-side). The client reconnected with `Last-Event-ID: 61`. The server return...",
    "condition_of_validity": "Resumption via `Last-Event-ID` is only sound when **all four** of the following hold simultaneously: 1. **Monotonic, gap-free retention.** The server guarantees that if it retains event `M`, it retains every event in `[Last-Event-ID+1, M]`, or it refuses the resumption. A ring buffer that evicts from the middle-to-oldest while retaining newer events violates...",
    "decision_boundary": "The client's resumption decision must be a **strict** check, not a permissive one. The boundary: - **Resume** iff the first event after reconnect has `id == last_event_id + 1` (contiguous) **and** the session token in the response headers matches the token held before the drop. Both conditions are local, cheap, and require no server cooperation beyond what t...",
    "operational_effect": "An agent that enforces the strict boundary pays a bounded, visible cost: on any gap or namespace reuse, it discards the streamable session and opens a fresh SSE connection, which requires re-issuing the in-flight `tools/call` (or resuming from the last *application-level* checkpoint, if the tool is idempotent and checkpointed). This is slower and may duplica..."
  },
  "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": "4b6ed03c2fa515d879349597da6c0415b7822b39e50ccf2736929419c33fe720",
    "verified_classes": [
      "SessionContinuityViolation",
      "StreamState"
    ],
    "verified_functions": [
      "resume_or_renegotiate",
      "apply_resumption"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SessionContinuityViolation"
    ],
    "sample_fail_closed_invariants": [
      "resumption accepted but no replay event within timeout"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
