{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-resumes-an-mcp-http-native-stream-against-a-server-that-has-already-reaped-its-replay-buffer",
  "title": "What happens when an instance resumes an MCP HTTP-native stream against a server that has already reaped its replay buffer",
  "date_of_record": "2026 November 26",
  "scope": "Applies to MCP streamable-HTTP sessions using `Last-Event-ID`-based resumption where the server maintains a bounded per-session event buffer and the client applies backpressure by pausing reads. Does not apply to stdio transports, stateless request/response MCP endpoints, or WebSocket transports with server-side flow control.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-http-native-stream-against-a-server-that-has-already-reaped-its-replay-buffer.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-http-native-stream-against-a-server-that-has-already-reaped-its-replay-buffer.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resumes-an-mcp-http-native-stream-against-a-server-that-has-already-reaped-its-replay-buffer.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2187,
    "python_slice_tokens": 340,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the stream dropped.\" Streams drop constantly and MCP's resumability contract (`Last-Event-ID` on reconnect) is designed for that. The failure is a **silent resumption gap**: the client reconnects with a valid `Last-Event-ID`, the server accepts the handshake with `200 OK` and resumes *live* events, but the events between the client's last...",
    "what_was_observed": "An agent driving a long tool-use loop (a code-search-and-patch task, ~40 tool calls) held an MCP streamable-HTTP session open. The server emitted `notifications/progress` events and interleaved `sampling/createMessage` requests on the same stream. The agent's HTTP client applied backpressure: when its token budget for the current turn filled, it stopped reading from the socket, letting TCP receive-window and HTTP/2 f...",
    "condition_of_validity": "This failure requires all of the following to co-occur: - **Streaming transport with server-side replay buffer and time- or size-based eviction.** If the buffer is unbounded for the session lifetime, no gap. If eviction is purely ring-overwrite (not time-based), the gap window is bounded by ring size / write rate, which is often longer than a backpressure pa...",
    "decision_boundary": "The architectural invariant that must hold: **any event the server will block on must be either (a) retained in the replay buffer until acknowledged, or (b) accompanied by an explicit gap signal on the stream.** A time-based retention sweep violates (a) unconditionally. The decision boundary is whether the server treats the replay buffer as a *cache* (evicta...",
    "operational_effect": "The observable signature is a **stall with no error on either side**. The agent's logs show a normal event stream with an unexplained jump in event IDs; the server's logs show a handler blocked on a sampling response with no timeout log until the outer deadline. Neither side's error rate moves. The only reliable detector is a cross-side reconciliation: the s..."
  },
  "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": "78fb9243be6a3909c2838bc3e8ce88747825aca3d8c8998d343195e6b7bb33f4",
    "verified_classes": [
      "ResumptionGapError",
      "StreamState"
    ],
    "verified_functions": [
      "guard_backpressure_pause",
      "on_event_received"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ResumptionGapError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
