{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-mcp-streamable-http-last-event-id-resumption-as-unsafe-when-sse-backpressure-has-already-forced-the-server-to",
  "title": "In what scenarios must an instance treat MCP Streamable-HTTP `Last-Event-ID` resumption as unsafe when SSE backpressure has already forced the server to drop frames from the replay buffer",
  "date_of_record": "2026 November 30",
  "scope": "Applies to MCP clients and servers using the Streamable HTTP transport (HTTP POST for requests, `text/event-stream` response with `id:`-tagged events and `Last-Event-ID` resumption) where the server maintains a bounded per-session replay buffer. Does not apply to stdio transports, nor to SSE streams where no resumption is offered and every reconnect is treated as a fresh session.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-streamable-http-last-event-id-resumption-as-unsafe-when-sse-backpressure-has-already-forced-the-server-to.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-streamable-http-last-event-id-resumption-as-unsafe-when-sse-backpressure-has-already-forced-the-server-to.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-streamable-http-last-event-id-resumption-as-unsafe-when-sse-backpressure-has-already-forced-the-server-to.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1788,
    "python_slice_tokens": 172,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The MCP Streamable HTTP spec treats `Last-Event-ID` resumption as a *continuity* mechanism: the client reconnects, presents the last event ID it durably observed, and the server replays everything after that ID. This is safe only under the implicit assumption that the replay buffer is a faithful log of everything the client might have missed. That assumption...",
    "what_was_observed": "A tool-calling agent session over Streamable HTTP. The client issues `tools/call` via POST; the server responds with an SSE stream carrying progress notifications (`notifications/progress`), partial content deltas, and finally the `tools/call` result, each tagged with a monotonically increasing `id:`. The replay buffer is a ring of the last N=256 events per session, with a TTL. Trigger condition: the agent's host pro...",
    "condition_of_validity": "`Last-Event-ID` resumption is a valid continuity mechanism **iff** all of the following hold: 1. The server's replay buffer is a superset of the set of events the client might have failed to observe. This requires the buffer to record events *at generation time*, before any backpressure shedding — i.e., the drop policy must shed from the *socket write path* ...",
    "decision_boundary": "The boundary is the **buffer floor vs. the client's acknowledged ID**, evaluated at reconnect: - If `Last-Event-ID ≥ buffer_floor - 1` and the buffer is a faithful generation-time log → resume, trust continuity. - If `Last-Event-ID < buffer_floor - 1` → a gap exists. The server *must* signal it; the client *must* treat any stream that begins at `buffer_floor...",
    "operational_effect": "An agent that trusts a gap-bearing resumption as continuous will: under-count progress and mis-time out long tools; reassemble truncated streaming output as if complete; and, worst, treat a partially-observed `tools/call` result as authoritative when the result event itself was the one evicted (the client then waits for a result that will never replay, times..."
  },
  "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": "d37e2c73cdff71c157efa5e75926612ca734060f8379a16f266a33c0270f523b",
    "verified_classes": [
      "StreamResumptionGapError"
    ],
    "verified_functions": [
      "validate_resumption"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "StreamResumptionGapError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
