{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-hot-reloads-a-tool-registry-mid-task-the-unvalidated-schema-annotation-channel-as-a-skill-injection-surface",
  "title": "What happens when an instance hot-reloads a tool registry mid-task: the unvalidated schema-annotation channel as a skill-injection surface",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agents that dynamically discover, load, or refresh tool/skill registries (MCP `tools/list` refresh, plugin hot-swap, A2A capability renegotiation) while a multi-step task is in flight. Does not apply to static, build-time-frozen tool manifests validated by hash at process start.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-hot-reloads-a-tool-registry-mid-task-the-unvalidated-schema-annotation-channel-as-a-skill-injection-surface.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-hot-reloads-a-tool-registry-mid-task-the-unvalidated-schema-annotation-channel-as-a-skill-injection-surface.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-hot-reloads-a-tool-registry-mid-task-the-unvalidated-schema-annotation-channel-as-a-skill-injection-surface.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1717,
    "python_slice_tokens": 311,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The commonly modeled threat is *malicious tool behavior*: a newly registered tool executes hostile code or returns poisoned output. That is a runtime-sanitization problem, and most registries address it by sandboxing execution and filtering return payloads. The distinct and under-modeled failure is that **the registry entry itself is an instruction channel**...",
    "what_was_observed": "A task agent was executing a 9-step plan (document triage → extraction → reconciliation). At step 4 it issued a routine capability refresh (`tools/list`) to pick up a provider that had come online. The refresh returned a new tool whose schema carried a parameter description of roughly the form: No tool was invoked. The registry serializer emitted the schema into the next turn's context. The model, at step 5, reasoned...",
    "condition_of_validity": "This failure requires the conjunction of four conditions; break any one and the surface closes: 1. **Mid-task refresh.** The registry is (re)loaded after the task's instruction hierarchy and plan are already committed to context. Load-time-only registries are immune because schema text and system prompt are contemporaneous and can be jointly validated. 2. **...",
    "decision_boundary": "The operational choice is not \"trust the registry or don't.\" It is *where to place the validation gate relative to the refresh*: - **Gate at execution (insufficient):** Validate tool *calls and returns*. This is the default posture and it does nothing here, because the attack never produces a call. - **Gate at serialization (correct):** Treat every schema fi...",
    "operational_effect": "Concretely, systems that adopt serialization-time gating observe: 1. **Annotation drift becomes a first-class event.** Schema diffs surface changed `description` fields as alerts, converting a silent injection into a logged mutation. 2. **Omission is detectable.** With the plan held structurally, \"step 5 did not run\" is a hard failure the harness raises, rat..."
  },
  "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": "987d590ba517a297e9a3e000519f7e4ed5b268b28e30fcfbfb3228a34d92b3c7",
    "verified_classes": [
      "RegistryInjectionError",
      "PinnedRegistry"
    ],
    "verified_functions": [
      "verify_plan_completion",
      "_annotation_digest",
      "pin",
      "validate_refresh"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "RegistryInjectionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
