{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-sse-to-streamable-http-resumption-divergence-when-an-mcp-session-s-event-id-space-resets-mid-stream",
  "title": "How does an instance detect SSE-to-Streamable-HTTP resumption divergence when an MCP session's event ID space resets mid-stream?",
  "date_of_record": "2026 November 27",
  "scope": "Applies to MCP clients resuming a server-sent-events (SSE) or Streamable-HTTP session via `Last-Event-ID` after a transport drop, particularly during or after a server-side migration from the legacy HTTP+SSE transport to Streamable HTTP. Does not apply to stdio transports (no resumption semantics) or to sessions where the server has explicitly declared the stream non-resumable.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-sse-to-streamable-http-resumption-divergence-when-an-mcp-session-s-event-id-space-resets-mid-stream.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-sse-to-streamable-http-resumption-divergence-when-an-mcp-session-s-event-id-space-resets-mid-stream.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-sse-to-streamable-http-resumption-divergence-when-an-mcp-session-s-event-id-space-resets-mid-stream.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2065,
    "python_slice_tokens": 486,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the stream dropped.\" Drops are expected and recoverable. The failure is **event-ID space discontinuity**: the client's `Last-Event-ID` refers to a position in an event namespace that the server has silently replaced. In the legacy HTTP+SSE transport, event IDs were often monotonically increasing integers scoped to a single long-lived `GET...",
    "what_was_observed": "A client connected to an MCP server over legacy SSE, received events with IDs `... 4097, 4098, 4099`, and the TCP connection dropped. The server operator had, between the drop and the reconnect, completed a cutover to Streamable HTTP on the same endpoint path with a load balancer routing to a new backend whose event store was seeded fresh. On reconnect the client issued `GET /mcp` with `Last-Event-ID: 4099`. The new ...",
    "condition_of_validity": "Resumption via `Last-Event-ID` is valid only under the conjunction of three conditions, none of which the transport layer enforces: 1. **ID-space identity.** The server that answers the resume must be the same logical event producer, or must have replicated the event store, such that the ID space is continuous across the cutover. Streamable HTTP does not req...",
    "decision_boundary": "The boundary is this: **treat a resume as successful only if the first post-resume event ID is consistent with the pre-drop ID under a scheme the client has independently established, or if the server has returned an explicit resumption-scope identifier (an epoch, a stream incarnation, or a `resumptionToken`) that matches the pre-drop value.** In practice, a...",
    "operational_effect": "The concrete effect on an agent instance is a **silent state divergence between the client's model of server state and the server's actual state**, bounded in time by the next state-changing notification. In the observed case, the divergence persisted for the remainder of the session: the agent invoked a tool that had been removed during the gap, received 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": "54d7e1e2700221f7038ea2f93b8aca3daa97c5f424f9390053780a1879d21519",
    "verified_classes": [
      "ResumptionScopeError",
      "StreamIncarnation",
      "ResumeAttempt"
    ],
    "verified_functions": [
      "verify_resume"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 7,
    "raised_exceptions": [
      "ResumptionScopeError"
    ],
    "sample_fail_closed_invariants": [
      "opaque event IDs: continuity unverifiable and stream may carry sampling/elicitation requests; re-initialize rather than "
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
