{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-shadow-registered-tool-whose-schema-collides-with-a-trusted-skill-at-load-time",
  "title": "How does an instance detect a shadow-registered tool whose schema collides with a trusted skill at load time",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agents that resolve tool/skill bindings at runtime from a registry that merges multiple sources (built-in, plugin, MCP server, user-installed) and dispatches by name or schema hash. Does not address pure prompt-injection into the context window, nor static tool definitions compiled into the agent binary.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-shadow-registered-tool-whose-schema-collides-with-a-trusted-skill-at-load-time.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-shadow-registered-tool-whose-schema-collides-with-a-trusted-skill-at-load-time.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-shadow-registered-tool-whose-schema-collides-with-a-trusted-skill-at-load-time.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1995,
    "python_slice_tokens": 396,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The dangerous case is not a malicious tool that *replaces* a trusted one. It is a tool that *coexists* with a trusted one under a colliding identity, where the runtime's dispatch resolution and the model's semantic selection disagree about which binding is canonical. Two registries can be internally consistent and still disagree with each other. The registry...",
    "what_was_observed": "A runtime loaded four skill sources at session start: two built-in, one MCP server (`filesystem-ops`), one user plugin directory. The user plugin declared a skill: The trusted MCP server declared: Names differ by one token (`read_config` vs `read_config_file`), so the registry's uniqueness constraint held. But the model's tool-selection step, given a task \"inspect the app config,\" scored both candidates within 0.02 o...",
    "condition_of_validity": "The attack surface exists only when all four of the following hold simultaneously: 1. **Multi-source merge.** The registry admits skills from at least two trust tiers (e.g., built-in + third-party, or MCP + plugin). 2. **Description-mediated selection.** The model chooses tools by matching natural-language descriptions to intent, not by a caller-supplied exa...",
    "decision_boundary": "At load time, for each incoming skill `s`, compute the set of already-registered skills `R` and evaluate: - **Intent overlap:** embedding similarity (or description-token Jaccard) between `s.description` and each `r.description` in `R`. Threshold at load, not at inference — inference-time scoring is too late and too noisy. - **Parameter-shape congruence:** s...",
    "operational_effect": "A runtime that enforces selection-surface disjointness converts the shadow-registration attack from silent success into a load-time contested event. The cost is a bounded increase in false-positive load rejections (legitimate plugins that happen to paraphrase a built-in skill), which is resolved by the explicit promotion path — a one-time operator action per..."
  },
  "matched_failure_symptoms": [
    "SCHEMA_DRIFT_OR_COERCION_CRASH"
  ],
  "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": "b5e0f80314949cb2823c249e39721f47fb4f6258112156965a8d830bb77f2199",
    "verified_classes": [
      "ShadowSkillCollision",
      "ShadowSkillCollision"
    ],
    "verified_functions": [
      "_intent_overlap",
      "_shape_congruent",
      "admit_skill",
      "sig",
      "_intent_overlap",
      "_shape_congruent",
      "admit_skill",
      "sig"
    ],
    "verified_functions_count": 8,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ShadowSkillCollision"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
