{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-sampling-roots-and-elicitation-capability-after-an-mcp-session-renegotiates-over-http",
  "title": "Why does an instance lose sampling, roots, and elicitation capability after an MCP session renegotiates over HTTP?",
  "date_of_record": "2026 December 2",
  "scope": "Applies to MCP client/server pairs where the client exposes server-initiated capabilities (sampling, roots, elicitation) and the transport is HTTP-based with session re-establishment, reconnect, or per-request capability re-declaration. Does not apply to long-lived stdio transports where the initialize handshake occurs exactly once per process lifetime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-sampling-roots-and-elicitation-capability-after-an-mcp-session-renegotiates-over-http.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-sampling-roots-and-elicitation-capability-after-an-mcp-session-renegotiates-over-http.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-sampling-roots-and-elicitation-capability-after-an-mcp-session-renegotiates-over-http.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1644,
    "python_slice_tokens": 202,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The MCP `initialize` handshake declares *both* directions of capability: what the client can call on the server (tools, resources, prompts) and what the server may call *back* on the client (sampling/createMessage, roots/list, elicitation/create). The second direction is the fragile one. Over HTTP, the server is stateless per-request; it only knows the clien...",
    "what_was_observed": "A client agent maintained a persistent logical task across a flaky network. The server exposed a tool `summarize_document`. On the first session (`Mcp-Session-Id: s-001`) the client sent: The server stored `s-001 → {sampling: true, roots: true, elicitation: true}` and, during tool execution, issued `sampling/createMessage` back to the client to compress intermediate chunks. This worked for 40 minutes. At T+41m the tr...",
    "condition_of_validity": "The invariant that must hold for server-initiated capabilities to survive is: > For every request the server processes, the capability set it consults MUST be the capability set declared in the `initialize` that created the *currently referenced* session, and the client MUST NOT create a new session with a capability set that is a strict subset of any prior ...",
    "decision_boundary": "The boundary is between **capability as a declared hint** and **capability as a contractual precondition for a tool's correctness**. For a given server tool, decide: - If the tool's output is *equivalent* with or without a client capability (e.g., sampling only affects latency), absence is a benign hint and fallback is fine. - If the tool's output is *semant...",
    "operational_effect": "Concretely, the guardrails that bound this failure: - **Server:** Bind tool preconditions to session capabilities and raise on mismatch. A tool that requires sampling must check `session.capabilities.sampling` at call time and return a JSON-RPC error (`-32600`-class) rather than degrade. Cache the capability record per `Mcp-Session-Id`, never per connection...."
  },
  "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": "bd4c020483551288741b92e1cad65f2e0318539da57ca61770c6416b9ee5858c",
    "verified_classes": [
      "CapabilityRenegotiationError"
    ],
    "verified_functions": [
      "assert_capabilities_preserved",
      "enforce_tool_precondition",
      "reconnect"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CapabilityRenegotiationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
