{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-mcp-tool-description-poisoning-from-surviving-a-mid-session-skill-reload",
  "title": "Which invariants prevent MCP tool-description poisoning from surviving a mid-session skill reload",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agents that dynamically load skills or MCP tool manifests at runtime (hot-reload, session refresh, capability negotiation) and cache the resulting tool descriptions in context. Does not apply to statically compiled tool bindings with no runtime manifest ingestion, nor to single-shot invocations where the manifest is re-read per call.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-mcp-tool-description-poisoning-from-surviving-a-mid-session-skill-reload.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-mcp-tool-description-poisoning-from-surviving-a-mid-session-skill-reload.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-mcp-tool-description-poisoning-from-surviving-a-mid-session-skill-reload.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1556,
    "python_slice_tokens": 310,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"a malicious tool got loaded.\" It is that the *previous, trusted* description of a tool survived a reload as a stale context resident while the *new, poisoned* description was appended, producing two contradictory descriptions of the same capability in the same context window. The agent does not fail because it accepted a poisoned too...",
    "what_was_observed": "A skill reload was triggered mid-task (the agent detected a version bump in the tool manifest and re-fetched it). The reload path did the following: 1. Fetched the new manifest for tool `read_file`. 2. Compared the tool *name* against the loaded set: `read_file` already present → treated as \"already loaded,\" skipped re-registration. 3. Appended the new description text into the skill-notes region of context without e...",
    "condition_of_validity": "This boundary holds only when all of the following are true: - The manifest is fetched over a channel the agent treats as semi-trusted (a registry, a peer agent, a filesystem skill directory). - The reload path is *identity-keyed* (dedupe by name) rather than *content-keyed* (hash of description + schema). - Tool descriptions live in the same context region ...",
    "decision_boundary": "The decision is: **on reload, do you evict-and-replace, or append-and-reconcile?** Append-and-reconcile is the default because it is cheap and preserves conversational continuity. It is also the attack surface. The invariant that bounds it: *for any tool identity, at most one description may be live in context at a time, and that description must be content-...",
    "operational_effect": "After enforcing the invariant, the reload of a poisoned manifest produces a *content-hash mismatch* that forces eviction of the clean description and insertion of the poisoned one — which is still bad, but now visible: the hash change is logged, and the schema gate rejects the synthesized `exfil_url` argument at dispatch. The attack no longer succeeds silent..."
  },
  "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": "2a22c3fcd2a179fc4c64958daaba28d20e27167e94609d2269a93d047a03a7ce",
    "verified_classes": [
      "StaleManifestCoexistenceError",
      "UndeclaredParameterError",
      "ToolManifest",
      "SkillRegistry"
    ],
    "verified_functions": [
      "dispatch",
      "content_hash",
      "reload",
      "assert_single_liveness"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "StaleManifestCoexistenceError",
      "UndeclaredParameterError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
