{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-of-mcp-http-native-transport-streaming-session-resumption-fail-silently-when-sse-multiplexing-reuses-an-event-id-namespace-across",
  "title": "Why does an instance of MCP HTTP-native transport streaming session resumption fail silently when SSE multiplexing reuses an event ID namespace across resumed and fresh streams",
  "date_of_record": "2026 November 17",
  "scope": "Applies to MCP servers implementing the HTTP-native (Streamable HTTP) transport with `Last-Event-ID`-based resumption and multiple concurrent SSE streams multiplexed over a single session. Does not apply to stdio transport, nor to single-stream-per-session deployments where event IDs are globally monotonic within one stream.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-of-mcp-http-native-transport-streaming-session-resumption-fail-silently-when-sse-multiplexing-reuses-an-event-id-namespace-across.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-of-mcp-http-native-transport-streaming-session-resumption-fail-silently-when-sse-multiplexing-reuses-an-event-id-namespace-across.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-of-mcp-http-native-transport-streaming-session-resumption-fail-silently-when-sse-multiplexing-reuses-an-event-id-namespace-across.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1556,
    "python_slice_tokens": 391,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct notions of \"event identity\" in the MCP HTTP-native transport, and conflating them is the root cause of this failure mode: 1. **Stream-local event identity** — the `id:` field emitted on each SSE frame, used by the client to send `Last-Event-ID` on reconnect so the server can replay missed events *for that stream*. 2. **Session-scoped e...",
    "what_was_observed": "A server allocated event IDs from one monotonically increasing `session.next_event_id` counter shared by all streams. Stream A (the request/response stream for a long-running tool call) was at ID 41. A second stream B (server-initiated notifications, e.g. progress) was opened and advanced the counter to 57. The network dropped stream A. The client reconnected with `Last-Event-ID: 41`. The server's replay buffer was k...",
    "condition_of_validity": "The replay-on-resume guarantee is valid only under the conjunction: - Event IDs are **unique within the resume scope** the server actually uses for replay lookup, AND - The replay scope the server uses is **no larger than** the scope the client's `Last-Event-ID` is meaningful in. The second clause is the non-obvious one. `Last-Event-ID` is defined relative t...",
    "decision_boundary": "- **Single stream per session:** a session-wide counter is correct and simplest. No action needed. - **Multiple streams per session, no resumption:** a session-wide counter is harmless; duplicates cannot occur because there is no replay. - **Multiple streams per session, resumption enabled:** a session-wide counter is a latent correctness bug. Switch to per-...",
    "operational_effect": "The observable symptom is not a transport error but a **semantic regression under load**: progress notifications that move backwards, cancellations applied twice, duplicate resource-update notifications, and occasional \"already completed\" errors on idempotent-looking handlers. These appear only when (a) more than one stream is live, (b) a drop occurs on one ..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "649601785f3d30e9a0b1a537069a05d139f4654b33ea368bf1f5ff7c01d0dc54",
    "verified_classes": [
      "MCPEventScopeError",
      "SessionEventAllocator"
    ],
    "verified_functions": [
      "__init__",
      "open_stream",
      "allocate",
      "replay_for"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "MCPEventScopeError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
