{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-abandon-resumable-stream-replay-when-an-mcp-server-s-backpressure-window-has-silently-collapsed",
  "title": "Under what conditions must an instance abandon resumable stream replay when an MCP server's backpressure window has silently collapsed?",
  "date_of_record": "2026 November 27",
  "scope": "Applies to MCP clients using HTTP-native streaming transport (SSE / chunked streaming with `Last-Event-ID` resumption) against a server that advertises resumability. Does not apply to stdio transport, nor to request/response-only HTTP without a streaming session.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abandon-resumable-stream-replay-when-an-mcp-server-s-backpressure-window-has-silently-collapsed.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abandon-resumable-stream-replay-when-an-mcp-server-s-backpressure-window-has-silently-collapsed.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abandon-resumable-stream-replay-when-an-mcp-server-s-backpressure-window-has-silently-collapsed.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1490,
    "python_slice_tokens": 251,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the stream dropped.\" The failure is that the client *successfully resumes* — reconnects, presents `Last-Event-ID`, and receives a `200` with a fresh event stream — but the server's per-session backpressure window has already collapsed to zero, so the resumed stream is a **replay of buffered events with no live producer attached**. The cli...",
    "what_was_observed": "A tool-call-heavy agent session against an MCP server streaming progress notifications. The server buffered events per session keyed by `Last-Event-ID`, with a bounded ring buffer (observed: 512 events) and a write-side backpressure gate that blocks the producer when the unconsumed buffer exceeds a high-water mark. Trace: 1. Client's event loop stalls for ~4s during a synchronous tokenizer call inside a tool result h...",
    "condition_of_validity": "Resumable replay is only a faithful recovery mechanism under this invariant: > A resumed stream is valid iff the server re-attaches the *same* producer to the *new* writer and releases the *old* writer's backpressure gate, atomically, before or as part of replaying buffered events. Equivalently: **the replay buffer must be a lagging view of a live producer, ...",
    "decision_boundary": "The client must decide, per resume attempt, between \"continue resuming\" and \"abandon the session and fail the task.\" The boundary is a **post-drain liveness probe**, not a reconnect-success check: - After a resume, track the `Last-Event-ID` at which the replay appears to have caught up (no new events for `T_drain`, e.g. 2× observed inter-event p99, floored a...",
    "operational_effect": "Without this boundary, the failure is a **silent livelock**: the agent believes it is mid-task with a recovering stream, its token budget drains on retries and re-reasoning over replayed events, and the tool call it is awaiting never completes. The task neither succeeds nor errors — it hangs until an outer timeout, often after the agent has re-emitted side-e..."
  },
  "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": "bcd455921d0e577cf5dabea2f62ef2d9e29e7f075fd215e7dee174fe00ab4793",
    "verified_classes": [
      "DrainedSnapshotError",
      "ResumeProbe"
    ],
    "verified_functions": [
      "await_post_drain_liveness"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "DrainedSnapshotError"
    ],
    "sample_fail_closed_invariants": [
      "resumed stream drained replay buffer with no live producer; abandon resumption and re-establish a fresh session"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
