{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-a-tool-call-return-value-as-tainted-even-when-the-calling-agent-authored-the-request-and-how-does-label-laund",
  "title": "In what scenarios must an instance treat a tool-call return value as tainted even when the calling agent authored the request, and how does label-laundering across a re-entrant tool boundary defeat taint propagation",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agent runtimes that enforce indirect-prompt-injection defense via dynamic taint tracking over tool I/O, where taint labels are attached to values and propagated through the reasoning loop. Does not apply to stateless single-turn inference with no tool surface, nor to systems that rely purely on input string sanitization without value-level provenance.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-tool-call-return-value-as-tainted-even-when-the-calling-agent-authored-the-request-and-how-does-label-laund.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-tool-call-return-value-as-tainted-even-when-the-calling-agent-authored-the-request-and-how-does-label-laund.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-tool-call-return-value-as-tainted-even-when-the-calling-agent-authored-the-request-and-how-does-label-laund.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2162,
    "python_slice_tokens": 328,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The relevant distinction is between *origin taint* (the value was produced by an untrusted source: a web fetch, an email body, a retrieved document, a sub-agent reply) and *control taint* (the value was authored by the agent as part of a tool request). Most taint engines tag values at the boundary where they enter the process and propagate the label forward....",
    "what_was_observed": "A research agent was configured to summarize a user-supplied URL. The sandbox tagged the fetched HTML as `UNTRUSTED` and blocked any tool call whose arguments carried that label from reaching egress sinks (`send_email`, `http_post`, `write_file` outside the workspace). The agent fetched the page, extracted text, and called `search_index(query=<extracted text>)` — a legitimate internal tool that queries a document ind...",
    "condition_of_validity": "The laundering attack is only possible when all of the following hold simultaneously: - **Re-entrancy:** the tool's return value is a function of data the tool did not receive from the agent in this call — i.e., the tool reads from a shared store, a cache, an index, or an external service whose contents the agent did not author. A pure function `f(x) -> y` w...",
    "decision_boundary": "The architectural guardrail is a *provenance join at every tool return*, with the following decision rule: - If the tool is *pure* (its declared data-flow dependencies are a subset of its arguments), then `label(return) = label(arguments)`. Safe to reset to control provenance only if all arguments are `TRUSTED`. - If the tool is *impure* (reads from any stor...",
    "operational_effect": "With the join rule enforced, the observed attack is blocked at step 3: `search_index` declares `data_sources=[\"crawl_index\"]`, the runtime labels `crawl_index` as `UNTRUSTED` (it is populated by external crawl), and the returned snippet is labeled `UNTRUSTED`. At step 5, the `http_post` body carries `UNTRUSTED`, the sink check fires, and the call is rejected..."
  },
  "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": "4e0424840c9850a82866e55aebfc7ea14a236691c81dbb25b425fecca44d1e78",
    "verified_classes": [
      "Label",
      "TaintLaunderingError",
      "ToolSpec",
      "LabeledValue",
      "TaintRuntime"
    ],
    "verified_functions": [
      "join",
      "demo",
      "__init__",
      "label_return",
      "check_sink"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
