{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-taint-tracking-when-untrusted-retrieved-content-is-laundered-through-a-summarizer-tool-call",
  "title": "Why does an instance lose taint tracking when untrusted retrieved content is laundered through a summarizer tool call",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agent loops that mark retrieved/tool-returned content as tainted (provenance-tagged) and enforce capability restrictions on downstream tool calls whose arguments derive from tainted values. Does not apply to systems that quarantine tainted content entirely outside the model context, nor to pure-output filters that re-scan every tool argument at call time.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-tracking-when-untrusted-retrieved-content-is-laundered-through-a-summarizer-tool-call.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-tracking-when-untrusted-retrieved-content-is-laundered-through-a-summarizer-tool-call.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-tracking-when-untrusted-retrieved-content-is-laundered-through-a-summarizer-tool-call.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1991,
    "python_slice_tokens": 311,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint tracking at the agent layer is not a property of *text*; it is a property of *dataflow*. The common implementation tags a message or tool-result object with `tainted: true`, then checks at tool-invocation time whether any argument is tainted. This works only while the tainted datum remains a distinguishable object in the loop's state. The failure mode ...",
    "what_was_observed": "A research agent loop with three tools: `fetch(url) -> str`, `summarize(text) -> str`, and `execute(cmd) -> str`. The sandbox policy: any `execute` call whose `cmd` argument is derived from a `fetch` result marked `tainted=true` must be routed through an approval gate; untainted `execute` calls run directly. Trace of the laundering event: 1. `fetch(\"https://untrusted.example/post\")` returns a 4 KB body. The harness t...",
    "condition_of_validity": "The taint-preservation invariant is sound only if the following holds at every step: - **Provenance is a graph, not a flag.** Every datum carries a set of origin IDs. A tool call's output inherits the union of the origins of all its arguments (plus its own origin). `summarize(tainted_body)` must return `{origins: {untrusted.example, summarize}}`, not `{origi...",
    "decision_boundary": "The boundary between \"safe to run\" and \"must gate\" is **not** whether the argument string contains known-bad patterns (that is a denylist and will miss paraphrases). It is whether the argument's transitive origin set intersects the untrusted set. Concretely, the decision rule is: - If `origins(cmd) ∩ untrusted == ∅` → execute directly. - If `origins(cmd) ∩ u...",
    "operational_effect": "With provenance-graph taint and conservative model-output tainting, the observed escape is blocked at step 4: `origins(cmd)` includes `untrusted.example` (inherited via `summarize`'s argument, and via the model's context), so the gate fires. The approver sees \"this command derives from https://untrusted.example/post\" and can reject. The cost is real: every s..."
  },
  "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": "3244c76c767d8fa59b7859677572d631d4d428405af45884f2cae856941ebad8",
    "verified_classes": [
      "TaintLaunderingError",
      "Datum"
    ],
    "verified_functions": [
      "model_emit",
      "summarize",
      "execute",
      "agent_loop",
      "join"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
