{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-sse-event-id-monotonicity-against-mcp-session-resumption-to-avoid-silent-tool-call-replay-loss-under-backpressure",
  "title": "Where must an instance reconcile SSE event-ID monotonicity against MCP session resumption to avoid silent tool-call replay loss under backpressure",
  "date_of_record": "2026 November 30",
  "scope": "Applies to MCP servers and clients using the HTTP-native transport (Streamable HTTP / SSE) where `Last-Event-ID`-based resumption is combined with per-session backpressure. Does not apply to stdio transport, nor to stateless HTTP request/response MCP without event streams.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-sse-event-id-monotonicity-against-mcp-session-resumption-to-avoid-silent-tool-call-replay-loss-under-backpressure.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-sse-event-id-monotonicity-against-mcp-session-resumption-to-avoid-silent-tool-call-replay-loss-under-backpressure.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-sse-event-id-monotonicity-against-mcp-session-resumption-to-avoid-silent-tool-call-replay-loss-under-backpressure.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1711,
    "python_slice_tokens": 270,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the SSE connection dropped.\" Connections drop constantly and resumption is designed for that. The failure is that **the resumable event log and the backpressure buffer are governed by two different, unsynchronized cursors**: the client resumes from `Last-Event-ID = N`, but the server's backpressure layer has already *dropped* events ...",
    "what_was_observed": "Reproduction on an MCP server exposing `tools/call` over Streamable HTTP, client on a throttled link (200 kbps, 400 ms RTT): 1. Agent issues `tools/call` for a long-running tool (`analyze_repo`). Server assigns event IDs 100, 101, 102… as it streams `notifications/progress` and finally the `result`. 2. Client write buffer fills. The HTTP server's per-connection send queue hits its high-water mark (e.g., 64 KB) and be...",
    "condition_of_validity": "The silent-loss behavior is only possible when **all** of the following hold simultaneously: - The transport is resumable (server issues `id:` on SSE events and honors `Last-Event-ID`). - The server applies backpressure by **dropping** queued events rather than **blocking the producer** or **disconnecting the client with a retriable status**. - The event ID ...",
    "decision_boundary": "The architectural choice is: **on backpressure, do you drop, block, or fail?** The correct boundary for a resumable MCP stream is *fail loudly and resumably*, never *drop silently*. - **Drop** is only acceptable if the dropped events are provably non-essential (e.g., `notifications/message` log spam) *and* the drop is recorded as a gap the client can observe...",
    "operational_effect": "Without the reconciliation, the observable symptom is **agent steps that hang to their own timeout and then either duplicate a tool side effect or abandon a task** — with server logs showing only healthy `200`s. The failure is invisible to standard HTTP monitoring because every request succeeded. It surfaces as elevated tool-call latency, duplicated `tools/c..."
  },
  "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": "943940089e8502c9798ed3395a53301fb9a77f2c1fa77d2665dedece3be457a6",
    "verified_classes": [
      "McpResumeGapError",
      "ReplayStore"
    ],
    "verified_functions": [
      "resume_stream",
      "__init__",
      "enqueue"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "McpResumeGapError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
