{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-mcp-streamable-http-session-resumption-as-unsafe-after-a-backpressure-stall-and-how-does-the-resume-bound",
  "title": "Under what conditions must an instance treat MCP streamable-HTTP session resumption as unsafe after a backpressure stall, and how does the resume boundary get corrupted",
  "date_of_record": "2026 November 23",
  "scope": "Applies to MCP clients and servers using the streamable-HTTP transport with `Last-Event-ID`-based resumption and per-session backpressure (SSE event buffering). Does not apply to stdio transport, nor to stateless one-shot HTTP request/response without event streams.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-mcp-streamable-http-session-resumption-as-unsafe-after-a-backpressure-stall-and-how-does-the-resume-bound.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-mcp-streamable-http-session-resumption-as-unsafe-after-a-backpressure-stall-and-how-does-the-resume-bound.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-mcp-streamable-http-session-resumption-as-unsafe-after-a-backpressure-stall-and-how-does-the-resume-bound.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1713,
    "python_slice_tokens": 259,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The streamable-HTTP transport gives an agent two superficially similar recovery paths that are *not* interchangeable: (1) **resumption**, where the client reconnects with `Last-Event-ID` and the server replays buffered SSE events from that cursor; and (2) **re-initialization**, where the client discards the session and issues a fresh `initialize`. The distin...",
    "what_was_observed": "A long-running tool-call stream (server streaming partial results for a multi-step retrieval task) hit a client-side consumer stall: the agent's tool-result handler blocked on a slow downstream verification step, so the SSE read loop stopped draining the socket. The server's per-session buffer (bounded, e.g. 256 events) filled. The server's backpressure policy was \"drop oldest, keep newest\" — a common default — but i...",
    "condition_of_validity": "Resumption is safe **iff** all of the following hold at the moment of reconnect: 1. The server retains an explicit `resume_floor_id` (the lowest event ID still in buffer) and advertises it — in the `initialize`/session metadata or in a response header on reconnect. 2. The client's `Last-Event-ID` is `>= resume_floor_id`. If it is `< resume_floor_id`, the gap...",
    "decision_boundary": "The boundary is a single comparison the client must make before honoring a resume: - **Above the floor, contiguous, no gap** → resume; replay is a faithful continuation. - **At or above the floor, but a gap exists without a `gap` event** → do **not** silently stitch. The stream is corrupt; the agent must treat the tool call as *partially observed* and either...",
    "operational_effect": "An agent that resumes across a backpressure-evicted gap does not crash. It *continues*, which is worse. The observable signature is a downstream synthesis step that references an entity the stream never delivered, producing a confident but unsupported claim. Because the transport reported success (HTTP 200, valid SSE, monotonic IDs), no error propagates to t..."
  },
  "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": "87f9321cccc369d7d186294a8fd38a05b99e78776e5540722142f8e106c95911",
    "verified_classes": [
      "ResumeBoundaryViolation"
    ],
    "verified_functions": [
      "verify_resume_safety"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ResumeBoundaryViolation"
    ],
    "sample_fail_closed_invariants": [
      "server did not advertise resume_floor_id; resumption is unverifiable and must be treated as unsafe"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
