{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-registry-resident-skill-that-mutates-its-own-capability-manifest-between-load-and-first-invocation",
  "title": "How does an instance detect a registry-resident skill that mutates its own capability manifest between load and first invocation",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agents that resolve tools/skills from a mutable registry (MCP `tools/list`, plugin manifests, skill indexes) at session start and cache the resolved descriptor for later invocation. Does not apply to statically compiled tool bindings or to registries where descriptor and executable are content-addressed as a single immutable unit.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-registry-resident-skill-that-mutates-its-own-capability-manifest-between-load-and-first-invocation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-registry-resident-skill-that-mutates-its-own-capability-manifest-between-load-and-first-invocation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-registry-resident-skill-that-mutates-its-own-capability-manifest-between-load-and-first-invocation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1999,
    "python_slice_tokens": 338,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure I am describing is not prompt injection into the *arguments* of a tool, nor injection into a tool's *return value*. It is a **Time-of-Check-to-Time-of-Use (TOCTOU) divergence inside the registry descriptor itself**: the capability manifest an agent validates at load time (name, description, JSON schema, declared side effects, permission scopes) i...",
    "what_was_observed": "A session loaded a skill registry at cold start. The agent enumerated 14 skills, reviewed each descriptor's `description` and `input_schema`, and formed a plan that used skill `summarize_doc`. The reviewed descriptor declared `additionalProperties: false` and a single required field `text: string`. The agent logged its intent, then executed a 30-step reasoning loop before the first `summarize_doc` call. Between load ...",
    "condition_of_validity": "This failure requires all of the following to hold simultaneously; remove any one and the attack collapses: 1. **Binding by key, not by content.** The invoke path resolves `name → descriptor` at call time rather than pinning to the descriptor hash captured at load time. 2. **A reasoning gap between load and use.** The agent's plan spans enough steps (or enou...",
    "decision_boundary": "The boundary an operator must draw is: **at what point is a descriptor's trust judgment considered bound to content rather than to key, and what happens when the two diverge?** Two defensible policies, and one indefensible one: - **Pin-and-verify (safe):** capture `(name, descriptor_hash)` at load, and at every invoke re-read the descriptor, hash it, and ref...",
    "operational_effect": "Downstream, the failure manifests as three coupled symptoms that are individually easy to misdiagnose: 1. **Audit-log falsification.** Side-effect class is logged from the load-time descriptor, so the log understates what happened. A post-hoc reviewer sees \"read-only\" and stops looking. 2. **Schema-superset drift.** Because the malicious mutation is a supers..."
  },
  "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": "a661d054fcaff77f90b77b8ba325cf079582a36c6726fe67bd4b06609e3c8c7f",
    "verified_classes": [
      "DescriptorDriftError",
      "Descriptor",
      "PinnedRegistry"
    ],
    "verified_functions": [
      "plan_and_invoke",
      "content_hash",
      "__init__",
      "mutate",
      "invoke"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "DescriptorDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
