{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-distrust-a-resumed-mcp-sse-stream-after-last-event-id-replay-and-how-does-the-resumption-cursor-diverge-from-th",
  "title": "Under what conditions must an instance distrust a resumed MCP SSE stream after `Last-Event-ID` replay, and how does the resumption cursor diverge from the session's logical event history?",
  "date_of_record": "2026 November 25",
  "scope": "Applies to MCP servers implementing the HTTP-native transport with server-initiated Server-Sent Events (SSE) and client-driven resumption via `Last-Event-ID`. Does not apply to stdio transport, to stateless request/response MCP endpoints, or to WebSocket-based transports where ordering is guaranteed by the connection itself.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-distrust-a-resumed-mcp-sse-stream-after-last-event-id-replay-and-how-does-the-resumption-cursor-diverge-from-th.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-distrust-a-resumed-mcp-sse-stream-after-last-event-id-replay-and-how-does-the-resumption-cursor-diverge-from-th.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-distrust-a-resumed-mcp-sse-stream-after-last-event-id-replay-and-how-does-the-resumption-cursor-diverge-from-th.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2416,
    "python_slice_tokens": 553,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The critical distinction is between **transport-level replay continuity** and **logical session continuity**. MCP's resumption contract is specified at the transport layer: a client that reconnects with `Last-Event-ID: N` asserts it has durably processed every event with ID `≤ N` on that stream, and the server is expected to replay events `> N`. This invaria...",
    "what_was_observed": "A concrete trace from a multi-tool agent session against an MCP server exposing a stateful `filesystem` capability plus a `tasks` capability with server-pushed progress events: 1. Client opens `GET /mcp/session/{sid}` with `Accept: text/event-stream`. Server assigns event IDs `1, 2, 3` (session init, capability list, tool schema). 2. Client issues `POST /mcp/session/{sid}` with a `tools/call` for `write_file`. Server...",
    "condition_of_validity": "The `Last-Event-ID` resumption contract is valid — i.e., an agent may trust the replayed stream as a faithful continuation of its logical session — **if and only if all of the following hold**: 1. **Monotonic, session-scoped event IDs.** The server's event ID sequence is strictly increasing and scoped to the session, not to the connection or the replica. A r...",
    "decision_boundary": "The decision boundary is the point at which the agent must choose between **resume-and-trust** and **resume-and-reconcile**. The rule: - If the reconnect response carries a session identifier, a server-assigned `Last-Event-ID` echo, and a monotonic event ID strictly greater than the client's cursor — **and** the server's capability manifest declares `resumpt...",
    "operational_effect": "Without this boundary, the operational effects are: 1. **Silent duplicate side effects.** A replayed `tools/call` result that the agent re-applies (e.g., re-writing a file) doubles the effect. Because the replay is transport-valid, no error is raised; the agent's audit log shows two successful writes where the server intended one. 2. **Frozen state machines...."
  },
  "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": "4fb690a46e7d7c85fce92803013f17b9b79a0f3bb0efa0bf1b81e29d887fc62b",
    "verified_classes": [
      "ResumptionIntegrityError",
      "SilentStallError",
      "Event",
      "SessionCursor"
    ],
    "verified_functions": [
      "apply_event",
      "handle_reconnect",
      "resume_session"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ResumptionIntegrityError",
      "SilentStallError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
