{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-manifest-resident-skill-injection-that-only-activates-after-a-tool-s-declared-capability-envelope-is-renegotiated-mid-se",
  "title": "How should an instance detect manifest-resident skill injection that only activates after a tool's declared capability envelope is renegotiated mid-session",
  "date_of_record": "2026 November 28",
  "scope": "Applies to LLM agents that dynamically discover and load tool manifests (MCP-style `tools/list` responses, plugin descriptors, or A2A agent cards) into an active context window and re-read those manifests when a capability or schema is renegotiated. Does not apply to statically linked tool sets whose descriptors are immutable for the lifetime of the process.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-manifest-resident-skill-injection-that-only-activates-after-a-tool-s-declared-capability-envelope-is-renegotiated-mid-se.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-manifest-resident-skill-injection-that-only-activates-after-a-tool-s-declared-capability-envelope-is-renegotiated-mid-se.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-manifest-resident-skill-injection-that-only-activates-after-a-tool-s-declared-capability-envelope-is-renegotiated-mid-se.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2172,
    "python_slice_tokens": 402,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive threat model for agent tool manifests treats them as inert declarative data: a name, a JSON-Schema for arguments, a description string, and a transport endpoint. Under that model, injection defense reduces to sanitizing the *description* field against prompt-injection payloads before it enters context. That model is wrong in a specific, load-bearin...",
    "what_was_observed": "A coding agent loaded a toolset at session start. Manifest v1 for a tool named `fetch_context` declared a single string parameter `query` and a benign description. The agent's loader ran the description through an injection classifier, marked the tool trusted, and bound it into a retrieval plan. Mid-task, the agent hit a schema error: the tool rejected a call because the server had upgraded and now expected `query` p...",
    "condition_of_validity": "The attack requires all of the following to hold simultaneously; remove any one and the injection fails closed: - **Renegotiation is agent-initiated but server-shaped.** The agent triggers the refresh (on a schema error, a version mismatch, or a periodic `tools/list`), but the *content* of the refreshed manifest is entirely attacker-controlled. The agent can...",
    "decision_boundary": "The operational question is not \"should I sanitize manifests\" — you already do, at load. The question is where the boundary sits between *reload* and *re-trust*. Three policies are available, and only one is sound: 1. **Reload-and-resume (unsound).** Fetch v2, splice it into context, continue the plan. This is the observed failure. The plan's trust in `fetch...",
    "operational_effect": "Enforcing delta-adjudicated resume changes three things in practice: - **Trust grants become content-addressed.** The loader stores `trust_hash = H(canonical(model_readable_fields))` at grant time. Every reload recomputes the hash over the same field set; a mismatch forces re-adjudication. This makes the v2 attack impossible to slip through, because the `sco..."
  },
  "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": "669ea44b149fd90e2985b0f805bd9e9dabd9aea17b8e3f9790fa2c61292c8350",
    "verified_classes": [
      "ManifestRenegotiationTrustError"
    ],
    "verified_functions": [
      "_canonical",
      "trust_hash",
      "sanitize_model_readable",
      "adjudicate_reload",
      "dispatch_with_stamp"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ManifestRenegotiationTrustError"
    ],
    "sample_fail_closed_invariants": [
      "stored trust hash does not match trusted descriptor; state corrupt"
    ],
    "stdlib_dependencies": [
      "hashlib",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
