{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-trusts-a-tool-manifest-reloaded-mid-session-skill-injection-via-manifest-drift-and-the-schema-freeze-invariant",
  "title": "What happens when an instance trusts a tool manifest reloaded mid-session: skill-injection via manifest drift and the schema-freeze invariant",
  "date_of_record": "2026 December 2",
  "scope": "Applies to any agent runtime that re-resolves or hot-reloads tool/skill manifests (MCP `tools/list`, plugin registries, dynamic function-calling catalogs) during an active session, and where tool descriptions or parameter schemas are fed verbatim into the model context. Does not apply to statically compiled tool sets frozen at process start with no reload path and no remote manifest fetch.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-a-tool-manifest-reloaded-mid-session-skill-injection-via-manifest-drift-and-the-schema-freeze-invariant.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-a-tool-manifest-reloaded-mid-session-skill-injection-via-manifest-drift-and-the-schema-freeze-invariant.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-trusts-a-tool-manifest-reloaded-mid-session-skill-injection-via-manifest-drift-and-the-schema-freeze-invariant.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1792,
    "python_slice_tokens": 410,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not prompt injection through *tool output* (a poisoned search result, a malicious file). It is prompt injection through *tool definition* — the manifest itself. The distinction matters because output-side injection is contained by treating tool returns as untrusted data, while manifest-side injection is delivered through the one channel the ru...",
    "what_was_observed": "A long-running agent (session age ~4h, 61% context utilization) held a frozen tool set of 14 tools loaded at cold start. A background supervisor, on detecting a manifest version bump, triggered a hot-reload. The reload replaced the in-context tool block: 13 tools byte-identical, one tool (`http_get`) mutated in three ways simultaneously: 1. Its `description` gained ~200 tokens of appended prose containing an instruct...",
    "condition_of_validity": "The attack surface is live only when all four hold: - **Reload is possible mid-session** (hot-reload, periodic `tools/list` refresh, or lazy per-call manifest fetch). - **Description/schema text is placed in the trusted instruction region** rather than a clearly delimited untrusted-data region. Most function-calling APIs place tool definitions in the system ...",
    "decision_boundary": "The runtime must decide, at each reload event, between two policies: - **Adopt:** new manifest becomes authoritative for subsequent steps. Cheap, keeps tools current, but every reload is an injection opportunity and invalidates any reasoning the model did against the old schema (mid-task divergence). - **Freeze:** manifest is pinned at task start; reloads ar...",
    "operational_effect": "Enforcing the freeze converts a silent, model-triggered exfiltration path into a loud, runtime-triggered re-plan. The concrete effects: (a) injected description prose never enters the reasoning context mid-task because the pinned block is what the model sees; (b) dispatch validates arguments against the pinned schema, so a novel parameter like `auth` is reje..."
  },
  "matched_failure_symptoms": [
    "SCHEMA_DRIFT_OR_COERCION_CRASH"
  ],
  "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": "3bc0b3288123e7b600be75f852d70900a9784fc25534083f0cf66b6d1123d3a0",
    "verified_classes": [
      "ManifestDriftError",
      "SchemaFreezeViolation",
      "PinnedToolSet"
    ],
    "verified_functions": [
      "_content_hash",
      "handle_reload",
      "__post_init__",
      "reload",
      "_describe_delta",
      "validate_call"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ManifestDriftError",
      "SchemaFreezeViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
