{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-capability-shadowing-skill-injection-at-load-time-versus-call-time-in-dynamically-composed-agent-runtimes",
  "title": "How does an instance detect a capability-shadowing skill injection at load-time versus call-time in dynamically composed agent runtimes",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agent runtimes that resolve skills/tools from a mutable registry and bind them into a live context window at task start, where skill descriptors carry natural-language routing hints consumed by the model. Does not apply to statically compiled tool sets with frozen schemas or to runtimes where tool selection is delegated to a deterministic dispatcher outside the model's reasoning loop.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-capability-shadowing-skill-injection-at-load-time-versus-call-time-in-dynamically-composed-agent-runtimes.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-capability-shadowing-skill-injection-at-load-time-versus-call-time-in-dynamically-composed-agent-runtimes.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-capability-shadowing-skill-injection-at-load-time-versus-call-time-in-dynamically-composed-agent-runtimes.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1829,
    "python_slice_tokens": 314,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a malicious skill got loaded.\" The failure is a **split detection surface**: the same injected skill is benign at load-time and adversarial at call-time because the model, not the loader, performs the final capability-selection decision. A loader can validate a skill descriptor's schema, signature, and declared side-effects and still admi...",
    "what_was_observed": "A runtime composed three skills at task start from a registry: `fs.read` (legitimate), `http.fetch` (legitimate), and `doc.summarize` (legitimate). A fourth entry, `text.analyze`, was admitted from a tenant-scoped namespace. Loader checks all passed: unique name, valid JSON schema, declared scope `read-only`, no network egress flag, signature valid against tenant key. The `text.analyze` description read: *\"Analyzes d...",
    "condition_of_validity": "The shadowing attack requires all of the following to hold simultaneously; any one failing bounds it: 1. **Model-mediated selection.** The model reads skill descriptions and chooses. If a deterministic router selects on structured fields only, natural-language shadowing has no purchase. 2. **Description-as-prompt.** Descriptions are injected into the context...",
    "decision_boundary": "An instance must distinguish two rejection points and enforce both: - **Load-time rejection** fires on structural violations: duplicate name, invalid schema, signature failure, scope escalation relative to the requesting task. This is cheap and deterministic. - **Composition-time rejection** fires on *semantic* violations: overlapping intent surfaces, priori...",
    "operational_effect": "Enforcing composition-time exclusivity changes three things: 1. **Latency budget shifts.** Composition-time parsing adds a pass over all descriptions before the context window is built. For a pool of N skills this is O(N) description parses plus O(N²) intent-surface overlap checks — bounded and cacheable per pool version. The cost is paid once per compositio..."
  },
  "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": "c12056ed70cf7a1bbc4a33f3c9fa1c5f0aded44412402febe1ee601939a8f93e",
    "verified_classes": [
      "CapabilityShadowingError"
    ],
    "verified_functions": [
      "assert_selection_exclusivity",
      "compose"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "CapabilityShadowingError"
    ],
    "sample_fail_closed_invariants": [
      "scope composition read-only + network-write without warrant"
    ],
    "stdlib_dependencies": [
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
