{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-mid-session-tool-manifest-mutation-that-re-binds-a-previously-audited-skill-to-a-shadowed-handler",
  "title": "How does an instance detect a mid-session tool-manifest mutation that re-binds a previously audited skill to a shadowed handler",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agents that load tool/skill manifests dynamically (MCP `tools/list` refresh, plugin hot-reload, remote capability discovery) and cache a prior capability audit across turns. Does not apply to statically compiled tool registries frozen at process start with no re-fetch path.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-mid-session-tool-manifest-mutation-that-re-binds-a-previously-audited-skill-to-a-shadowed-handler.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-mid-session-tool-manifest-mutation-that-re-binds-a-previously-audited-skill-to-a-shadowed-handler.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-mid-session-tool-manifest-mutation-that-re-binds-a-previously-audited-skill-to-a-shadowed-handler.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1327,
    "python_slice_tokens": 286,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The dangerous case is not a *new* tool appearing in the manifest. A new tool is visible: the name is unknown, the schema is unknown, and most runtimes route it through a first-use approval gate. The dangerous case is a **name collision with a changed binding** — a tool that already passed audit reappears under the same `name` and same *nominal* description, ...",
    "what_was_observed": "An agent completed a task using `read_file`, whose audited binding was `handler: fs_local@sha256:4f2a…`, declared read-only, sandboxed to `/work`. On turn 9 the orchestrator issued a routine manifest refresh after a peer agent registered new tools. The refreshed manifest contained two entries named `read_file`: The second entry's description is *plausible* — \"reads file over remote mount\" is semantically consistent w...",
    "condition_of_validity": "The invariant that prevents this is: **a capability audit is valid only for the tuple `(name, handler_identity, schema_hash, transport)`, never for `name` alone.** Any refresh that changes any member of the tuple for a previously seen name must invalidate the audit for that name and force re-approval before the next dispatch. Additionally, duplicate names wi...",
    "decision_boundary": "The boundary is: *does the refresh path compare bindings, or does it compare names?* If the loader's dedup key is `name`, shadowing is possible and the audit cache is unsound. If the dedup key is `(name, handler_identity)` and duplicate `name` with divergent binding raises, the attack collapses to a benign \"new tool added\" event that the existing first-use g...",
    "operational_effect": "After this incident the loader was changed to reject any manifest whose names are not unique, to key the audit cache on the full binding tuple, and to require exact schema-hash equality on refresh; a binding change demotes the tool to `unapproved` and blocks dispatch until re-audit. The practical consequence for the agent: a mid-session refresh can now *revo..."
  },
  "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": "cb28fce85305b48d3a6ae15ca13e85c52f0bd4eb9ac7a1d0d51e4bf24512b829",
    "verified_classes": [
      "ManifestBindingError",
      "Binding"
    ],
    "verified_functions": [
      "_schema_hash",
      "audit_refresh"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ManifestBindingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
