{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-an-mcp-sse-last-event-id-replay-as-authoritative-after-a-streamable-http-migration-and-when-must-it-refus",
  "title": "Under what conditions must an instance treat an MCP SSE `Last-Event-ID` replay as authoritative after a streamable-HTTP migration, and when must it refuse resumption?",
  "date_of_record": "2026 November 29",
  "scope": "Applies to MCP clients and servers that resume a session across a transport change (legacy HTTP+SSE to Streamable HTTP) or across reconnects where the client presents `Last-Event-ID`. Does not apply to single-connection stdio transports, nor to sessions where the server never emitted an `id:` field on events.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-mcp-sse-last-event-id-replay-as-authoritative-after-a-streamable-http-migration-and-when-must-it-refus.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-mcp-sse-last-event-id-replay-as-authoritative-after-a-streamable-http-migration-and-when-must-it-refus.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-mcp-sse-last-event-id-replay-as-authoritative-after-a-streamable-http-migration-and-when-must-it-refus.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2068,
    "python_slice_tokens": 411,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the stream dropped.\" The failure is that **event IDs are per-stream-instance opaque cursors, not durable session sequence numbers**, yet the MCP resumption contract allows a client to present `Last-Event-ID` on a *new* HTTP request that may be served by a different server process, a different transport implementation, or a post-migration ...",
    "what_was_observed": "A concrete trace from a session that migrated mid-flight: 1. Legacy SSE connection. Server emits events with `id: 41` … `id: 47`. Client has processed through `id: 47`, which carried the JSON-RPC response to `tools/call` request `req-9` (a filesystem write). Client's last-seen cursor is `47`. 2. Connection drops (LB idle timeout, 60s). Client reconnects. Operator has flipped the endpoint to Streamable HTTP; the new h...",
    "condition_of_validity": "A `Last-Event-ID` replay is authoritative **iff all of the following hold simultaneously**: - **Same ledger identity.** The server adjudicating the replay can prove it holds the event log that minted the presented ID. \"Prove\" means a verifiable binding — e.g., the event ID is a signed or MAC'd tuple `(session_epoch, seq)` where `session_epoch` is set at sess...",
    "decision_boundary": "The decision the runtime must make on every reconnect, stated as a total function so it can be tested: - If the presented `Last-Event-ID`'s epoch ≠ the server's current session epoch → **refuse resumption; reinitialize session.** Do not retry with the same cursor. - If epoch matches but `seq` > ledger head → **refuse; treat as split-brain; reinitialize and r...",
    "operational_effect": "Concretely, this changes three things in an agent runtime: 1. **Session epoch must be minted at session creation and must survive transport migration.** It is not a transport-level concept; it belongs in the MCP initialize result and must be echoed in every resumption attempt. Servers that rotate it on migration are the root cause of the silent-reset variant..."
  },
  "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": "f93d2b20387ad535916f62d942f8d0c6f0234762afb5aebbff94b0825df1d059",
    "verified_classes": [
      "ResumptionRefused",
      "LedgerState",
      "ClientCursor"
    ],
    "verified_functions": [
      "adjudicate_resumption",
      "resume_or_reinitialize"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ResumptionRefused"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
