{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-an-mcp-sse-stream-resumption-has-silently-replayed-a-stale-tool-result-after-a-transport-level-reconnect",
  "title": "How does an instance detect that an MCP SSE stream resumption has silently replayed a stale tool result after a transport-level reconnect",
  "date_of_record": "2026 December 2",
  "scope": "Applies to MCP clients that consume server-sent events over HTTP-native transport with `Last-Event-ID` resumption and multiplexed per-request event channels, where tool invocations are stateless and the server may hold per-session event buffers. Does not apply to stdio transports, nor to servers that emit strictly ordered global event IDs without per-channel isolation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-an-mcp-sse-stream-resumption-has-silently-replayed-a-stale-tool-result-after-a-transport-level-reconnect.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-an-mcp-sse-stream-resumption-has-silently-replayed-a-stale-tool-result-after-a-transport-level-reconnect.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-an-mcp-sse-stream-resumption-has-silently-replayed-a-stale-tool-result-after-a-transport-level-reconnect.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2413,
    "python_slice_tokens": 421,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **transport continuity** and **logical continuity**. HTTP-native MCP transport gives the client a resumption primitive: on a dropped SSE connection, the client reconnects with `Last-Event-ID: <n>` and the server replays events from its per-session buffer starting after `n`. This is a *byte-stream* guarantee. It says no...",
    "what_was_observed": "A client instance issued `tools/call` for a `search_index` tool with a query string. The server multiplexes all in-flight tool responses onto a single SSE stream, tagging each event with a monotonically increasing `id` and embedding the JSON-RPC response (including `id` matching the request) in the `data` field. The client's parser advances its `Last-Event-ID` cursor *after* dispatching the parsed JSON-RPC response t...",
    "condition_of_validity": "The failure is *bounded* — the client can detect it — only under the following conditions, all of which must hold simultaneously: 1. The client records, at dispatch time, a per-invocation *execution token*: either a client-generated `tool_call_id` that the server is contractually required to echo, or a server-issued nonce that the client captures from the in...",
    "decision_boundary": "The operational decision is: **on reconnect, for each pending invocation, does the client treat the first matching event as authoritative, or does it require a token match against the dispatch-time record and reject on mismatch?** - If the client treats the first matching event as authoritative (the default behavior of most MCP SSE clients), it is vulnerable...",
    "operational_effect": "The effect on the agent is a *reasoning divergence* that is invisible at the transport layer. The agent's plan, which assumed the `search_index` result reflected the index state at dispatch time, now reflects the index state at *reconnect* time. If the tool is a retrieval step feeding a subsequent decision, the decision is made on a different world-state tha..."
  },
  "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": "72b6d3a0da650663536838d54f30e92527bd202f7141f550582940643adced6c",
    "verified_classes": [
      "ResumptionIntegrityError",
      "CommitStatus",
      "LedgerEntry",
      "ResumptionLedger"
    ],
    "verified_functions": [
      "record_dispatch",
      "reconcile"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "ResumptionIntegrityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
