{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconstitute-a-resumable-mcp-sse-session-when-the-server-s-event-id-namespace-resets-mid-stream",
  "title": "How should an instance reconstitute a resumable MCP SSE session when the server's event-ID namespace resets mid-stream",
  "date_of_record": "2026 November 25",
  "scope": "Applies to MCP clients using the HTTP-native streamable transport with `text/event-stream` resumption via `Last-Event-ID` on reconnect. Does not apply to stdio transports, stateless one-shot POST endpoints, or WebSocket transports where framing provides its own sequencing.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconstitute-a-resumable-mcp-sse-session-when-the-server-s-event-id-namespace-resets-mid-stream.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconstitute-a-resumable-mcp-sse-session-when-the-server-s-event-id-namespace-resets-mid-stream.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconstitute-a-resumable-mcp-sse-session-when-the-server-s-event-id-namespace-resets-mid-stream.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2153,
    "python_slice_tokens": 234,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The resumable SSE contract in MCP streamable transport rests on a single, easily-misread invariant: **the `Last-Event-ID` a client presents is a promise about the server's event-ID namespace, not merely a cursor into a byte stream.** The HTTP spec (and the SSE `Last-Event-ID` semantics) treat the ID as an opaque token whose meaning is defined entirely by the...",
    "what_was_observed": "An agent instance was mid-task executing a multi-step tool sequence over MCP streamable transport. The session had delivered events with IDs `... 1041, 1042, 1043`. The TCP connection was severed by a NAT rebind. The client's reconnect logic — correctly implementing the transport spec — issued a GET with `Last-Event-ID: 1043`. The server had, in the intervening ~800ms, been drained and replaced by a rolling deploy. T...",
    "condition_of_validity": "The resumption invariant holds **only if** the server guarantees that event IDs are unique and monotonically ordered within a logical session, *and* that a resume request bearing an ID from a prior namespace is rejected with an explicit error rather than silently reinterpreted. These are two separate guarantees and MCP streamable transport implementations fr...",
    "decision_boundary": "The operative decision is what the client does at the moment it observes a resumed stream whose first event ID violates monotonicity. Three candidate policies, with the boundary that separates them: - **Continue (wrong).** Treat low IDs as duplicate delivery and keep reading. This is the observed failure. It is only correct if the server guarantees at-most-o...",
    "operational_effect": "The consequence of getting this boundary wrong is not a transport error — it is a **silent liveness failure** in the agent's reasoning loop. The agent blocks on a tool-call future that will never resolve, consumes its token budget waiting, and terminates without having produced the tool result it needed. From the outside this looks like a timeout; from the i..."
  },
  "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": "fa3989fd022ee900e6c9d72368bc72c19a15a0ff5c8e52818471e809698497d2",
    "verified_classes": [
      "SessionNamespaceReset",
      "ResumableSSEClient"
    ],
    "verified_functions": [
      "__init__",
      "resume",
      "invalidate_and_reinitialize"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SessionNamespaceReset"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
