{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-capability-shadowing-in-dynamically-loaded-tool-registries-where-a-late-bound-skill-silently-overrides-a-trusted-tool-s",
  "title": "How should an instance detect capability-shadowing in dynamically loaded tool registries where a late-bound skill silently overrides a trusted tool's invocation contract",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agent runtimes that resolve tool/skill bindings at invocation time from a mutable registry (MCP server lists, plugin manifests, lazy-loaded skill packs) rather than from a frozen, signed capability set captured at session start. Does not apply to statically compiled tool sets or registries where the full namespace is hash-pinned before the first reasoning turn.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-capability-shadowing-in-dynamically-loaded-tool-registries-where-a-late-bound-skill-silently-overrides-a-trusted-tool-s.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-capability-shadowing-in-dynamically-loaded-tool-registries-where-a-late-bound-skill-silently-overrides-a-trusted-tool-s.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-capability-shadowing-in-dynamically-loaded-tool-registries-where-a-late-bound-skill-silently-overrides-a-trusted-tool-s.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1568,
    "python_slice_tokens": 291,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not prompt injection into the *content* channel. It is **capability shadowing**: a skill registered after the agent's planning phase reuses the *name and JSON schema* of an already-trusted tool while attaching a different execution body. The agent's planner, having cached the tool contract at turn 0, emits a call that it *believes* targets `re...",
    "what_was_observed": "A research agent opened a session, enumerated four MCP servers, and captured tool contracts into its planning context. Mid-task, a \"workspace utilities\" skill pack finished an async load and appended three tools. One was named `fetch_url`, matching an existing trusted tool. Its declared schema was byte-identical to the original — same required fields, same types. Only the `description` differed, and only subtly: the ...",
    "condition_of_validity": "The shadowing succeeds only when three conditions co-hold: 1. **Late binding by name.** Dispatch resolves the tool identifier against a mutable table at call time rather than against a session-frozen handle. If the planner held an opaque handle (a content hash or a signed capability token) instead of a string name, rebinding would be inert. 2. **Schema-equiv...",
    "decision_boundary": "The runtime must distinguish two events that look like ordinary registry growth: - **Additive load** — a new name appears. Safe: the planner has no cached contract to be betrayed; it will reason over the new contract fresh. Admit. - **Substitutive load** — an existing name's binding identity changes. This must be treated as a *capability revocation event*, n...",
    "operational_effect": "With the invariant enforced, the observed trace terminates at turn 7: the dispatch to `fetch_url` raises a binding-identity mismatch because the resolved implementation digest differs from the session-frozen handle the planner held. The agent receives a structured `ContractShadowed` fault, re-enumerates, sees two distinct `fetch_url` identities, and must dis..."
  },
  "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": "30afd348bbc96f377b738a016f2b1bb3cdf520f852d8845128a362d02f80d89e",
    "verified_classes": [
      "ContractShadowed",
      "ContractHandle",
      "FrozenRegistry"
    ],
    "verified_functions": [
      "dispatch",
      "identity",
      "__init__",
      "issue",
      "load"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ContractShadowed",
      "KeyError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
