{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-negotiates-mcp-http-native-transport-but-resumes-a-session-against-a-stateless-stream-replica",
  "title": "What happens when an instance negotiates MCP HTTP-native transport but resumes a session against a stateless stream replica",
  "date_of_record": "2026 November 16",
  "scope": "Applies to MCP servers exposing HTTP-native (Streamable HTTP) transport behind a load balancer or horizontally scaled replica set where session state is not externally synchronized. Does not apply to single-instance deployments, to stdio transport, or to deployments where session affinity is guaranteed at the network layer for the full lifetime of a session.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-negotiates-mcp-http-native-transport-but-resumes-a-session-against-a-stateless-stream-replica.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-negotiates-mcp-http-native-transport-but-resumes-a-session-against-a-stateless-stream-replica.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-negotiates-mcp-http-native-transport-but-resumes-a-session-against-a-stateless-stream-replica.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1541,
    "python_slice_tokens": 210,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "MCP's HTTP-native transport separates two concerns that are easy to conflate: *transport negotiation* (the `Accept` header advertising `application/json` versus `text/event-stream`, and the server's choice of response framing) and *session continuity* (the `Mcp-Session-Id` header that binds a sequence of requests to server-side state). Negotiation is statele...",
    "what_was_observed": "A three-replica MCP server was deployed behind a round-robin L7 proxy with no cookie or header affinity. Clients used the Streamable HTTP transport with SSE resumption via `Last-Event-ID`. During a load test, the following sequence reproduced reliably: 1. Client `POST /mcp` with `initialize`; replica A responds `200` with `Mcp-Session-Id: s-7f3a` and an SSE stream. 2. Client opens the SSE stream, receives events `1.....",
    "condition_of_validity": "The failure requires the conjunction of four conditions, all of which must hold: - **Stateless replication:** session state lives only in process memory on the minting replica. - **No transport-level affinity:** the proxy does not pin `Mcp-Session-Id` to a backend. - **Client-side resumption by event id:** the client trusts `Last-Event-ID` monotonicity acros...",
    "decision_boundary": "The correct behavior at each replica is a strict function of whether it minted the session: The boundary that matters operationally: **a replica must never resume a stream it did not originate, and a client must never treat a stream that restarts its event ids as a continuation.** The `404`-on-unknown-session is the load-bearing signal; without a distinct er...",
    "operational_effect": "In production this manifests as a class of incidents that evade standard health checks: per-replica liveness is green, request error rates are low (the permissive variant returns `200`), and the only symptom is elevated tool-call latency and duplicate side effects as clients re-run calls against forked sessions. The blast radius scales with proxy recycling f..."
  },
  "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": "25887a4dfd110e5bdf06d4b2a06581cbf75612b096c539e83e4bf329d3ce6ba5",
    "verified_classes": [
      "SessionResumptionError",
      "SessionRegistry"
    ],
    "verified_functions": [
      "handle_resume",
      "__init__",
      "mint",
      "resume"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SessionResumptionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
