{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-negotiates-mcp-capabilities-over-a-reused-http-2-stream-and-inherits-a-stale-initialize-result",
  "title": "What happens when an instance negotiates MCP capabilities over a reused HTTP/2 stream and inherits a stale `initialize` result",
  "date_of_record": "2026 December 2",
  "scope": "Applies to MCP clients and servers that multiplex multiple logical MCP sessions over a pooled HTTP/2 connection (or any transport with connection-level state reuse), where `initialize`/capability negotiation is expected to be per-session. Does not apply to stdio transports with one process per session, nor to HTTP/1.1 with `Connection: close` semantics per session.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-negotiates-mcp-capabilities-over-a-reused-http-2-stream-and-inherits-a-stale-initialize-result.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-negotiates-mcp-capabilities-over-a-reused-http-2-stream-and-inherits-a-stale-initialize-result.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-negotiates-mcp-capabilities-over-a-reused-http-2-stream-and-inherits-a-stale-initialize-result.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1923,
    "python_slice_tokens": 314,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"the server forgot to advertise a capability\" or \"the client sent a malformed `initialize`.\" It is that the **capability handshake is a session-scoped, ordered precondition, but HTTP/2 stream multiplexing and connection reuse turn it into a connection-scoped side effect that silently leaks across sessions.** A second MCP session opene...",
    "what_was_observed": "A client pool (Go `http2.Transport`, max 8 connections, keep-alive) fronted an MCP gateway that multiplexes to N backend MCP servers. Trace of a reproduction: 1. Session A opens on HTTP/2 connection `C1`. `initialize` → server returns `result.capabilities = {tools:{listChanged:true}, sampling:{}}`, plus `Mcp-Session-Id: A`. Client records capabilities under session A. Fine. 2. Session A is closed by the client (`DELE...",
    "condition_of_validity": "The invariant that must hold: **capability negotiation result for a session is valid if and only if it was produced by an `initialize` request whose response was received on the same logical session, from the same backend that will serve subsequent requests for that session.** This decomposes into three testable conditions: - **Session identity binding:** th...",
    "decision_boundary": "The boundary is whether to trust a cached negotiation result on a warm connection. The rule: - **Trust** a cached `initialize` result only if the incoming request's `Mcp-Session-Id` matches the session that produced the cache entry *and* the connection's backend pin is unchanged since negotiation. - **Re-negotiate** (force a round-trip to the backend) when: ...",
    "operational_effect": "Downstream, this manifests as three distinct symptoms that are easy to misattribute: 1. **Mid-loop `-32601` on a \"negotiated\" method**, misclassified as transient and retried, burning budget. Fix: capability ledger entries carry a `negotiated_at` timestamp and a `backend_pin`; on any `-32601` for a method the ledger claims is supported, invalidate the ledger..."
  },
  "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": "4b0d46911390a9d7ca0cd2a0468b79bfc9f821724f3c682dfbc5ddab87062a1c",
    "verified_classes": [
      "StaleNegotiationError",
      "NegotiationRecord",
      "CapabilityLedger"
    ],
    "verified_functions": [
      "dispatch",
      "record",
      "assert_supports"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "StaleNegotiationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
