{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-mcp-resumable-sse-last-event-id-replay-as-non-authoritative-against-side-effecting-tool-calls",
  "title": "In what scenarios must an instance treat MCP resumable SSE `Last-Event-ID` replay as non-authoritative against side-effecting tool calls",
  "date_of_record": "2026 November 26",
  "scope": "Applies to MCP servers/clients using the HTTP-native Streamable transport (POST for requests, SSE for server→client stream) with `Mcp-Session-Id` session resumption and `Last-Event-ID` event-log replay. Does not apply to the legacy stdio transport or to transports where the client never reconnects with a prior `Last-Event-ID` and `Mcp-Session-Id`.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-resumable-sse-last-event-id-replay-as-non-authoritative-against-side-effecting-tool-calls.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-resumable-sse-last-event-id-replay-as-non-authoritative-against-side-effecting-tool-calls.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-resumable-sse-last-event-id-replay-as-non-authoritative-against-side-effecting-tool-calls.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2315,
    "python_slice_tokens": 461,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The Streamable HTTP transport advertises two independent continuity mechanisms that are frequently conflated: **session resumption** (the `Mcp-Session-Id` header, which binds a client to server-side session state and is replayed on every request) and **stream resumption** (the `Last-Event-ID` header on a reconnecting `GET`, which asks the server to replay bu...",
    "what_was_observed": "A client agent ran a long-running `tools/call` (`deploy_service`) against an MCP server over Streamable HTTP. The POST that carried the `tools/call` request returned `200` with an SSE stream, and the server began emitting `notifications/progress` events with monotonic `id` values (1, 2, 3, …) interleaved with the eventual `tools/call` result event at `id: 47`. The tool took ~40s. At `id: 31` (progress ~60%), the clie...",
    "condition_of_validity": "This failure mode is bounded and predictable. It requires all of the following to hold simultaneously: 1. The transport is Streamable HTTP with SSE and the server implements `Last-Event-ID` replay (per MCP spec, replay is optional but common in production servers). 2. A `tools/call` is in flight and produces at least one buffered event with an `id` greater t...",
    "decision_boundary": "The decision boundary is: *does the client's reconnect handler treat a replayed event as a fresh observation or as a resumed observation?* The correct rule is a strict two-part predicate evaluated before any re-dispatch: - **Resume, don't re-dispatch.** On `GET` reconnect with `Last-Event-ID`, every replayed event with `id > last-seen` must be routed through...",
    "operational_effect": "The operational consequence is a **duplicate side effect with a false success report**: the agent believes it performed the action once, the external system performed it twice, and the SSE event log shows two distinct `id` ranges (31–47 replay, 48 fresh) that look like two separate calls. Downstream auditors reading the event log will see two `tools/call` re..."
  },
  "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": "bbd4380441a32bde6c113ac3a9463f3b951cdbec633c564b6a40aa04d8f5dfa5",
    "verified_classes": [
      "ReplayCorrelationError",
      "PendingState",
      "PendingRequest",
      "McpResumableClient"
    ],
    "verified_functions": [
      "on_stream_error",
      "on_replayed_event",
      "redispatch"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ReplayCorrelationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
