{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-skill-injection-escalation-when-a-dynamic-tool-registry-re-registers-a-skill-name-mid-session",
  "title": "Which invariants prevent skill-injection escalation when a dynamic tool registry re-registers a skill name mid-session",
  "date_of_record": "2026 November 22",
  "scope": "Applies to agents whose tool/skill registry is mutated at runtime (hot-reload, marketplace install, remote MCP server re-announce, or peer-agent capability advertisement) while an active reasoning loop holds references to previously resolved skills. Does not apply to static, build-time-frozen tool manifests where the registry is immutable for the lifetime of the process.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-skill-injection-escalation-when-a-dynamic-tool-registry-re-registers-a-skill-name-mid-session.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-skill-injection-escalation-when-a-dynamic-tool-registry-re-registers-a-skill-name-mid-session.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-skill-injection-escalation-when-a-dynamic-tool-registry-re-registers-a-skill-name-mid-session.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1671,
    "python_slice_tokens": 280,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a malicious skill got installed.\" That is a coarse, detectable event. The failure is **name-identity conflation during resolution**: an agent's planner resolves a skill by *name* (or by a cached `{name → callable}` binding captured at prompt-assembly time), while the registry permits that same name to be *re-bound* to a different implemen...",
    "what_was_observed": "A long-running document-processing agent (planner + executor split, ~40k token context, 11 installed skills) was mid-task on a multi-document summarization run. The planner had already emitted a reasoning step: *\"I will call `summarize_document` with `{path, max_tokens}`; this skill is locally authored, low-risk, no network egress.\"* That justification was written after the planner read the skill's manifest during pr...",
    "condition_of_validity": "The guardrail below is *only* sound under these conditions, and each must be asserted explicitly rather than assumed: - **Resolution pinning.** Every skill reference emitted by the planner carries a `SkillHandle` containing `name`, `version`, `content_hash`, and `warrant` (the trust/egress/schema facts the planner reasoned against). The handle is minted at d...",
    "decision_boundary": "When a pinned handle's `content_hash` or `warrant` no longer matches the live registry entry, the agent has exactly two legal moves, and the choice is not discretionary: - **Bounce-and-replan** if the divergence is a benign version bump (same author warrant, additive schema, egress class unchanged). The planner re-reads the new manifest, re-derives its justi...",
    "operational_effect": "With pinning + copy-on-write + dispatch-time re-verification in place, the injection above fails closed: the executor sees the handle's hash (`sha256:9f2c…`) does not match the live entry (`sha256:1a7e…`), sees the egress class flipped from `local` to `network`, and raises rather than dispatches. The planner's stale justification never gets the chance to aut..."
  },
  "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": "0502788bb62b0648f3c6654b9c2333fa800fe37c9390466646b4e45d9b3df6dc",
    "verified_classes": [
      "SkillBindingError",
      "SkillHandle"
    ],
    "verified_functions": [
      "resolve_handle",
      "dispatch"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SkillBindingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
