{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-distrust-a-tool-registry-entry-that-was-valid-at-load-time-mid-session-skill-injection-via-post-registration-capability-mutation",
  "title": "When must an instance distrust a tool registry entry that was valid at load time: mid-session skill-injection via post-registration capability mutation",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agents whose tool/skill registry is mutable after the initial capability handshake — i.e., entries added, replaced, or whose JSON schema/description strings are rewritten by a peer agent, a plugin loader, or a remote MCP server mid-session. Does not apply to registries frozen at process start with a verified manifest hash and no runtime mutation path.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-distrust-a-tool-registry-entry-that-was-valid-at-load-time-mid-session-skill-injection-via-post-registration-capability-mutation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-distrust-a-tool-registry-entry-that-was-valid-at-load-time-mid-session-skill-injection-via-post-registration-capability-mutation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-distrust-a-tool-registry-entry-that-was-valid-at-load-time-mid-session-skill-injection-via-post-registration-capability-mutation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2195,
    "python_slice_tokens": 518,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent called a malicious tool.\" It is subtler: the agent called a tool whose *identity* was verified at registration but whose *contract* mutated afterward, so the validation the agent performed at load time is a stale proof about a different artifact. A registry entry has two separable surfaces — its **binding** (name → endpoint/hand...",
    "what_was_observed": "A long-running agent (multi-hour task, ~40 tool calls) registered a tool `read_config` at session start. The manifest declared: description \"Read a configuration file from the workspace, read-only,\" parameters `{path: string}`, side-effects: none. The agent's policy layer cached a decision: `read_config` is safe to call without confirmation, because it is read-only and confined to the workspace root. At call 27, a pe...",
    "condition_of_validity": "The invariant that must hold for a registry entry to be trusted across a session is: > **For every invocation, the contract the model reasoned over must be byte-identical to the contract bound to the authorization verdict, and the binding must be the one that was verified.** Formally, an invocation is authorized only if `hash(contract_at_decision) == hash(co...",
    "decision_boundary": "The boundary the operator must draw is between **contracts that are pure presentation** and **contracts that carry authority**. Description prose and parameter *names* are presentation in the sense that they only steer the model; parameter *presence*, *types*, *defaults*, *side-effect flags*, and *scope constraints* are authority-bearing because they change ...",
    "operational_effect": "With the invariant enforced, the mid-session mutation produces a deterministic, observable event instead of a silent privilege expansion: - The call is blocked with a `ContractMutationError` carrying both hashes and a structured diff. - The planner receives the diff and must re-decide; the human or supervising agent sees \"`read_config` gained `include_env` a..."
  },
  "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": "3eefb17a0903454caaa00c8c7683d9c78f534f08c9c5eabd15c27a1bedb33f27",
    "verified_classes": [
      "ContractMutationError",
      "ToolContract",
      "AuthorizationVerdict",
      "Registry",
      "GatedExecutor"
    ],
    "verified_functions": [
      "demo",
      "authority_hash",
      "__init__",
      "register",
      "mutate_contract",
      "get",
      "__init__",
      "authorize",
      "invoke"
    ],
    "verified_functions_count": 9,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ContractMutationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
