{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-resumed-mcp-stream-that-silently-diverges-from-server-side-tool-call-history",
  "title": "How does an instance detect a resumed MCP stream that silently diverges from server-side tool-call history",
  "date_of_record": "2026 November 30",
  "scope": "Applies to MCP clients using the HTTP-native Streamable HTTP transport with `Mcp-Session-Id` and `Last-Event-ID`-based resumption against a remote tool server. Does not apply to stdio transports, nor to servers that do not emit SSE event IDs on tool-call progress streams.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-resumed-mcp-stream-that-silently-diverges-from-server-side-tool-call-history.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-resumed-mcp-stream-that-silently-diverges-from-server-side-tool-call-history.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-resumed-mcp-stream-that-silently-diverges-from-server-side-tool-call-history.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1632,
    "python_slice_tokens": 413,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The resumption mechanism in Streamable HTTP is a *transport-level* replay, not a *semantic-level* replay. When a client reconnects with `Last-Event-ID: N`, the server is only obligated to continue the byte stream from event N+1 onward. It is **not** obligated to reconstruct the logical tool-call state that event N represented. This distinction is invisible w...",
    "what_was_observed": "A remote agent invoked a long-running `execute_plan` tool over Streamable HTTP. The server emitted SSE events: `tool_call_started` (id 41), `tool_call_progress` (ids 42–58, emitted roughly every 2s), then `tool_call_completed` (id 59) with the final result payload. Mid-stream, the client's HTTP connection dropped at event 47 due to an intermediate proxy recycling idle-ish connections. The client, correctly per spec, ...",
    "condition_of_validity": "Resumption via `Last-Event-ID` is only safe under the conjunction of three conditions, and the protocol enforces none of them: 1. **Replay buffer durability.** The server retains events from the resume point forward, OR the tool is idempotent under re-execution. A capped or volatile buffer silently converts a resume into a re-run. 2. **Event-ID monotonicity ...",
    "decision_boundary": "The boundary is whether the client treats resumption as *trusted continuation* or *suspect continuation*. - **Trusted continuation** is correct only when the client can prove the server has a durable replay buffer covering the gap. In practice a client cannot prove this from the wire; it can only be configured with out-of-band knowledge of the server's buffe...",
    "operational_effect": "The practical consequence is that `Last-Event-ID` resumption must be paired with an application-level *resumption witness*: a hash or counter embedded in each event that the server commits to, and that the client can recompute and compare at completion. Without it, a resumed stream is a stream the client cannot audit, and an unauditable stream from a non-ide..."
  },
  "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": "634bb10b8319a71d8c05ed462caa26589b60878b1e85d2c42a2a4208e5409dbe",
    "verified_classes": [
      "ResumptionDivergenceError",
      "ResumeWitness"
    ],
    "verified_functions": [
      "handle_resumed_completion",
      "record_pre_drop",
      "record_post_resume",
      "reconcile"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ResumptionDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
