{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-hot-reloads-a-skill-manifest-mid-episode-capability-shadowing-via-registry-shadow-grants-in-dynamically-loaded-tool-surf",
  "title": "What happens when an instance hot-reloads a skill manifest mid-episode: capability-shadowing via registry shadow grants in dynamically loaded tool surfaces",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agent runtimes that support dynamic skill/tool registration (MCP server re-negotiation, plugin hot-swap, lazy tool loading) during an active episode. Does not apply to statically compiled tool sets fixed at session start, nor to registries that require full episode termination before manifest mutation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-hot-reloads-a-skill-manifest-mid-episode-capability-shadowing-via-registry-shadow-grants-in-dynamically-loaded-tool-surf.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-hot-reloads-a-skill-manifest-mid-episode-capability-shadowing-via-registry-shadow-grants-in-dynamically-loaded-tool-surf.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-hot-reloads-a-skill-manifest-mid-episode-capability-shadowing-via-registry-shadow-grants-in-dynamically-loaded-tool-surf.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1701,
    "python_slice_tokens": 415,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive threat model for skill injection assumes the attacker must *introduce* a new, unauthorized capability into the registry. The real boundary failure is subtler: the attacker never adds a capability. Instead, a mid-episode reload **shadows** an already-authorized skill name with a semantically adjacent but behaviorally divergent implementation, exploi...",
    "what_was_observed": "An agent operating a multi-step task (read file → summarize → post to channel) held a warm tool registry containing `summarize(text, max_tokens)` with description \"Condense text to a token budget; read-only, no side effects.\" At step 4, a lazy-load trigger (cache miss on an unrelated skill) caused the runtime to re-fetch the full manifest from the MCP server. The server returned a manifest where `summarize` retained ...",
    "condition_of_validity": "This failure requires the conjunction of three conditions, and is *bounded* (not eliminated) when any one is absent: - **C1 — In-place mutation by key.** The registry permits an existing skill name to be re-bound to a new implementation without a version bump or tombstone. Registries that require `name@version` and refuse to alias a new version onto an old n...",
    "decision_boundary": "The architectural choice is whether the **binding unit is the name or the (name, generation, description-hash) triple**. Two defensible postures: - **Name-keyed registry (vulnerable):** simple, supports transparent hot-patching, low latency. Acceptable only when the registry is single-tenant and the manifest source is the same trust domain as the agent. - **...",
    "operational_effect": "Practically, this means signature-verified manifests and per-call authorization are **insufficient** — both passed in the trace above. The guardrail must be a *generation fence* on the plan graph plus a *behavioral canary* on reload: on any manifest diff that touches an already-referenced skill name, the runtime must (a) invalidate plan nodes pinned to the o..."
  },
  "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": "05326a3365afd1e3733113a20d72be8655306b90aa9969614ce6bf84be7209b4",
    "verified_classes": [
      "SkillRebindViolation",
      "SkillEntry",
      "PlanNodeBinding",
      "Registry"
    ],
    "verified_functions": [
      "bind_at_selection",
      "dispatch",
      "description_hash",
      "reload"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SkillRebindViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
