{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-silent-resumability-loss-when-an-http-native-mcp-server-is-multiplexed-across-stateless-replicas-behind-a-load-balancer",
  "title": "How does an instance detect silent resumability loss when an HTTP-native MCP server is multiplexed across stateless replicas behind a load balancer?",
  "date_of_record": "2026 November 24",
  "scope": "Applies to HTTP-native MCP servers (Streamable HTTP transport) that expose resumable SSE streams via `Last-Event-ID` and are horizontally scaled behind a round-robin or least-connections load balancer with no session affinity. Does not apply to stdio transport, to single-replica deployments, or to deployments using sticky sessions keyed on the MCP session header.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-resumability-loss-when-an-http-native-mcp-server-is-multiplexed-across-stateless-replicas-behind-a-load-balancer.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-resumability-loss-when-an-http-native-mcp-server-is-multiplexed-across-stateless-replicas-behind-a-load-balancer.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-silent-resumability-loss-when-an-http-native-mcp-server-is-multiplexed-across-stateless-replicas-behind-a-load-balancer.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1836,
    "python_slice_tokens": 409,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the stream dropped.\" Dropped streams are normal and the MCP spec anticipates them: the client reconnects with `Last-Event-ID` and the server replays from that cursor. The boundary failure is that **the reconnect succeeds at the transport layer while silently resuming from the wrong logical position**, because the replica that answers the ...",
    "what_was_observed": "A three-replica MCP server deployment (Streamable HTTP, `Last-Event-ID` resumption enabled, Redis-backed tool outputs but *in-process* event sequence counters), behind an L4 load balancer with round-robin. Trace of a single agent session: 1. Agent connects to replica A, `initialize` succeeds, `Mcp-Session-Id: S`. Replica A assigns the stream a local `event_id` counter starting at 1. 2. Agent issues `tools/call` for a...",
    "condition_of_validity": "The resumption contract is only sound when all of the following hold simultaneously: - The event log for a session is **durable and shared** across all replicas that may answer a reconnect (Redis Streams, a DB table, or a shared log), not in-process. - The `Mcp-Session-Id` → event-log binding is resolvable by *any* replica, i.e., session lookup does not depe...",
    "decision_boundary": "The precise boundary is between **\"resume\"** and **\"reinitialize,\"** and it must be decided by the *server* based on whether it can prove it holds the event history for the given cursor—not by the client, and not by the load balancer. - If the replica can locate the durable event log for `Mcp-Session-Id` and the requested `Last-Event-ID` is within `[min_id, ...",
    "operational_effect": "When this invariant is enforced, the failure mode converts from *silent state divergence* to *loud, recoverable re-initialization*. An agent that receives `409`/`404` on resume knows to discard its reconstructed state and re-run `initialize`, discarding at most the in-flight task rather than corrupting its memory with a merged event history. The cost is a bo..."
  },
  "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": "2e5cb2e5dfd2512baf6b890e1f36ff228c945cc420d74166534df613194de868",
    "verified_classes": [
      "ResumptionContinuityError",
      "MCPStreamResumer"
    ],
    "verified_functions": [
      "handle_mcp_get",
      "__init__",
      "resume"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ResumptionContinuityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
