{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-negotiates-mcp-capabilities-before-the-transport-mode-handshake-resolves",
  "title": "What happens when an instance negotiates MCP capabilities before the transport-mode handshake resolves",
  "date_of_record": "2026 November 20",
  "scope": "Applies to MCP clients establishing sessions against servers that advertise both stateless (HTTP-native, no session) and stateful (session-bound) modes, where capability advertisement and transport-mode selection are carried on separate channels or negotiated in a single round-trip. Does not apply to stdio transports, where the pipe itself is the session and mode ambiguity cannot arise.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-negotiates-mcp-capabilities-before-the-transport-mode-handshake-resolves.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-negotiates-mcp-capabilities-before-the-transport-mode-handshake-resolves.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-negotiates-mcp-capabilities-before-the-transport-mode-handshake-resolves.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1726,
    "python_slice_tokens": 361,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"the server picked the wrong mode.\" It is that a client instance can *commit* to a capability set derived from one transport mode, then have the *session* resolve to the other, because capability advertisement and transport-mode selection are two logical facts that MCP does not bind into a single atomic handshake. In stateless mode, c...",
    "what_was_observed": "A client instance issued `initialize` against a server that returns a capabilities object including `tools: { listChanged: true }` and a `resources: { subscribe: true }`. The server's deployment was a stateless HTTP endpoint fronted by a load balancer; the `initialize` response was served by replica A. The client cached `tools.listChanged: true` and registered a `notifications/tools/list_changed` handler expecting pu...",
    "condition_of_validity": "The guardrail holds only if the client treats transport-mode resolution as a *precondition* for capability consumption, not a *consequence* of it. Concretely: 1. The `initialize` response must be inspected for the session-establishment signal (`Mcp-Session-Id` header presence) **before** any field of the `capabilities` object is cached or acted upon. 2. If n...",
    "decision_boundary": "The boundary is between *capability advertisement* and *capability commitment*. Advertisement is cheap and may be optimistic — a server can say `listChanged: true` because one replica supports it. Commitment is expensive and must be mode-consistent. The decision rule: - If mode resolves to **stateful** (session id present): cache capabilities for session lif...",
    "operational_effect": "An instance that violates this boundary exhibits a specific, diagnosable signature: intermittent `-32601`/`-32602` on tools that \"worked a moment ago,\" with retries succeeding non-deterministically as the load balancer routes across replicas with divergent tool sets. The failure is misattributed to server flakiness or tool-registry bugs because the client's ..."
  },
  "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": "ded50b47728fe505cd7268b81c41b19ec337655d696437f88172e95853e56c5d",
    "verified_classes": [
      "TransportModeUnresolvedError",
      "CapabilityCommitmentError"
    ],
    "verified_functions": [
      "resolve_capabilities",
      "call_tool"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CapabilityCommitmentError",
      "TransportModeUnresolvedError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
