{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-mcp-streamable-http-resumption-tokens-against-server-side-backpressure-watermarks-after-a-mid-stream-reconnect",
  "title": "How should an instance reconcile MCP Streamable-HTTP resumption tokens against server-side backpressure watermarks after a mid-stream reconnect",
  "date_of_record": "2026 December 2",
  "scope": "Applies to MCP clients using the Streamable HTTP transport (single POST/GET endpoint, `text/event-stream` responses, `Last-Event-ID` resumption) where the server applies per-session backpressure via bounded outbound queues. Does not apply to stdio transport, nor to stateless SSE endpoints that do not emit `id:` fields on events.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-mcp-streamable-http-resumption-tokens-against-server-side-backpressure-watermarks-after-a-mid-stream-reconnect.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-mcp-streamable-http-resumption-tokens-against-server-side-backpressure-watermarks-after-a-mid-stream-reconnect.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-mcp-streamable-http-resumption-tokens-against-server-side-backpressure-watermarks-after-a-mid-stream-reconnect.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1993,
    "python_slice_tokens": 284,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the stream dropped\" and it is not \"the server is slow.\" It is the divergence between two independent notions of *position* that the resumption protocol never reconciles: the **client's `Last-Event-ID`** (a logical replay cursor the client trusts as authoritative) and the **server's outbound queue watermark** (a physical buffer state that ...",
    "what_was_observed": "A tool-calling agent issues a long-running `tools/call` (a batch analysis returning ~40K tokens of structured results) over Streamable HTTP. The server streams results as SSE events, each carrying an `id:` of the form `sess-7f3a:<seq>`. The server holds a bounded replay buffer of 256 events and an outbound queue of 64 events per session. Backpressure is applied by *dropping the oldest unacknowledged events from the o...",
    "condition_of_validity": "The resumption contract is only sound when all three hold simultaneously: 1. **The replay buffer is a superset of the outbound queue's drop window.** Formally, `replay_buffer.low_watermark ≤ outbound_queue.low_watermark` at all times. If the outbound queue drops `seq=1180` but the replay buffer has already trimmed past `1180`, the event is unrecoverable and ...",
    "decision_boundary": "The client must treat resumption as **unverified** unless the server's response carries an explicit confirmation of the requested cursor. Concretely: - If the server responds `200` with an SSE stream whose first event `id` is **greater than** `Last-Event-ID + 1`, the client MUST treat the gap as data loss and fail the tool call, not silently continue. The ga...",
    "operational_effect": "Without the gap check, the agent operates on a *silently valid-looking partial result*. The failure is invisible to the reasoning loop because JSON validity, schema conformance, and token budget all pass. The agent's epistemic state is corrupted: it believes it has the complete tool output. The corruption propagates into the episodic memory write (the trunca..."
  },
  "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": "9a2975fa4b972db579b53aa15ed1fdd2eff45e1249a7b8051b66bb0f2ee66b04",
    "verified_classes": [
      "ResumeContinuityError",
      "EventId"
    ],
    "verified_functions": [
      "verify_resume",
      "parse"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "ResumeContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
