{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-elicitation-response-loss-when-an-mcp-server-pushes-a-mid-task-prompt-and-the-client-reconnects-on-a-different-http-session",
  "title": "Which invariants prevent elicitation-response loss when an MCP server pushes a mid-task prompt and the client reconnects on a different HTTP session",
  "date_of_record": "2026 November 25",
  "scope": "Applies to MCP servers that use HTTP-native streamable transports (SSE-over-POST, resumable streams via `Last-Event-ID`) to push `elicitation/create` requests to a client that is mid-way through a long-running tool call, where the client may reconnect on a new TCP/HTTP session before the elicitation response is submitted. Does not apply to stdio transports, where the session is the process and reconnection is undefined.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-elicitation-response-loss-when-an-mcp-server-pushes-a-mid-task-prompt-and-the-client-reconnects-on-a-different-http-session.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-elicitation-response-loss-when-an-mcp-server-pushes-a-mid-task-prompt-and-the-client-reconnects-on-a-different-http-session.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-elicitation-response-loss-when-an-mcp-server-pushes-a-mid-task-prompt-and-the-client-reconnects-on-a-different-http-session.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1885,
    "python_slice_tokens": 324,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the elicitation prompt was lost.\" The failure is that the *response* arrives intact but is attributed to the wrong task instance. A server-push elicitation is a two-party rendezvous: the server emits `elicitation/create` with a request id on stream `S1`, the client's human/agent answers, and the answer must be routed back to the *originat...",
    "what_was_observed": "A file-mutation agent ran a long tool call (`bulk_rewrite`, ~90s) against an MCP server. Mid-call the server needed human confirmation for an ambiguous path and pushed `elicitation/create` (request id `e-7f3a`) on SSE stream `S1`. The client's transport idle-timed out at 60s and reconnected, establishing stream `S2`. The client replayed its subscription but sent no `Last-Event-ID`, so the server treated `S2` as a fre...",
    "condition_of_validity": "The invariant \"response binds to originating tool-call token across reconnects\" holds only under three conditions, all of which must be enforced server-side: - **Stable logical request id.** The `requestId` of an elicitation is minted once, at first emit, and is *immutable* across replay. Re-emission on a new stream carries the same id. (The server above vio...",
    "decision_boundary": "The boundary is whether elicitation state is **call-scoped** or **connection-scoped**. If elicitation state lives on the connection (the common default when servers treat SSE streams as sessions), then any reconnect silently re-homes pending prompts to a new, empty context, and concurrent tool calls on the new stream become ambiguous. The correct boundary: e...",
    "operational_effect": "For the agent consuming this server: the practical guardrail is to treat any elicitation response whose `(requestId, toolCallToken)` does not match a prompt the agent itself is currently awaiting as a protocol error, not as an answer. The agent must maintain its own pending-elicitation ledger keyed by the tool-call token it minted, and reject responses that ..."
  },
  "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": "f27adb901f6c3e2f03ef8dca9dd0ce94134ff66f59048284b1f73af824d0ce65",
    "verified_classes": [
      "ElicitationAttributionError",
      "PendingElicitation",
      "ElicitationLedger"
    ],
    "verified_functions": [
      "apply_elicitation_response",
      "__init__",
      "__init__",
      "register",
      "resolve",
      "cancel"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ElicitationAttributionError"
    ],
    "sample_fail_closed_invariants": [
      "replayed elicitation arrived without an answer; treat as transport fault, not user decline"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
