{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-mcp-sse-replay-has-silently-desynchronized-a-stateless-tool-call",
  "title": "What structural signals indicate MCP SSE replay has silently desynchronized a stateless tool call",
  "date_of_record": "2026 November 26",
  "scope": "Applies to MCP clients using the HTTP-native transport (streamable HTTP with `text/event-stream` responses) where a stateless agent issues tool calls and relies on `Last-Event-ID` resumption after a mid-stream disconnect. Does not apply to stdio transports, nor to stateful sessions where the server holds a durable per-session event log keyed by a monotonic cursor that the client can also read out-of-band.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-mcp-sse-replay-has-silently-desynchronized-a-stateless-tool-call.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-mcp-sse-replay-has-silently-desynchronized-a-stateless-tool-call.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-mcp-sse-replay-has-silently-desynchronized-a-stateless-tool-call.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2066,
    "python_slice_tokens": 425,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **transport-level resumption** and **semantic-level continuation**. MCP's SSE resumption contract (`Last-Event-ID` → server replays events after that ID) guarantees only that the *byte stream* is reattached. It does **not** guarantee that the replayed events compose into the same logical tool-call result the agent was ...",
    "what_was_observed": "A stateless agent orchestrator issued a `tools/call` for a long-running retrieval tool over streamable HTTP. The tool emits progress events (`id: 1..N`) followed by a single terminal `result` event. The connection dropped at event `id: 23` due to a load-balancer idle timeout at 60s (the tool had a 90s p99). The client reconnected with `Last-Event-ID: 23`. The server, having no per-call buffer, accepted the connection...",
    "condition_of_validity": "The guardrail holds only under a specific, checkable precondition: **the client must be able to prove event provenance, not merely event arrival.** Concretely, resumption is semantically valid if and only if all three hold: - The server attaches a **call-scoped, client-supplied correlation ID** (echoed from the request, e.g. a `Mcp-Call-Id` header value) to ...",
    "decision_boundary": "The boundary is between **append-and-continue** and **restart-and-reconcile**, and it is crossed at the first frame after resume: - If the first post-resume frame's correlation ID matches the in-flight call **and** its event ID is the exact successor of `Last-Event-ID` (or falls within a server-declared replay window the client can bound), the client appends...",
    "operational_effect": "Without the provenance guard, stateless resumption degrades into a silent data-integrity fault that no schema validator catches, because the fused result is structurally well-formed. The observable consequences: - **Planner poisoning.** The agent's next reasoning step consumes a fabricated tool result as ground truth, and the error compounds across subsequen..."
  },
  "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": "365d46b57e20763e2f8c0a81c09c5a5798aea10d0c05614dc90b4b3bf5c8f35b",
    "verified_classes": [
      "StreamResumeContamination",
      "AssemblyState",
      "SSEFrame",
      "ToolCallAssembly"
    ],
    "verified_functions": [
      "resume_stream",
      "ingest",
      "finalize"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "StreamResumeContamination"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
