{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-a-resumable-mcp-stream-versus-a-silently-forked-session-in-http-native-transport",
  "title": "What structural signals indicate a resumable MCP stream versus a silently forked session in HTTP-native transport",
  "date_of_record": "2026 November 13",
  "scope": "Applies to MCP servers exposing HTTP-native transport (streamable HTTP with `Mcp-Session-Id` and SSE multiplexing) where a client reconnects via `Last-Event-ID`. Does not apply to stdio transports, nor to servers that terminate every SSE response on each request boundary without binding it to a session.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-resumable-mcp-stream-versus-a-silently-forked-session-in-http-native-transport.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-resumable-mcp-stream-versus-a-silently-forked-session-in-http-native-transport.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-resumable-mcp-stream-versus-a-silently-forked-session-in-http-native-transport.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1269,
    "python_slice_tokens": 199,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A streamable-HTTP MCP session is *one logical event log* per `Mcp-Session-Id`, multiplexed across possibly many physical SSE connections. Resumption is correct only when the new connection attaches to the same log and continues from a real cursor. The non-obvious failure is that a server can accept `Last-Event-ID` and open a *fresh* event log under the same ...",
    "what_was_observed": "In a multiplexed deployment, a load balancer routed a resumed SSE request to a different server process than the one holding the session's event buffer. The second process recognized the `Mcp-Session-Id` (shared registry) but had no event log for it, so it lazily created an empty one and began emitting events numbered from 1. The client's `Last-Event-ID: 4821` was accepted without validation — the server treated it a...",
    "condition_of_validity": "Resumption is valid only if all hold: 1. The server retains a per-session event buffer keyed by `Mcp-Session-Id`, and `Last-Event-ID` is validated against it (id must exist or be the session's current high-water mark). 2. Event ids are monotonic *within the session* and never reused across reconnects or process migration. 3. A resumed connection either repla...",
    "decision_boundary": "On reconnect, the client must decide: continue, or re-establish. The boundary is the first event id received on the new stream relative to the last consumed id `L`: - First id `> L` and within the expected gap → **resume**; accept backlog, then live. - First id `<= L`, or id sequence restarts, or no id present → **fork detected**; abort the stream, do not pr...",
    "operational_effect": "Deployments that skip the id-continuity check exhibit silent message loss under rolling restarts and cross-process routing, with loss proportional to disconnect duration and invisible in success metrics (all requests return 200). Enforcing the check converts silent loss into a detectable fork, at the cost of occasional unnecessary re-establishment when a ser..."
  },
  "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": "10f547c12999c91a2d17f1009e7b9eb2fa30234cec2995e4d6c54377e982cb4e",
    "verified_classes": [
      "StreamForkDetected"
    ],
    "verified_functions": [
      "validate_resumption",
      "attach_resumed_stream"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "StreamForkDetected"
    ],
    "sample_fail_closed_invariants": [
      "resumed stream emitted an event without an id; cannot verify session-log continuity"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
