{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-capability-shadowing-drift-when-a-lazily-reloaded-mcp-tool-registry-silently-rebinds-a-previously-warranted-tool-name",
  "title": "How should an instance detect capability-shadowing drift when a lazily reloaded MCP tool registry silently rebinds a previously warranted tool name",
  "date_of_record": "2026 December 1",
  "scope": "Applies to agent runtimes that load tool schemas from a mutable registry (MCP servers, plugin manifests, hot-reloaded skill packs) and cache tool identity across turns or checkpoint/resume boundaries. Does not cover statically compiled tool sets or single-shot inference where the schema is fixed at process start.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-capability-shadowing-drift-when-a-lazily-reloaded-mcp-tool-registry-silently-rebinds-a-previously-warranted-tool-name.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-capability-shadowing-drift-when-a-lazily-reloaded-mcp-tool-registry-silently-rebinds-a-previously-warranted-tool-name.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-capability-shadowing-drift-when-a-lazily-reloaded-mcp-tool-registry-silently-rebinds-a-previously-warranted-tool-name.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2000,
    "python_slice_tokens": 407,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure examined here is not prompt injection through tool *output* and not a malicious tool that lies about its behavior in a description. It is **capability shadowing**: a tool name that was present, warranted, and used earlier in a session gets rebound to a different implementation (different schema, different side-effect class, or different trust ori...",
    "what_was_observed": "A long-horizon coding agent maintained a tool cache keyed by name. On turn 40, a checkpoint/resume cycle re-initialized the MCP client, which issued `tools/list` and merged the response into the existing cache using a name-keyed upsert. The server had been upgraded between the checkpoint and the resume; the new manifest reused the name `run_tests` but changed the schema: the `command` parameter, previously an enum of...",
    "condition_of_validity": "The failure requires the conjunction of four conditions; remove any one and the attack surface closes: 1. **Name-stable, content-mutable registry.** Tool identity is keyed on a string that survives reload while the schema, endpoint, or trust origin behind it can change. Most MCP clients key caches this way by default. 2. **Cross-boundary persistence of tool ...",
    "decision_boundary": "The runtime must decide, on every registry reload, whether a name collision is a **benign re-registration** (identical schema digest, same trust origin) or a **capability shadow** (any digest, origin, or side-effect-class change). The decision boundary is the schema digest, not the name and not the description text: - If `digest(new) == digest(cached)` and o...",
    "operational_effect": "When the boundary is enforced, the failure converts from silent poisoning into a loud, recoverable re-warrant event: the agent is told \"`run_tests` changed schema since you planned this call; here is the current argument contract; re-issue or abandon.\" Cost is one extra turn and a re-plan. When it is not enforced, the agent's stale schema belief becomes an *..."
  },
  "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": "7b547effdf9eb5bb9b9e2eed1503c539f22463d318fdef761450f18ca5611cba",
    "verified_classes": [
      "CapabilityShadowError",
      "ToolManifest",
      "ToolWarrant",
      "Registry",
      "ExecutionGate"
    ],
    "verified_functions": [
      "run_plan",
      "digest",
      "load",
      "resolve",
      "__init__",
      "warrant",
      "execute"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "CapabilityShadowError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
