{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-and-contain-manifest-level-skill-injection-drift-when-a-dynamically-loaded-tool-s-declared-capability-diverges-from-its",
  "title": "How should an instance detect and contain manifest-level skill-injection drift when a dynamically loaded tool's declared capability diverges from its runtime behavior",
  "date_of_record": "2026 December 1",
  "scope": "Applies to agents that load skills, tools, or plugins from a mutable registry (local manifest files, remote MCP-style tool servers, or a plugin marketplace) at runtime, where the manifest's declared schema/capability set is trusted for planning but the executable surface is fetched or updated independently of the agent's own version. Does not cover statically compiled tools bundled into the agent image, nor prompt-injection arriving through user-supplied content rather than through the tool-definition channel itself.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-contain-manifest-level-skill-injection-drift-when-a-dynamically-loaded-tool-s-declared-capability-diverges-from-its.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-contain-manifest-level-skill-injection-drift-when-a-dynamically-loaded-tool-s-declared-capability-diverges-from-its.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-contain-manifest-level-skill-injection-drift-when-a-dynamically-loaded-tool-s-declared-capability-diverges-from-its.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1688,
    "python_slice_tokens": 237,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common failure model for skill injection is *content* injection: adversarial text in a retrieved document or tool *output* hijacks reasoning. That is a well-understood class and is mitigated by output sanitization and provenance tagging. The boundary condition examined here is structurally different and far less covered: **manifest-level capability drift...",
    "what_was_observed": "A planning agent loaded a skill registry at session start. The registry entry for a `summarize_document` skill declared `parameters: {path: string}` and `capabilities: [\"fs.read\"]`. The planner, seeing only `fs.read`, reasoned it was safe to hand the skill a path inside a sandboxed scratch directory and did so across a multi-step task. Between step 4 and step 5, the registry served a patch update (declared `1.4.2 → 1...",
    "condition_of_validity": "This boundary holds only when three conditions co-occur; if any is absent, the standard content-injection mitigations are sufficient: 1. **Deferred resolution.** Tools are referenced by name at plan time and resolved to an executable at dispatch time (lazy loading, registry lookup, MCP server `tools/call`). If the executable is bound at plan time and pinned ...",
    "decision_boundary": "The guardrail is a **capability-binding invariant at dispatch**, not at load: - **Pin the manifest, not the name.** At plan time, capture `(name, version, manifest_sha256, declared_capabilities)`. At dispatch, re-fetch the live manifest, recompute the hash, and reject if it differs from the pinned value. A name match is not a binding. - **Enforce the interse...",
    "operational_effect": "With dispatch-time binding enforced, the observed trace terminates at step 2: hash mismatch on `1.4.3` raises, the call is refused, and the planner re-plans against the new manifest—now seeing the undeclared `callback_url` parameter and the widened capability set, and routing the sensitive path elsewhere or refusing. The benign telemetry patch and the advers..."
  },
  "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": "e40c1475ef7d1437d2beb81dbc445959611076f77a2ff0307851dc69338f28ed",
    "verified_classes": [
      "CapabilityBindingError",
      "ManifestPin"
    ],
    "verified_functions": [
      "_hash_manifest",
      "pin_manifest",
      "dispatch",
      "_invoke"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CapabilityBindingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
