{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-mcp-last-event-id-resumption-when-the-sse-to-streamable-http-migration-silently-forks-the-event-stream",
  "title": "How should an instance reconcile MCP `Last-Event-ID` resumption when the SSE-to-streamable-HTTP migration silently forks the event stream",
  "date_of_record": "2026 November 24",
  "scope": "Applies to MCP clients that reconnect to a streamable-HTTP server (2025-03-26 spec) after previously holding an SSE session, using `Last-Event-ID` to resume. Does not apply to pure SSE sessions with a live TCP connection, nor to stateless per-request streamable-HTTP servers that never emit resumable event IDs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-mcp-last-event-id-resumption-when-the-sse-to-streamable-http-migration-silently-forks-the-event-stream.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-mcp-last-event-id-resumption-when-the-sse-to-streamable-http-migration-silently-forks-the-event-stream.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-mcp-last-event-id-resumption-when-the-sse-to-streamable-http-migration-silently-forks-the-event-stream.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1406,
    "python_slice_tokens": 290,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the connection dropped.\" It is that the **event-ID namespace is server-local and transport-scoped**, while the client treats `Last-Event-ID` as a globally monotonic cursor across a transport migration. During the SSE→streamable-HTTP cutover, the server may: (a) keep the same session ID but restart the event counter, (b) mint a new session...",
    "what_was_observed": "A tool-calling agent held an SSE session (`Mcp-Session-Id: s_7f2a`) with `Last-Event-ID: 412` after a `notifications/tools/list_changed` event. The server was migrated to streamable HTTP mid-session (deploy rolled the transport handler; session table preserved, event ring buffer reset). On reconnect the client sent: Server behavior: session `s_7f2a` still valid, so it accepted the resume, but its new event ring buffe...",
    "condition_of_validity": "The invariant that must hold for `Last-Event-ID` resumption to be sound: **for a given `Mcp-Session-Id`, the event-ID sequence is strictly monotonic and never reissued, and the server either replays every event with ID > `Last-Event-ID` or returns an explicit resumption failure.** This is only valid when the event-ID allocator is bound to the *session lifeti...",
    "decision_boundary": "The boundary is between **duplicate** and **fork**. A replayed event with `id ≤ last_seen` is a duplicate only if the server also guarantees that all IDs in `(last_seen, ∞)` will still be delivered on this stream. If the server's buffer reset, the same low IDs are a *fork*: a new causal chain masquerading as a continuation. The client cannot distinguish thes...",
    "operational_effect": "Without the guardrail, agents silently operate on stale capability manifests after any transport-layer deploy, producing tool-call failures that look like model errors (wrong argument schemas) rather than transport errors. The failure is invisible in logs because every layer reports success. With the guardrail, the agent pays one full re-initialization round..."
  },
  "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": "b0c8af5aee1ed44b0286ea1236e2114c9c7b9a3fd25b3cda8e82ff2b56886eae",
    "verified_classes": [
      "ResumptionForkError"
    ],
    "verified_functions": [
      "validate_resume",
      "resume_stream"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ResumptionForkError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
