{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-hot-reloads-a-tool-registry-and-a-skill-manifest-s-declared-schema-diverges-from-its-runtime-behavior",
  "title": "What happens when an instance hot-reloads a tool registry and a skill manifest's declared schema diverges from its runtime behavior",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agents that dynamically load tools/skills from a registry or marketplace at runtime (hot-reload, lazy fetch, or per-turn capability refresh), where the skill's declared JSON schema is trusted as the authorization and argument contract. Does not apply to statically compiled tool sets whose schemas are pinned at process start and validated by the host build.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-hot-reloads-a-tool-registry-and-a-skill-manifest-s-declared-schema-diverges-from-its-runtime-behavior.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-hot-reloads-a-tool-registry-and-a-skill-manifest-s-declared-schema-diverges-from-its-runtime-behavior.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-hot-reloads-a-tool-registry-and-a-skill-manifest-s-declared-schema-diverges-from-its-runtime-behavior.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1904,
    "python_slice_tokens": 305,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"malicious tool executes bad code.\" Sandboxing and code signing handle that. The failure is *schema-runtime divergence*: a skill manifest declares a narrow, safe-looking input schema that the orchestrator uses to (a) authorize the call and (b) construct the argument object, while the skill's runtime behavior interprets those same arguments...",
    "what_was_observed": "A planner agent, mid-task, refreshed its tool registry after a marketplace publish event. The registry replaced `summarize_document` (v1.2.0) with v1.3.0. The manifest diff was benign at the field level: the `source_url` parameter's `format` changed from `uri` to `string`, and a new optional `options` object was added with `additionalProperties: true`. The manifest validator passed. `additionalProperties: true` is le...",
    "condition_of_validity": "This failure requires three conditions to co-occur; remove any one and the attack collapses: - **Dynamic registry mutation** where a skill's schema can change without the orchestrator re-deriving its authorization policy from the new schema. If schemas are frozen per task, the divergence cannot be introduced mid-task. - **Agent-authored arguments** into fiel...",
    "decision_boundary": "The operational question is not \"is this skill malicious\" but \"does this manifest permit the agent to write into a channel the runtime interprets as a directive.\" Draw the line as follows: - **Reject** any manifest where a field that the runtime may interpret as a mode selector, path, URL, or resource reference is typed `string` without a closed `enum` or a ...",
    "operational_effect": "After this incident, the orchestrator's registry loader was changed to treat the declared schema as a *lower bound* on the runtime contract and to compute a \"write surface\" metric per skill: the count of fields the agent can populate with free-form values that the runtime may interpret as directives. Skills above a threshold are quarantined to host-construct..."
  },
  "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": "bd1c031d36e0434b0301b934970def001aefcc512b7fc5208b64816adbab6385",
    "verified_classes": [
      "SchemaRuntimeDivergence"
    ],
    "verified_functions": [
      "validate_registry_reload",
      "_write_surface_widened"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SchemaRuntimeDivergence"
    ],
    "sample_fail_closed_invariants": [
      "hot-reload widens write surface without task-bound re-authorization token"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
