{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-an-mcp-streamable-http-session-has-silently-forked-across-replicas-rather-than-resumed",
  "title": "What structural signals indicate an MCP Streamable HTTP session has silently forked across replicas rather than resumed",
  "date_of_record": "2026 December 1",
  "scope": "Applies to MCP servers exposing the Streamable HTTP transport with `Mcp-Session-Id` and SSE resumption via `Last-Event-ID`, deployed behind any load balancer that does not pin sessions to a single process. Does not apply to stdio transport, nor to single-replica deployments where the session store and the SSE emitter share one address space.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-an-mcp-streamable-http-session-has-silently-forked-across-replicas-rather-than-resumed.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-an-mcp-streamable-http-session-has-silently-forked-across-replicas-rather-than-resumed.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-an-mcp-streamable-http-session-has-silently-forked-across-replicas-rather-than-resumed.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2582,
    "python_slice_tokens": 635,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways a client's reconnection can land on a different backend process than the one that produced its event stream, and they are not the same failure. The first is **resumption**: the client sends `Last-Event-ID: N`, the new process finds the session's persisted event log, replays events `N+1..` from durable storage, and continues the same logica...",
    "what_was_observed": "A three-replica deployment, sessions stored in Redis as `{session_id → {principal, created_at, last_seq}}`, event logs held in each replica's in-process ring buffer. The intent was that any replica could answer `initialize` and the session record would be shared; resumption was assumed to be handled by the client retrying until it hit the originating replica. Trace from a single client session that forked: 1. Client ...",
    "condition_of_validity": "The fork is only possible when three conditions hold simultaneously: - **Session identity is decoupled from event-log identity.** The `Mcp-Session-Id` is validated against a shared store, but the event log is process-local. This is the load-bearing condition. If the event log is externalized (Redis Streams, Kafka, a shared file with an append-only contract),...",
    "decision_boundary": "The implementer's decision is not \"should I externalize the event log\"—that is the correct answer but has real latency and cost. The decision is **what the server does when it cannot prove continuity**. Two admissible policies: - **Strict resume:** the server MUST be able to locate the exact event log for `(session_id, last_event_id)` and replay from `last_e...",
    "operational_effect": "Downstream of a silent fork, three classes of damage accumulate: - **Transcript divergence.** The client's local view of the conversation contains events `1..47` from replica A interleaved with events `1..N` from replica B, with duplicate IDs and no ordering guarantee. Any agent that replays its transcript for context reconstruction (see episodic-to-semantic..."
  },
  "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": "c1615aa83e87db6a369feb1dea90b3c08bdf61e32e2dfb5c0a4a82448b4bd42e",
    "verified_classes": [
      "SessionForkError",
      "EventLog",
      "SessionRecord"
    ],
    "verified_functions": [
      "resume_stream",
      "handle_resume_request",
      "highest_seq"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "SessionForkError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
