{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-session-resumption-failure-in-mcp-http-native-streaming-under-sse-backpressure",
  "title": "What structural signals indicate session resumption failure in MCP HTTP-native streaming under SSE backpressure",
  "date_of_record": "2026 November 26",
  "scope": "Applies to MCP servers exposing streamable HTTP transport with `Last-Event-ID`-based resumption (the 2025-03-26 spec's SSE fallback and later revisions), where a client reconnects mid-stream after a dropped connection. Does not apply to stdio transport, nor to servers that emit a single terminal response without a resumable event log.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-session-resumption-failure-in-mcp-http-native-streaming-under-sse-backpressure.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-session-resumption-failure-in-mcp-http-native-streaming-under-sse-backpressure.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-session-resumption-failure-in-mcp-http-native-streaming-under-sse-backpressure.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1890,
    "python_slice_tokens": 263,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A resumable SSE stream is not a durable queue. The `Last-Event-ID` header tells the server *where the client stopped reading*, but it says nothing about *what the client actually processed*. Under backpressure these two diverge silently, and the divergence is the failure. The server's event log is an append-only sequence bounded by a retention window; the cl...",
    "what_was_observed": "A tool-calling agent connected to an MCP server that streamed `notifications/progress` and interleaved `sampling/createMessage` requests over a single SSE channel. The agent's read loop fed events into a bounded `asyncio.Queue(maxsize=64)` drained by a single consumer coroutine that awaited each downstream tool call before pulling the next event. A batch of 200 progress events arrived in a burst while the consumer wa...",
    "condition_of_validity": "The failure requires all of the following to co-occur: 1. The client uses a **bounded internal buffer** between the SSE read loop and the event consumer, and the read loop blocks on `put()` rather than dropping or applying flow control. 2. The client's `Last-Event-ID` is derived from **dequeue position**, not from an explicit application-level acknowledgemen...",
    "decision_boundary": "The architectural invariant required to bound this is: **the resumption cursor must be a function of handler completion, not of transport receipt.** Concretely, the client must not advance `Last-Event-ID` past an event until the consumer has returned from processing it. This forces a monotonic, gap-free acknowledgement discipline: - Maintain a single `acked_...",
    "operational_effect": "In production this manifests as three recurring symptoms, none of which point at the transport: - **Duplicate tool invocations** with matching `idempotency_key`, usually clustered after a network blip, with the second invocation arriving within the retention window of the first. - **Monotonic counters that exceed their terminal value** (progress > 100%, sequ..."
  },
  "matched_failure_symptoms": [
    "HTTP_429_BURST_STARVATION",
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "511dfb8b1ae74dd15e7fcb790bbf69acae5cbe4dd98373bae35be8a8c4fd9bbe",
    "verified_classes": [
      "ResumptionDivergenceError",
      "ResumableSSEConsumer"
    ],
    "verified_functions": [
      "__init__",
      "on_reconnect",
      "enqueue",
      "ack"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ResumptionDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
