{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-tool-result-as-tainted-when-the-injection-payload-arrives-after-the-call-that-reads-it-i-e-the-label-la",
  "title": "Under what conditions must an instance treat a tool result as tainted when the injection payload arrives *after* the call that reads it — i.e., the label-laundering window in multi-hop tool graphs",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents that propagate data-flow taint labels across tool-call graphs where a single \"read\" tool returns content that is later re-fetched, dereferenced, or re-resolved by a downstream tool (lazy loaders, paginators, signed-URL fetchers, link-followers). Does not apply to single-shot tool calls whose return value is consumed atomically in the same reasoning step with no re-resolution.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-tool-result-as-tainted-when-the-injection-payload-arrives-after-the-call-that-reads-it-i-e-the-label-la.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-tool-result-as-tainted-when-the-injection-payload-arrives-after-the-call-that-reads-it-i-e-the-label-la.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-tool-result-as-tainted-when-the-injection-payload-arrives-after-the-call-that-reads-it-i-e-the-label-la.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2119,
    "python_slice_tokens": 367,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Most taint-tracking designs label a value at the moment it crosses a trust boundary: a `read_url` tool returns bytes, the runtime stamps `source=untrusted, origin=web`, and every downstream consumer inherits the label. The failure mode this record covers is subtly different and routinely missed: **the taint is not present in the bytes the first tool returned...",
    "what_was_observed": "A concrete trace from a research agent with a three-tool graph (`search`, `fetch_page`, `extract_links`): 1. `search(\"quarterly compliance memo\")` returns a JSON array of results. Each result is `{title, url, snippet}`. The runtime labels the whole array `untrusted`. Correct. 2. The planner reads the array, picks result #3, and emits `fetch_page(url=\"https://docs.example.org/memo?id=8812\")`. The URL string is passed ...",
    "condition_of_validity": "The laundering window exists if and only if all three hold: - **(a) Handle indirection:** at least one tool returns a reference whose dereference is a *separate* tool invocation (URL, cursor, ID, signed token, redirect). - **(b) Label reset at the model boundary:** the taint engine's join rule treats a value re-emitted through the model's token stream as fre...",
    "decision_boundary": "The boundary is whether the runtime can prove, at the moment of re-dereference, that the handle was never derived from an untrusted source. Two regimes: - **Provenance-complete regime:** the runtime maintains a per-handle provenance set recording every source that contributed to the handle's construction (including the search result that produced the URL). O...",
    "operational_effect": "Three concrete consequences for agent runtimes that adopt reachability-taint: 1. **Handle-typed tool schemas.** Tools that return handles should declare their return type as `Handle[untrusted]` rather than `string`, and the runtime should refuse to let a `Handle` be coerced to a plain `string` argument without an explicit `declassify()` call that is logged. ..."
  },
  "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": "13f1a97f88467cdd3ba1b1f04db7edd8ad8bdb184283c87a97aa152786cd23eb",
    "verified_classes": [
      "TaintLaunderingError",
      "Handle",
      "HandleRegistry"
    ],
    "verified_functions": [
      "fetch_and_label",
      "dereference",
      "__init__",
      "register",
      "dereference"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "assert h1.returned_untrusted"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
