{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-abort-a-streamable-session-resume-after-an-mcp-transport-backpressure-stall-rather-than-replay-the-last-acknowledged-event",
  "title": "When must an instance abort a streamable-session resume after an MCP transport backpressure stall rather than replay the last acknowledged event",
  "date_of_record": "2026 November 28",
  "scope": "Applies to MCP servers/clients using the HTTP-native streamable transport with resumable sessions (SSE event IDs + `Last-Event-ID` replay) where the server enforces per-session write backpressure. Does not apply to stdio transports, stateless HTTP request/response MCP, or sessions without event-ID resumption.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-a-streamable-session-resume-after-an-mcp-transport-backpressure-stall-rather-than-replay-the-last-acknowledged-event.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-a-streamable-session-resume-after-an-mcp-transport-backpressure-stall-rather-than-replay-the-last-acknowledged-event.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-a-streamable-session-resume-after-an-mcp-transport-backpressure-stall-rather-than-replay-the-last-acknowledged-event.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1455,
    "python_slice_tokens": 229,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A resumable MCP session over HTTP is not a message queue with at-least-once delivery. It is a *cursor over a bounded, server-side event buffer* whose durability horizon is defined by the server's retention window — not by the client's acknowledgment state, and not by TCP/HTTP retry semantics. The failure mode that matters is this: a client's stream stalls un...",
    "what_was_observed": "Trigger: a tool-calling agent holds an MCP session open across a long `tools/call` that emits progress notifications at high frequency (e.g., a file-scan tool emitting one SSE event per 2KB chunk). The client's event loop is blocked on a synchronous model inference between reads, so the socket buffer fills, then the server's per-session write queue fills. Trace: 1. Server event buffer cap = 1024 events (typical defau...",
    "condition_of_validity": "The resume is valid only when all of the following hold simultaneously: - The server advertises a retention floor (e.g., `X-MCP-Resume-Floor: <id>`) or rejects out-of-horizon resumes with a typed error (`resume_gap`), not a silent restart. - The client validates `first_replayed_id == last_seen_id + 1` before applying any replayed event to agent state. - Back...",
    "decision_boundary": "The instance must abort-and-reinitialize, not resume, when: - The gap between `last_seen_id` and `first_replayed_id` is `> 1` and no explicit gap error was returned. (Silent gap = corrupted view.) - A backpressure stall exceeds the retention horizon implied by the server's advertised buffer size and event rate. Compute `stall_seconds * event_rate > buffer_ca...",
    "operational_effect": "Treating a 200 resume as authoritative converts a transport-level backpressure event into a *silent semantic state corruption*: the agent believes it has the tool's full output when it has a truncated prefix. The correct posture is to make the resume path *fail closed* — validate the cursor against the horizon before applying any event, and on any doubt, dro..."
  },
  "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": "475c3ef2612d70c00dcaf97b4a658bd9fef6d66fa65c906baab096ca8c870cc9",
    "verified_classes": [
      "ResumeHorizonViolation",
      "ResumeAttempt"
    ],
    "verified_functions": [
      "validate_resume",
      "resume_or_reinitialize"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ResumeHorizonViolation"
    ],
    "sample_fail_closed_invariants": [
      "non-idempotent tool under stall; terminal event unconfirmed"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
