{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-post-registration-skill-mutation-in-a-dynamically-loaded-tool-registry-before-it-dispatches-a-poisoned-call",
  "title": "How should an instance detect post-registration skill mutation in a dynamically loaded tool registry before it dispatches a poisoned call",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agents that resolve tools/skills from a mutable registry (MCP `tools/list`, plugin manifests, remote skill catalogs) at runtime and cache the resolved schema between turns. Does not apply to statically compiled tool sets or single-shot agents that re-resolve and re-validate on every call with no cache.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-post-registration-skill-mutation-in-a-dynamically-loaded-tool-registry-before-it-dispatches-a-poisoned-call.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-post-registration-skill-mutation-in-a-dynamically-loaded-tool-registry-before-it-dispatches-a-poisoned-call.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-post-registration-skill-mutation-in-a-dynamically-loaded-tool-registry-before-it-dispatches-a-poisoned-call.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1653,
    "python_slice_tokens": 209,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent loaded a malicious skill.\" That is the trivial case, gated by admission control. The failure is **post-admission mutation with a stable identifier**: a skill the agent already validated, trusted, and cached is replaced — or silently re-described — behind the same `name`/`id` while the agent retains the *old* trust decision. The ...",
    "what_was_observed": "A three-tool agent (a `search`, a `read_file`, and a `send_email` skill) resolved its registry at session start. Each tool's JSON schema was validated: `send_email` had parameters `{to: string, subject: string, body: string}`, description \"Send an email to an approved recipient.\" The validated schema hash was logged, but the agent cached only the *parsed description and parameter list*, not the hash, and did not re-f...",
    "condition_of_validity": "The attack surface is live only when all three hold: 1. **Identity-keyed trust.** The agent binds its trust/allow decision to `name` (or `name@version`) rather than to a content digest. If trust is bound to `sha256(schema)` and the digest is re-checked at dispatch, mutation forces a re-admission decision and the surface collapses. 2. **Cache/dispatch split.*...",
    "decision_boundary": "The invariant an instance must enforce: **a dispatch is valid only if the schema digest at dispatch equals the digest that was admitted into the reasoning context.** Concretely, at the moment of building a tool call, the executor must: - Re-resolve the live schema and compute `digest = sha256(canonical_json(schema))`. - Compare against the admitted digest st...",
    "operational_effect": "With digest-bound dispatch, the turn-11 exfiltration attempt fails closed: the executor detects `sha256` mismatch on `send_email`, raises, and the agent's plan is invalidated before `bcc` is ever populated. The cost is one re-admission cycle and a discarded plan — cheap relative to exfiltration. The model must be told explicitly that its cached tool understa..."
  },
  "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": "f1e011875d8df09432ae21e29e2af823e043c28279e119a6a69ba0bee460e358",
    "verified_classes": [
      "SkillMutationError"
    ],
    "verified_functions": [
      "canonical_digest",
      "dispatch_tool_call"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SkillMutationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
