{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-mcp-http-native-sse-stream-resumption-as-unsafe-without-a-monotonic-event-cursor-and-how-does-reconnection-si",
  "title": "In what scenarios must an instance treat MCP HTTP-native SSE stream resumption as unsafe without a monotonic event cursor, and how does reconnection silently corrupt agent state",
  "date_of_record": "2026 November 24",
  "scope": "Applies to MCP clients using the HTTP-native transport (Streamable HTTP with server-initiated SSE) where a `Last-Event-ID`-style resumption is offered but the server does not guarantee a strictly monotonic, gap-free event cursor per session. Does not apply to stdio transport, nor to servers that emit a total-ordered durable event log with replayable offsets.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-http-native-sse-stream-resumption-as-unsafe-without-a-monotonic-event-cursor-and-how-does-reconnection-si.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-http-native-sse-stream-resumption-as-unsafe-without-a-monotonic-event-cursor-and-how-does-reconnection-si.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-http-native-sse-stream-resumption-as-unsafe-without-a-monotonic-event-cursor-and-how-does-reconnection-si.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1973,
    "python_slice_tokens": 446,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the SSE connection dropped.\" Drops are normal and recoverable. The failure is that **resumption is treated as a continuation of a logical stream when the server can only guarantee a continuation of a transport connection**. MCP's HTTP-native transport lets a client reconnect to a session and, optionally, request replay from a cursor (conv...",
    "what_was_observed": "An agent driving a multi-step tool workflow over MCP HTTP-native transport. The server emits server-initiated SSE notifications interleaved with responses: `progress`, `resource_updated`, and out-of-band `request` messages (server→client elicitation/sampling) that the agent must answer to unblock a pending tool call. Trace of the boundary condition: 1. Agent issues `tools/call` for a long-running operation; server re...",
    "condition_of_validity": "Resumption is safe **iff** the server can prove, per session, that the event cursor is: - **Strictly monotonic** across reconnects (not per-connection), - **Gap-free** — every event with `id <= N` is either delivered or provably never existed, - **Session-scoped**, not connection-scoped, and - **Durable** across the reconnect window (the server retains unack...",
    "decision_boundary": "The agent must branch on a capability check performed at session establishment, not at reconnect time (at reconnect time it is already too late — the gap may have opened). - **If** the server advertised durable, session-scoped, monotonic cursors **and** the reconnect handshake echoes a cursor `>= last_acked + 1` with explicit replay of the gap → resume norma...",
    "operational_effect": "Downstream consequences when this boundary is crossed: - **Phantom pending state:** the agent's tool-call ledger holds a call in `PENDING` that the server has already blocked on an unanswered elicitation. Token budget and wall-clock both drain against a call that can never complete without intervention. - **Elicitation orphaning:** out-of-band server→client ..."
  },
  "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": "944fcedab1e84309f60777fd2dba005fc60d0dd1a3681094c8a9ff0dcbfc3dca",
    "verified_classes": [
      "ResumptionIntegrityError",
      "CallState",
      "ToolCall",
      "Session"
    ],
    "verified_functions": [
      "_idem_key",
      "on_reconnect",
      "_demote_gap_spanning_calls",
      "recover_unknown_calls"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ResumptionIntegrityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
