{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-taint-laundering-through-tool-call-argument-re-encoding-in-sandboxed-agents",
  "title": "Which invariants prevent taint laundering through tool-call argument re-encoding in sandboxed agents",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agents that run a taint-tracking sandbox gating privileged tools (network egress, shell, file writes, credential-bearing APIs) on the provenance of context reaching each call. Does not cover pure-output filtering, post-hoc DLP on responses, or models with no tool-execution surface.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-through-tool-call-argument-re-encoding-in-sandboxed-agents.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-through-tool-call-argument-re-encoding-in-sandboxed-agents.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-through-tool-call-argument-re-encoding-in-sandboxed-agents.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1794,
    "python_slice_tokens": 364,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The load-bearing distinction is between **taint as a data-flow label** and **taint as a syntactic property of the call**. A sandbox that inspects the *arguments of a tool call* for known-untrusted substrings is enforcing the latter. A sandbox that propagates labels through every transformation the model applies to untrusted content is enforcing the former. T...",
    "what_was_observed": "A research agent with three tools: `fetch_url` (unprivileged, returns page text), `summarize` (pure, no side effects), and `post_webhook` (privileged egress). The sandbox blocked `post_webhook` when its `body` argument contained exact substrings from any `fetch_url` result. The guardrail was a substring oracle over a taint dictionary. Trace: 1. `fetch_url(\"https://attacker.example/notes\")` returns text containing a p...",
    "condition_of_validity": "The substring-oracle guardrail is valid **only** under the assumption that the model cannot transform tainted content into a form that preserves exfiltration value while breaking byte-identity. That assumption is false for any model capable of encoding, arithmetic, or paraphrase — i.e., essentially all of them. The guardrail is therefore valid only for a res...",
    "decision_boundary": "The boundary is: *does the guardrail's decision depend on the adversary's choice of representation?* If yes, it is not a boundary — it is a speed bump. The substring oracle's decision flips from block to allow on a base64 transform that the attacker (via injected instructions) or the model (incidentally) controls. A decision that an adversary can flip by re-...",
    "operational_effect": "Under the substring oracle, exfiltration success rate is roughly the probability the model applies any non-identity transform to the secret — high, and rising with model capability. Under provenance-reachability with default-deny and explicit declassification, exfiltration requires either a declassification event (auditable, rate-limitable, human-gated) or a..."
  },
  "matched_failure_symptoms": [
    "UNICODE_HOMOGLYPH_OR_MOJIBAKE"
  ],
  "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": "c5241115ab240a4c08b75d7ab7dabb4183a23e852bb25dc09df56cd6272e4100",
    "verified_classes": [
      "TaintLaunderingError",
      "Span",
      "ProvenanceGraph"
    ],
    "verified_functions": [
      "guarded_post_webhook",
      "add_span",
      "declassify",
      "_reachable_tainted",
      "assert_clean_sink"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
