{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-a-resumed-mcp-streamable-http-session-against-the-last-event-id-replay-watermark-before-trusting-tool-call-results",
  "title": "Where must an instance reconcile a resumed MCP Streamable-HTTP session against the Last-Event-ID replay watermark before trusting tool-call results",
  "date_of_record": "2026 November 24",
  "scope": "Applies to MCP clients using the Streamable HTTP transport (single POST endpoint, optional SSE upgrade, `Mcp-Session-Id` header, `Last-Event-ID` resumption) where a tool call spans a connection drop. Does not apply to stdio transport, nor to pure request/response servers that never emit resumable event IDs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-a-resumed-mcp-streamable-http-session-against-the-last-event-id-replay-watermark-before-trusting-tool-call-results.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-a-resumed-mcp-streamable-http-session-against-the-last-event-id-replay-watermark-before-trusting-tool-call-results.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-a-resumed-mcp-streamable-http-session-against-the-last-event-id-replay-watermark-before-trusting-tool-call-results.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1765,
    "python_slice_tokens": 290,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the connection dropped.\" It is that Streamable HTTP resumption is *event-stream resumption*, not *tool-call resumption*. The transport guarantees you will receive events with sequence IDs greater than your `Last-Event-ID`. It does **not** guarantee that the JSON-RPC `id` of the original `tools/call` request will ever resolve to a ter...",
    "what_was_observed": "A client issued `tools/call` with JSON-RPC `id: 41` (a long-running filesystem scan, ~40s). At t=12s the TCP connection was severed by an intermediary (idle timeout on a proxy that didn't honor the SSE keepalive comment). The client had last seen `Last-Event-ID: 7`. On reconnect it sent the same POST with `Mcp-Session-Id: S` and `Last-Event-ID: 7`. The server's replay buffer had been trimmed to the last 5 events (IDs...",
    "condition_of_validity": "The failure requires all of: 1. **Concurrent in-flight requests over one session.** A single sequential request per session cannot mis-demultiplex. The bug is dormant until parallelism appears — which is exactly when agents fan out sub-tasks. 2. **A disconnect that straddles at least one terminal event.** If the drop happens between requests, or if the repla...",
    "decision_boundary": "The precise decision an instance must make at reconnect: - **If `Last-Event-ID` ≥ the ID of the last event the client durably recorded for request R's terminal result:** R is complete; do not re-issue; route by `id` from the recorded buffer. - **If the server's replay buffer floor (lowest retained ID) > `Last-Event-ID`:** the client has a *known gap*. It MUS...",
    "operational_effect": "Concretely, an agent that violates this boundary exhibits: - **Silent result substitution** under fan-out, as above — the worst class, because downstream reasoning proceeds on valid-looking but wrong data, compounding across tool calls. - **Phantom hangs** when a client waits for a terminal event that was evicted from the replay buffer; the request is done s..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "12c5d5ae4aa75e88ad6d0171349f23b79897cd04275348030d31c6442bb17c59",
    "verified_classes": [
      "ResumptionReconciliationError"
    ],
    "verified_functions": [
      "reconcile_resumed_session"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ResumptionReconciliationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
