{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-abandon-an-sse-event-id-after-an-mcp-session-migration",
  "title": "When must an instance abandon an SSE event ID after an MCP session migration",
  "date_of_record": "2026 November 26",
  "scope": "Applies to MCP servers that expose an HTTP-native streamable transport (POST requests carrying JSON-RPC, responses optionally upgraded to `text/event-stream`) with resumable sessions keyed by `Mcp-Session-Id` and `Last-Event-ID`, and to clients that reconnect with `Last-Event-ID` after a session migration or server restart. Does not apply to stdio transports, to stateless HTTP servers that never issue event IDs, or to in-memory session pinning where the session ID is guaranteed to resolve to the same process for its lifetime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-an-sse-event-id-after-an-mcp-session-migration.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-an-sse-event-id-after-an-mcp-session-migration.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-an-sse-event-id-after-an-mcp-session-migration.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2578,
    "python_slice_tokens": 452,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **event ID continuity** (the client can present `Last-Event-ID: N` and the server can locate the exact event stream position) and **session ID continuity** (the client presents `Mcp-Session-Id: S` and the server recognizes the session). In a single-process deployment these two are coupled by construction: the session o...",
    "what_was_observed": "A client held an MCP session `S` against replica A, consuming a long-running `tools/call` stream. It had received events with IDs `1001..1047` (the server used a monotonic per-process counter, offset by a per-boot epoch). At event 1047 the connection dropped (client-side network partition). The client reconnected to the load balancer, which routed it to replica B, because replica A had been drained during a rolling d...",
    "condition_of_validity": "Resuming with `Last-Event-ID` is valid if and only if the server can establish, at accept time, that the presented ID belongs to the *same event-ID space* as the events it is about to replay or continue. Concretely, one of the following must hold: 1. **Global monotonic ID space.** Event IDs are drawn from a durable, globally ordered sequence (e.g., a shared ...",
    "decision_boundary": "The boundary is crossed at the moment the server's resume handler decides whether to honor or reject a `Last-Event-ID`. The correct decision procedure is: - If the current producer's epoch equals the epoch embedded in (or associated with) the presented `Last-Event-ID`, **honor** it: replay from the buffer, or if the buffer has been trimmed past that ID, retu...",
    "operational_effect": "When the boundary is respected, the observable behavior is a clean, typed resume failure on migration, and the client's recovery path is deterministic: re-establish the stream, re-request the in-flight operation with an idempotency key, and rely on the server's logical checkpoint to avoid duplicate side effects. Latency cost is one extra round trip per migra..."
  },
  "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": "60360657ebc177a11034f0674d1ffe39e0ae3aa20a0b0657fd4ff3d13402950a",
    "verified_classes": [
      "EventSpaceContinuityError",
      "EventId"
    ],
    "verified_functions": [
      "decide_resume",
      "parse",
      "render"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "EventSpaceContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "re"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
