{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-reject-a-dynamically-loaded-tool-manifest-mid-session-skill-injection-via-manifest-supplied-instructions-and-the-signed-registry",
  "title": "When must an instance reject a dynamically loaded tool manifest mid-session: skill-injection via manifest-supplied instructions and the signed-registry invariant",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agents that resolve tool/skill manifests at runtime (MCP `tools/list`, plugin registries, remote skill catalogs) and merge manifest-supplied text into the active context. Does not cover statically compiled tool sets or manifests fully pinned at process start with no refresh path.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-dynamically-loaded-tool-manifest-mid-session-skill-injection-via-manifest-supplied-instructions-and-the-signed-registry.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-dynamically-loaded-tool-manifest-mid-session-skill-injection-via-manifest-supplied-instructions-and-the-signed-registry.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-reject-a-dynamically-loaded-tool-manifest-mid-session-skill-injection-via-manifest-supplied-instructions-and-the-signed-registry.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1626,
    "python_slice_tokens": 279,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"malicious tool executes bad code.\" It is subtler: a **tool manifest is itself an instruction-bearing artifact**, and agents routinely treat it as trusted context. A manifest's `description`, `when_to_use`, `examples`, `parameter_hints`, or `preconditions` fields are consumed by the planner as natural-language guidance. An attacker who can...",
    "what_was_observed": "A tool-discovery loop refreshed manifests every N turns. One skill, `calendar.sync`, fetched its descriptor from a URL whose response body included a benign-looking `when_to_use` string. After a routine refresh, the descriptor read: No code changed. No new tool appeared. The `calendar.sync` schema was byte-identical. But the planner, treating `when_to_use` as authoritative guidance, began calling `memory.export` and ...",
    "condition_of_validity": "The signed-registry mitigation is only valid under these conditions, and silently degrades otherwise: 1. **Whole-manifest signing, not field signing.** The signature must cover the exact serialized manifest including all prose fields. Signing only the JSON schema leaves `description`/`when_to_use` as an unsigned injection surface. Verify by canonicalizing th...",
    "decision_boundary": "The instance must reject — not warn, not quarantine-and-continue — when a manifest refresh presents text that would be instruction-classified and the signature does not cover that text under the pinned key. The boundary is the moment of context assembly, before the manifest text is concatenated into any prompt. Reject when: signature absent on prose fields; ...",
    "operational_effect": "With whole-manifest signing plus pinned-key verification plus data-classification of prose, the `calendar.sync` injection fails at context assembly: the refresh presents a manifest whose prose hash does not match the signed hash, the instance raises, the skill handle is frozen at its last-verified state, and the planner never sees the directive. The legitima..."
  },
  "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": "0f097b21127016427533d36ca135fc5353943ac065380e0c00f3be2503bce60a",
    "verified_classes": [
      "SkillManifestRejected",
      "PinnedSkill"
    ],
    "verified_functions": [
      "canonicalize",
      "verify_manifest_refresh",
      "assemble_tool_context"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SkillManifestRejected"
    ],
    "sample_fail_closed_invariants": [
      "unverified manifest may not enter context"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "hmac",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
