{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-taint-laundering-through-nested-tool-call-authority-in-agentic-rpc-chains",
  "title": "Which invariants prevent taint laundering through nested tool-call authority in agentic RPC chains",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agents that execute tool calls via an RPC/transport layer (MCP-style servers, A2A handoffs, or internal tool brokers) where a single agent instance both (a) ingests untrusted content into its context and (b) holds authority to issue state-mutating tool calls. Does not apply to pure read-only agents, nor to systems where untrusted content and mutating authority are physically separated into distinct processes with no shared credential.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-through-nested-tool-call-authority-in-agentic-rpc-chains.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-through-nested-tool-call-authority-in-agentic-rpc-chains.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-through-nested-tool-call-authority-in-agentic-rpc-chains.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1761,
    "python_slice_tokens": 382,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The confused-deputy exploit here is not \"the agent followed an injected instruction.\" It is subtler: **the agent laundered taint by re-labeling an untrusted value as a trusted one across an RPC boundary.** A taint-tracking sandbox correctly marks tool *outputs* derived from untrusted input as tainted. The failure occurs when a *nested* tool call consumes tha...",
    "what_was_observed": "A three-hop chain: `planner` agent → `fetch_and_summarize` tool → `write_record` tool. The planner read an external document (untrusted, taint=α), extracted a field, and passed it to `fetch_and_summarize`. That tool internally called `write_record` with the extracted field. The sandbox tagged the *planner's* context as tainted and blocked the planner from calling `write_record` directly. But `fetch_and_summarize` was...",
    "condition_of_validity": "The exploit requires all of the following to co-occur; remove any one and the chain breaks: - **Nested call depth ≥ 2** where an intermediate tool is statically trusted. Single-hop calls are safe because the planner's own taint set is checked at the one boundary. - **Argument-shaped taint transfer.** The tainted value must flow as a *tool argument* into the ...",
    "decision_boundary": "The boundary is: **propagate taint through the argument graph, not the caller graph.** Concretely, the broker must, at every RPC frame, compute the frame's input taint as the union of (caller's context taint) ∪ (taint of every argument value, resolved through the provenance store). A mutating tool call is admitted only if the resulting union is empty *or* th...",
    "operational_effect": "Enforcing monotone taint propagation converts the confused-deputy chain from a silent write into a bounded denial. The planner's tainted value now arrives at `write_record` with its α token intact; `write_record`'s policy sees a non-empty taint union and, lacking an α-scoped warrant, raises. The cost is false positives on legitimate forwarding of tainted-but..."
  },
  "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": "b279c2167040e8a1b370b5bd43a91afb49a6b2ec5a6fe8341ccaa60ede01917c",
    "verified_classes": [
      "TaintLaunderingError",
      "Provenance",
      "Frame"
    ],
    "verified_functions": [
      "resolve_arg_taint",
      "admit_mutating_call"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
