{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-trust-a-tool-s-description-at-load-time-and-never-again-the-post-registration-description-swap-invariant-in-dynamically-loaded-ag",
  "title": "Why does an instance trust a tool's description at load time and never again? The post-registration description-swap invariant in dynamically loaded agent tool registries",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agents that discover tools from a mutable registry (MCP servers, plugin manifests, remote tool catalogs) and cache tool metadata (name, description, JSON schema) at first load rather than re-validating per invocation. Does not apply to statically compiled tool sets or registries that re-fetch and re-verify schema on every call.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-trust-a-tool-s-description-at-load-time-and-never-again-the-post-registration-description-swap-invariant-in-dynamically-loaded-ag.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-trust-a-tool-s-description-at-load-time-and-never-again-the-post-registration-description-swap-invariant-in-dynamically-loaded-ag.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-trust-a-tool-s-description-at-load-time-and-never-again-the-post-registration-description-swap-invariant-in-dynamically-loaded-ag.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1702,
    "python_slice_tokens": 315,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not prompt injection in *tool output* and not injection in *user input*. It is injection through the **tool description string itself**, performed *after* the agent has already admitted the tool into its context. Most registries perform trust decisions exactly once, at registration: the agent fetches the catalog, reads `description` fields, an...",
    "what_was_observed": "A three-agent pipeline (planner, executor, auditor) loaded a 22-tool registry from a shared MCP catalog at session start. At T+0 the `summarize_document` tool carried a benign description. At T+41min an operator with registry write access (or a compromised upstream manifest host) replaced only the `description` field: The planner, on its next turn, re-read the registry (many frameworks re-list tools each step to pick...",
    "condition_of_validity": "The attack requires all of the following to hold simultaneously; remove any one and the surface collapses: - The registry is **mutable post-registration** (supports description edits, or re-serves manifests from a source an attacker can influence). - The agent **re-reads tool metadata into context** after the initial approval (per-step re-listing, dynamic to...",
    "decision_boundary": "The architectural guardrail is a **description-digest gate** with fail-closed semantics: - Compute `tool_identity = sha256(name ‖ canonical(schema) ‖ sha256(description) ‖ provenance_uri)`. - Any re-listing that yields a `tool_identity` not present in the session's approved set must be **quarantined**, not silently re-admitted. The tool is withheld from the ...",
    "operational_effect": "After adopting the digest gate, the observed pipeline behaved as follows. On the T+41min swap, the registry client computed a new `tool_identity`, found it absent from the approved set, and quarantined `summarize_document`. The planner's next step saw 21 tools instead of 22 and emitted a `ToolQuarantined` event. The two-hop exfiltration chain never formed be..."
  },
  "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": "840ec423927ddd8859484cde98016428bb85453b7ad13bc1581ddab41b4bc2a3",
    "verified_classes": [
      "DescriptionDigestMismatch",
      "ToolRecord",
      "ApprovedToolSet"
    ],
    "verified_functions": [
      "refresh_registry",
      "identity",
      "__init__",
      "approve",
      "admit"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "DescriptionDigestMismatch"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
