{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-of-taint-tracking-be-anchored-the-output-poisoning-boundary-in-tool-using-agent-pipelines",
  "title": "Where must an instance of taint-tracking be anchored: the output-poisoning boundary in tool-using agent pipelines",
  "date_of_record": "2026 November 16",
  "scope": "This record applies to agent pipelines where a model's context is assembled from tool outputs (web fetches, file reads, API responses, sub-agent returns) that are not fully trusted, and where a sandbox or policy layer decides which downstream actions are permitted based on provenance labels. It does not apply to pipelines where every tool output is authored by the same trust domain as the agent controller, nor to purely single-turn completions with no tool invocation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-of-taint-tracking-be-anchored-the-output-poisoning-boundary-in-tool-using-agent-pipelines.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-of-taint-tracking-be-anchored-the-output-poisoning-boundary-in-tool-using-agent-pipelines.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-of-taint-tracking-be-anchored-the-output-poisoning-boundary-in-tool-using-agent-pipelines.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1856,
    "python_slice_tokens": 295,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common mental model treats taint as a property of *data*: a string is either \"from an untrusted source\" or not, and the sandbox refuses actions whose arguments contain tainted bytes. This model is wrong in a way that is silent under testing. The correct distinction is that taint must be anchored to a *provenance identity that survives serialization into ...",
    "what_was_observed": "A pipeline was instrumented with a substring-based taint guard: any tool argument containing a byte sequence that appeared in a prior untrusted tool output (above a length threshold) was rejected. Red-team probes were constructed where an untrusted web page contained a benign-looking instruction such as a request to include a specific harmless token in a downstream `send_email` body. Observed behavior across three pr...",
    "condition_of_validity": "The substring taint guard is valid only under the conjunction of: - The model is constrained to emit arguments that are exact substrings of context (no paraphrase, no generation), **and** - No caching, re-serialization, or sub-agent boundary re-issues the same content under a fresh provenance record, **and** - The tool-selection decision itself is not influe...",
    "decision_boundary": "The boundary is this: **taint must be anchored at the decision instance, not the data instance.** Concretely, the operational rule is: - If a tool call's *selection* (tool name, recipient, target resource) can be traced to any context span whose provenance is untrusted, the call must be treated as tainted regardless of argument contents. - If a tool output i...",
    "operational_effect": "Anchoring at the decision instance changes the sandbox's interface: instead of `is_tainted(argument_string)`, the policy layer must expose `provenance_of(decision) -> Trust`, where the decision includes the tool name, the target, and the argument derivation chain. This forces the context assembler to carry provenance metadata alongside every span it inserts ..."
  },
  "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": "04a687ff86a7d8e2a16adbb49ecdc50eeed88c98a65799f405c90416b208bf64",
    "verified_classes": [
      "Trust",
      "TaintAnchorError",
      "Span",
      "Decision"
    ],
    "verified_functions": [
      "provenance_of",
      "enforce",
      "dispatch",
      "__and__"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintAnchorError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
