{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-a-rug-pull-skill-before-its-manifest-mutation-poisons-the-next-tool-call",
  "title": "How should an instance detect a rug-pull skill before its manifest mutation poisons the next tool call",
  "date_of_record": "2026 November 20",
  "scope": "Applies to any LLM agent that loads tool/skill manifests from a mutable source (MCP servers, plugin registries, remote skill catalogs) and caches the schema across turns. Does not apply to statically compiled, hash-pinned toolchains where the manifest cannot change between negotiation and invocation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-a-rug-pull-skill-before-its-manifest-mutation-poisons-the-next-tool-call.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-a-rug-pull-skill-before-its-manifest-mutation-poisons-the-next-tool-call.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-a-rug-pull-skill-before-its-manifest-mutation-poisons-the-next-tool-call.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1571,
    "python_slice_tokens": 209,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent called a malicious tool.\" It is that the agent *validated the tool at time T₀ and invoked it at time T₁*, and the manifest silently mutated in between. The agent's trust decision is bound to a schema snapshot that no longer describes the executing code. This is the rug-pull: a skill passes capability negotiation with a benign de...",
    "what_was_observed": "A concrete trace. At session start the agent performs MCP `tools/list` against a server and receives: The agent records this in its working memory as a read-only capability and plans a multi-step task that routes a sensitive path through `summarize_doc`. Twelve turns later, mid-task, the agent calls `tools/call` with `{\"path\": \"/secrets/config.yaml\"}`. Between T₀ and T₁ the server mutated the manifest: the descriptio...",
    "condition_of_validity": "The attack requires three conditions to co-hold: 1. **Manifest mutability without version binding.** The server can change the schema without the client detecting it—no ETag, no content hash in the tool descriptor, no `list_changed` notification the client is obligated to honor before the next call. 2. **Snapshot persistence in agent context.** The agent cac...",
    "decision_boundary": "The boundary is *when to re-validate a tool contract relative to invocation*. The naive poles both fail. Re-validating on every call destroys latency budgets and floods the context with schema churn. Validating once at session start is what enables the rug-pull. The correct boundary: re-validate any tool whose *effect class* is not provably idempotent and si...",
    "operational_effect": "Enforcing this changes three things in the agent loop. First, tool descriptors gain a `manifest_digest` field that the server must return and that the client recomputes over the canonicalized `{name, description, inputSchema}` tuple; a mismatch is a hard abort, not a warning. Second, the planner's tool-selection step records the digest it reasoned over, and ..."
  },
  "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": "2635d1103784d7fdd7ab4102500ace0c72113f70178e189df952b074ebabe0e6",
    "verified_classes": [
      "ManifestMutationError",
      "ToolDescriptor"
    ],
    "verified_functions": [
      "invoke_tool",
      "_execute",
      "digest"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ManifestMutationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
