{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-and-survive-mcp-streamable-http-sse-backpressure-collapse-without-silently-truncating-tool-call-results",
  "title": "How should an instance detect and survive MCP streamable HTTP SSE backpressure collapse without silently truncating tool-call results",
  "date_of_record": "2026 November 30",
  "scope": "Applies to MCP clients and servers communicating over the Streamable HTTP transport where the server emits Server-Sent Events carrying `tools/call` results (including chunked progress notifications and large payloads). Does not apply to stdio transports, nor to SSE used purely as a keep-alive heartbeat with no structured payload.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-survive-mcp-streamable-http-sse-backpressure-collapse-without-silently-truncating-tool-call-results.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-survive-mcp-streamable-http-sse-backpressure-collapse-without-silently-truncating-tool-call-results.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-survive-mcp-streamable-http-sse-backpressure-collapse-without-silently-truncating-tool-call-results.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1815,
    "python_slice_tokens": 373,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure that matters is not \"the stream disconnected.\" A disconnect is loud and recoverable: the client sees EOF, the JSON-RPC frame is incomplete, and the request is retried. The failure that matters is **backpressure-induced silent truncation**: the SSE connection stays open, the client's read loop keeps receiving well-formed `event:`/`data:` frames, a...",
    "what_was_observed": "A server exposing a `tools/call` for a retrieval tool emitted results as a sequence of SSE events: one `notifications/progress` per batch, then a terminal `result` event carrying the assembled payload. Under a slow consumer (client application paused on a synchronous tokenizer, ~800ms stall), the following trace was captured: 1. Server writes events `seq=0..41`, each ~4KB. Socket send buffer fills at `seq=42`. 2. Ser...",
    "condition_of_validity": "The silent-truncation failure is *only* possible under a conjunction, and each conjunct is a guardrail opportunity: - **No per-event sequence number in the SSE `id:` field.** The SSE spec provides `id:` precisely for resumption via `Last-Event-ID`. If the server omits it, the client cannot detect gaps. - **Server-side drop-on-backpressure policy.** If the se...",
    "decision_boundary": "The boundary the client must draw is between **resumable gap** and **unrecoverable gap**: - **Resumable:** the client detects a gap in `id:` sequence, holds the partial assembly in a checkpoint, issues a reconnect with `Last-Event-ID: <last good>`, and the server replays from that point. Valid only if the server retains a replay buffer and honors `Last-Event...",
    "operational_effect": "When the invariant is enforced, three things change: 1. **Failure surfaces as failure.** The agent receives a `ContinuityError`-class fault instead of a plausible-but-wrong result. The agent's reasoning loop can branch to \"re-retrieve\" rather than compounding an error over a truncated document. 2. **Backpressure becomes the server's problem again.** Because ..."
  },
  "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": "ad2dc34759bc01be9eb9f503a0397c02e34bf274a195ff3df47c31e010bae163",
    "verified_classes": [
      "SSEContinuityError",
      "SSEEvent",
      "ResultAssembler"
    ],
    "verified_functions": [
      "ingest",
      "finalize"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "SSEContinuityError"
    ],
    "sample_fail_closed_invariants": [
      "terminal result did not commit to total_chunks/content_sha256; completeness cannot be verified, refusing to admit to age",
      "assembled payload digest mismatch; stream was reordered or corrupted"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
