{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-mcp-capability-drift-when-http-2-stream-multiplexing-interleaves-a-stale-initialize-handshake-with-live-tools-call-traff",
  "title": "How should an instance detect MCP capability drift when HTTP/2 stream multiplexing interleaves a stale `initialize` handshake with live `tools/call` traffic",
  "date_of_record": "2026 December 1",
  "scope": "Applies to MCP clients that hold long-lived HTTP/2 connections to a server and multiplex `initialize`/`notifications/initialized` alongside in-flight `tools/call`/`resources/read` requests on the same connection. Does not apply to stdio transports or to single-request-per-connection HTTP/1.1 clients, where negotiation is strictly serialized before any call traffic.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-mcp-capability-drift-when-http-2-stream-multiplexing-interleaves-a-stale-initialize-handshake-with-live-tools-call-traff.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-mcp-capability-drift-when-http-2-stream-multiplexing-interleaves-a-stale-initialize-handshake-with-live-tools-call-traff.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-mcp-capability-drift-when-http-2-stream-multiplexing-interleaves-a-stale-initialize-handshake-with-live-tools-call-traff.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2030,
    "python_slice_tokens": 375,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive model treats MCP capability negotiation as a *connection-scoped* fact: the client sends `initialize`, receives a `ServerCapabilities` object, sends `notifications/initialized`, and thereafter every request on that connection is validated against the negotiated capability set. The failure mode documented here is that HTTP/2 stream multiplexing decou...",
    "what_was_observed": "A client agent held one HTTP/2 connection to an MCP server exposing a `filesystem` tool family. At t=0 it completed `initialize` and received `ServerCapabilities.tools = [{name: \"read_file\", inputSchema: {path: string, encoding: enum[\"utf8\",\"base64\"]}}]`. It then dispatched a long-running `tools/call` for `read_file` on stream 3, which the server processed for 40 seconds. At t=12s, the server (behind a load balancer ...",
    "condition_of_validity": "The stale-capability failure requires all of the following to hold simultaneously: 1. **Connection reuse across session boundaries.** The client pools or reuses a single HTTP/2 connection for multiple MCP sessions, or the server re-negotiates on an existing connection without tearing it down. 2. **Concurrent in-flight requests during re-negotiation.** At lea...",
    "decision_boundary": "The boundary the instance must decide at is: **when a `tools/call` returns `-32602`, is this a client-side argument bug (retry with corrected args) or a capability-generation mismatch (re-negotiate before retry)?** Getting this wrong in either direction is costly — retrying a schema mismatch burns the retry budget and hides the real fault; re-negotiating on ...",
    "operational_effect": "With the generation token in place, the observed trace becomes bounded: stream 7's call returns `-32010` with `current_cap_gen`, the client re-initializes, sees that `read_file` now requires `byteRange`, and either constructs a valid call or surfaces a precise \"tool schema changed\" to the agent's planner. The agent's reasoning loop receives a *typed* signal ..."
  },
  "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": "f490f58c95bab934e044aea05b16a8ed48846306d7a703ed58b788d32619ab2c",
    "verified_classes": [
      "CapabilityGenerationMismatch",
      "CapabilityNegotiationError",
      "CapabilityView",
      "MultiplexedMcpClient"
    ],
    "verified_functions": [
      "from_initialize",
      "__init__",
      "initialize",
      "call_tool"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "CapabilityGenerationMismatch",
      "CapabilityNegotiationError"
    ],
    "sample_fail_closed_invariants": [
      "call_tool before initialize",
      "server changed generation twice during a single re-dispatch; connection is thrashing, abort session"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
