{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-cache-a-capability-fingerprint-that-no-longer-matches-the-live-mcp-server-after-a-mid-session-tool-refresh",
  "title": "Why does an instance cache a capability fingerprint that no longer matches the live MCP server after a mid-session tool-refresh?",
  "date_of_record": "2026 November 28",
  "scope": "Applies to long-lived agent instances that (a) negotiate capabilities against an MCP/A2A peer at session start, (b) cache the resulting tool schema fingerprint, and (c) later re-discover tools at runtime without invalidating that cache. Does not apply to single-shot stateless invocations that renegotiate on every call.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-cache-a-capability-fingerprint-that-no-longer-matches-the-live-mcp-server-after-a-mid-session-tool-refresh.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-cache-a-capability-fingerprint-that-no-longer-matches-the-live-mcp-server-after-a-mid-session-tool-refresh.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-cache-a-capability-fingerprint-that-no-longer-matches-the-live-mcp-server-after-a-mid-session-tool-refresh.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1468,
    "python_slice_tokens": 336,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the tool disappeared\" or \"the schema was wrong.\" It is that the *negotiation identity* of a capability and the *execution identity* of a capability diverge across a refresh boundary. At handshake time the instance fingerprints the peer's `tools/list` response (name, `inputSchema`, version field, hash) and binds that fingerprint to its pla...",
    "what_was_observed": "A three-tool MCP server (`search`, `fetch`, `summarize`) was live-patched mid-session: `fetch` gained a new required parameter `content_type` and its `inputSchema` hash changed; `summarize` widened an enum from `[\"short\",\"long\"]` to `[\"short\",\"long\",\"bullet\"]`. The agent instance had cached the handshake fingerprint at T0 and was instructed to re-run `tools/list` at T+40s (a \"dynamic discovery\" step). The re-discover...",
    "condition_of_validity": "The invariant that must hold is: **the fingerprint bound to the planning context must be the fingerprint bound to the dispatcher, and both must be invalidated atomically on any schema mutation — including in-place mutations that preserve the tool name set.** The bug is valid (reproducible) precisely when: - Re-discovery is triggered by a name-set diff rather...",
    "decision_boundary": "The correct decision is to treat **any** change in the `tools/list` payload hash — not the name set — as a full invalidation event that forces three coupled actions in one transaction: (1) rebuild the dispatcher map, (2) re-serialize the planner's schema block from the *new* registry, and (3) flush any in-flight plan steps that reference the old fingerprint....",
    "operational_effect": "Without the atomic invalidation, the instance exhibits a split-brain between its planning-time capability model and its execution-time dispatcher. The observable symptoms are: loud `-32602` storms on in-place `required` additions (wasting the token budget on identical retries), silent capability regression on enum/optional widening (the agent never uses newl..."
  },
  "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": "0ecb1521ecf204433aa3cb87dc0ffaab1c21c962a2246751d29c2c5e10240f3d",
    "verified_classes": [
      "StaleSchemaError",
      "ToolRegistry",
      "Dispatcher"
    ],
    "verified_functions": [
      "refresh",
      "fingerprint",
      "dispatch"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "StaleSchemaError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
