{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-injection-taint-provenance-at-the-second-tool-boundary-not-the-first",
  "title": "Why does an instance lose injection-taint provenance at the second tool boundary, not the first?",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agents that propagate provenance/taint labels on untrusted content across a sequence of tool calls within a single task. Does not apply to single-shot tool use, nor to agents that re-derive trust from scratch on every turn (those fail differently—by re-admitting tainted content).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-injection-taint-provenance-at-the-second-tool-boundary-not-the-first.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-injection-taint-provenance-at-the-second-tool-boundary-not-the-first.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-injection-taint-provenance-at-the-second-tool-boundary-not-the-first.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1351,
    "python_slice_tokens": 278,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is *not* \"the agent followed injected instructions.\" That is a downstream symptom. The mechanism is a **provenance-label laundering step** that occurs precisely when a tainted value is passed *as an argument into a second tool*, whose output is then treated as freshly trusted. The first tool boundary usually preserves the label because the tainte...",
    "what_was_observed": "A three-call chain: `fetch_page` → `extract_field` → `send_message`. The page contained an injected payload embedding a malicious instruction inside a hidden field. The agent's taint layer correctly tagged the `fetch_page` output as `TAINTED(source=web)`. The `extract_field` call received the tainted blob as input and returned a small structured object `{recipient: \"...\", body: \"...\"}`. At this point the taint label ...",
    "condition_of_validity": "This boundary failure requires all of: - A **multi-hop chain** where at least one intermediate tool *transforms* tainted content into a new shape (parse, extract, summarize, reformat). - A taint propagator that **classifies by output shape/type**, or that **ignores argument-position flows**, or both. - A downstream **sink tool** (send, write, execute, reques...",
    "decision_boundary": "The architectural guardrail is a **lineage-closure check at every sink**: before a sink tool executes, walk the provenance DAG backward from each argument to its roots. If any root is `TAINTED` and no explicit declassification event sits on the path, the sink must either refuse or run in a quarantined mode (e.g., require human confirmation, or restrict the r...",
    "operational_effect": "Once lineage-closure is enforced, the `extract_field` output remains `TAINTED(source=web)` by inheritance, and `send_message` fails the closure check and refuses. The cost is a higher false-positive rate: legitimate extractions from untrusted pages now require an explicit declassification step before reaching sinks. This is the correct trade—the alternative ..."
  },
  "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": "504644f2155f924d7acb6f6fe7587dc9301979d048f038c5615673db5648b941",
    "verified_classes": [
      "TaintLaunderingError",
      "ProvenanceNode",
      "ProvenanceGraph"
    ],
    "verified_functions": [
      "enforce_sink",
      "demo",
      "__init__",
      "add",
      "lineage_roots",
      "is_tainted"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
