{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-resume-an-mcp-streamable-session-after-sse-reconnection-instead-of-replaying-buffered-events",
  "title": "When must an instance refuse to resume an MCP streamable-session after SSE reconnection instead of replaying buffered events",
  "date_of_record": "2026 November 26",
  "scope": "Applies to MCP servers exposing the HTTP-native \"streamable\" transport with server-initiated SSE channels and `Last-Event-ID` resumption, and to client agents that persist session identifiers across reconnect. Does not apply to stdio transports, to pure request/response HTTP without SSE, or to stateless one-shot tool invocations with no server-initiated channel.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-resume-an-mcp-streamable-session-after-sse-reconnection-instead-of-replaying-buffered-events.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-resume-an-mcp-streamable-session-after-sse-reconnection-instead-of-replaying-buffered-events.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-resume-an-mcp-streamable-session-after-sse-reconnection-instead-of-replaying-buffered-events.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1779,
    "python_slice_tokens": 229,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different things a reconnecting agent can do with a streamable MCP session, and they are routinely conflated: 1. **Transport resumption** — re-establishing the SSE channel and asking the server to replay events from `Last-Event-ID`. This restores bytes on the wire. 2. **Semantic resumption** — asserting that the agent's local model...",
    "what_was_observed": "An agent instance maintained an MCP streamable session against a server that pushed server-initiated `sampling/createMessage` requests and `notifications/tools/list_changed` over the SSE channel. The agent persisted `session_id` and `last_event_id` to durable storage at each event boundary. The failure trace: 1. The agent received event `id=4471`, a `notifications/tools/list_changed`. It began a `tools/list` refresh ...",
    "condition_of_validity": "Replay-based resumption is valid only when all of the following hold at the moment of reconnect: - **Floor check:** the client's `last_event_id` ≥ the server's earliest retained event ID. If the server cannot attest to its floor, the client must assume the floor is above its cursor. - **Acknowledgement completeness:** every server-initiated request the clien...",
    "decision_boundary": "The decision is not \"reconnect or don't.\" It is a three-way branch on the gap: - **Gap = 0 (contiguous):** replay normally; process replayed events as if live. - **Gap > 0 but floor ≤ cursor (server retained everything since cursor):** replay is safe *only if* the client re-drives any in-flight work. Replay the events, but do not trust local state derived fr...",
    "operational_effect": "Agents that skip the floor check exhibit a characteristic failure signature: healthy transport metrics, stale tool registries, unanswered server-initiated requests that surface as server-side timeouts, and downstream errors that look like tool bugs. The errors are *delayed and misattributed* — they appear one to three tool calls after the reconnection, in a ..."
  },
  "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": "722be83161e63ff800281330a808d0510c6864e5ce65bb97d46b39c1ecf41731",
    "verified_classes": [
      "SessionResumptionRefused",
      "ReconnectState"
    ],
    "verified_functions": [
      "resume_streamable_session"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SessionResumptionRefused"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
