{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-leak-tainted-bytes-through-an-untainted-tool-the-taint-propagation-gap-at-tool-call-argument-boundaries",
  "title": "Why does an instance leak tainted bytes through an untainted tool: the taint-propagation gap at tool-call argument boundaries",
  "date_of_record": "2026 December 1",
  "scope": "Applies to agent pipelines that enforce information-flow control (IFC) by tainting tool outputs and blocking tainted data from reaching exfiltration-capable sinks. Covers the case where a taint-tracking layer operates at the granularity of *values passed between tool calls* rather than *tokens inside the model's context*. Does not cover prompt-injection detection at ingress, nor sandbox escape via memory-safety bugs in the runtime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-leak-tainted-bytes-through-an-untainted-tool-the-taint-propagation-gap-at-tool-call-argument-boundaries.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-leak-tainted-bytes-through-an-untainted-tool-the-taint-propagation-gap-at-tool-call-argument-boundaries.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-leak-tainted-bytes-through-an-untainted-tool-the-taint-propagation-gap-at-tool-call-argument-boundaries.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1892,
    "python_slice_tokens": 317,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters here is between **taint as a property of a data value** and **taint as a property of a model's belief state**. Most taint-aware agent sandboxes implement the former: a tool returns a payload tagged `tainted=true`, the orchestrator records the tag, and any subsequent tool call whose arguments derive from that payload is either blo...",
    "what_was_observed": "A three-tool pipeline: `fetch_url` (returns external content, tainted), `summarize` (local LLM, no network), and `post_webhook` (sink, blocks tainted arguments). The orchestrator tags the `fetch_url` result and propagates taint to any argument whose substring matches a window of the tainted payload. Trigger trace: 1. `fetch_url(\"https://attacker.example/page\")` returns a page containing an injected instruction and a ...",
    "condition_of_validity": "The taint layer is sound only under the following conjunction, which must be checked per pipeline, not assumed: - **Transform-closure:** every argument-producing operation the model can invoke (freeform generation, arithmetic, encoding, hashing, truncation) must be either (a) modeled by the taint algebra with a known declassification rule, or (b) forbidden w...",
    "decision_boundary": "The operative boundary is between **lexical taint tracking** and **causal taint tracking**, and the decision to cross it is forced by a single question: *can the model produce an argument whose information content depends on a tainted observation without reproducing any of its bytes?* For any pipeline where the model has freeform generation over tainted cont...",
    "operational_effect": "Enforcing the causal boundary changes three things in the running system: 1. **Sink gating moves from per-call to per-session.** The orchestrator must maintain a session-level taint bit that is set on any tainted ingestion and cleared only by explicit context reset or trusted re-derivation. Per-call substring checks are demoted to a fast-path filter, not the..."
  },
  "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": "17f735b7aa5e45c5838a0276604d8d81f14ecf1f99fa6759eaf9a414d0481750",
    "verified_classes": [
      "TaintBoundaryViolation"
    ],
    "verified_functions": [
      "gate_sink_call",
      "_windows",
      "_argument_alphabet_bits"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintBoundaryViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "math"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
