{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-elicitation-warrants-across-sse-resumption-behind-a-stateless-mcp-gateway",
  "title": "Why does an instance lose elicitation warrants across SSE resumption behind a stateless MCP gateway?",
  "date_of_record": "2026 December 1",
  "scope": "Applies to MCP servers exposing HTTP-native streaming (SSE) transport with `Last-Event-ID` resumption, fronted by a stateless reverse-proxy or API gateway, where the server may issue `elicitation/create` requests that require a correlated client response. Does not apply to stdio transport, to stateful session-affinity gateways that pin the SSE connection to a single backend, or to servers that only emit server-push notifications without response correlation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-elicitation-warrants-across-sse-resumption-behind-a-stateless-mcp-gateway.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-elicitation-warrants-across-sse-resumption-behind-a-stateless-mcp-gateway.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-elicitation-warrants-across-sse-resumption-behind-a-stateless-mcp-gateway.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2146,
    "python_slice_tokens": 457,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **stream continuity** and **warrant continuity**. An SSE stream can resume cleanly—`Last-Event-ID` honored, missed events replayed, the client's `EventSource`/fetch reader reattached with no gap in the byte stream—while the *authorization to respond to a server-initiated elicitation* has silently expired. The stream is...",
    "what_was_observed": "A gateway load-balances across N=4 server instances (`mcp-server-a..d`), each holding an in-memory map `pending_elicitations: dict[request_id, ElicitationContext]`. The client holds a long-lived SSE `GET /mcp/stream` with `Accept: text/event-stream`. Mid-stream, the server emits: The client's reader is fine. The gateway's idle timeout (default 60s) fires because the server is *waiting on the human/agent to answer*—no...",
    "condition_of_validity": "The invariant that must hold for resumable SSE + elicitation to be correct: > For every `elicitation/create` frame with `requestId R` emitted on stream incarnation `S`, the response `R` must be delivered to a process whose `pending_elicitations` contains `R`, exactly once, and any replayed `R` on a resumed stream must be idempotent at the client (deduplicate...",
    "decision_boundary": "The architectural fork is between two defensible designs, and the failure lives in the middle where teams land accidentally: **Design A — Session affinity (stateful gateway).** Pin the MCP session to one backend via `Mcp-Session-Id` header; route both stream and message on that key. Elicitation bindings stay process-local and correct. Cost: no horizontal sca...",
    "operational_effect": "The downstream effects are subtle and misattributed: - **Silent orphaning.** The elicitation is neither resolved nor rejected; the server's tool call that depended on it hangs until its own timeout, and the agent's reasoning loop stalls on a tool result that never arrives. The agent does not see \"elicitation failed\"—it sees a tool call that never returns, an..."
  },
  "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": "2196d6654073c1793336f96a98aa522d6dcc56c3acc085ae5378e96f1093e3c0",
    "verified_classes": [
      "ElicitationWarrantError",
      "ElicitationContext",
      "WarrantStore"
    ],
    "verified_functions": [
      "handle_elicitation_response",
      "_apply_confirmed_action",
      "mint",
      "resolve"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ElicitationWarrantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
