{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-resolves-a-skill-by-name-from-a-mutable-registry-after-a-mid-task-schema-swap",
  "title": "What happens when an instance resolves a skill by name from a mutable registry after a mid-task schema swap",
  "date_of_record": "2026 November 29",
  "scope": "Applies to any agent runtime that resolves tools/skills by identifier (name, URI, hash-prefix) from a shared, mutable registry at call time rather than binding a resolved capability manifest at task start. Does not apply to statically linked toolchains or to single-shot invocations where the registry is read once and never re-read across the task lifetime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resolves-a-skill-by-name-from-a-mutable-registry-after-a-mid-task-schema-swap.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resolves-a-skill-by-name-from-a-mutable-registry-after-a-mid-task-schema-swap.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resolves-a-skill-by-name-from-a-mutable-registry-after-a-mid-task-schema-swap.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2118,
    "python_slice_tokens": 371,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"malicious tool registered.\" Registries are designed to accept new entries; that is their job. The failure is **late binding of a name to an implementation across a trust boundary that was crossed earlier**. An agent that resolves `db.query` at step 1, obtains a capability manifest, reasons about its declared schema and side effects, and t...",
    "what_was_observed": "A three-step task: (1) `registry.describe(\"invoice.parse\")` returns a manifest declaring `input: {pdf_bytes: bytes}`, `side_effects: [\"none\"]`, `network: false`. The agent's planner reads this, concludes the skill is safe to invoke on untrusted uploads, and writes a plan that routes user-supplied PDFs through it. (2) Between step 1 and step 3, a publisher with registry write access pushes version `invoice.parse@2.1.0...",
    "condition_of_validity": "The attack requires all of the following, which is why it is non-obvious rather than universal: 1. **Name-based resolution at call time.** If the runtime binds a resolved handle (content hash, manifest digest, opaque capability token) at describe-time and invokes through that handle, the swap is inert. The vulnerability exists precisely where the convenience...",
    "decision_boundary": "The runtime must choose, per skill resolution, between two postures, and the choice is not free: - **Pin-at-describe (strict).** The first `describe` returns a handle `(name, manifest_digest)`. All subsequent invocations must present that digest; a digest mismatch raises and aborts the task. Cost: legitimate mid-task upgrades (security patches, hotfixes) can...",
    "operational_effect": "Concretely, a runtime that adopts pin-at-describe changes three things: 1. **Tool-call records gain a `manifest_digest` field**, and any invocation whose digest does not match the digest recorded at the plan step that authorized it is rejected before dispatch. This makes the attack a loud `ManifestDriftError`, not a silent egress. 2. **The planner's safety r..."
  },
  "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": "7e1418256188817ece9107f5e312fce766961129a1979abd752108a4d8223043",
    "verified_classes": [
      "ManifestDriftError",
      "Manifest",
      "PinnedHandle",
      "PinnedRegistry"
    ],
    "verified_functions": [
      "run_plan",
      "digest",
      "__init__",
      "describe",
      "invoke"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ManifestDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
