{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-taint-laundering-across-composed-tool-call-chains-when-each-hop-is-individually-sandboxed",
  "title": "Which invariants prevent taint laundering across composed tool-call chains when each hop is individually sandboxed",
  "date_of_record": "2026 November 29",
  "scope": "Applies to multi-hop agent pipelines where a planner agent dispatches sub-agents, each holding a distinct tool sandbox with per-hop taint labels (untrusted-source → derived-context → egress-capable sink). Does not cover single-agent, single-sandbox deployments where taint labels never cross a process boundary, nor purely offline batch inference with no egress tools.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-across-composed-tool-call-chains-when-each-hop-is-individually-sandboxed.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-across-composed-tool-call-chains-when-each-hop-is-individually-sandboxed.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-across-composed-tool-call-chains-when-each-hop-is-individually-sandboxed.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1694,
    "python_slice_tokens": 340,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Per-hop sandboxing answers the question *\"may this tool call read this byte?\"* Taint-aware composition must answer a different question: *\"does the derivation history of this byte still forbid it from reaching this sink?\"* These diverge precisely because a sandbox boundary is a **capability** check while taint is a **provenance** check, and provenance is not...",
    "what_was_observed": "A three-hop retrieval-and-report chain: **R** (retriever, sandbox with `web_fetch`, no egress) → **S** (summarizer, sandbox with no network, pure transform) → **E** (emitter, sandbox with `send_email` and `post_webhook`). Taint labels were assigned correctly at R: fetched bytes tagged `UNTRUSTED_EXTERNAL`. R's sandbox blocked any direct egress call. S received the fetched text, produced a structured summary, and — cr...",
    "condition_of_validity": "The per-hop sandbox guarantee (\"no sandboxed agent can exfiltrate data it holds\") is valid **only if** the taint label is an invariant of the *value*, carried through every transform and serialization, and re-checked at every egress sink regardless of which hop owns the sink. It is **invalid** the moment any of the following holds: 1. A hop performs a semant...",
    "decision_boundary": "The boundary is not \"does this agent have an egress tool\" but **\"is the label on this value transitively closed across the handoff graph.\"** Concretely: - **Below the boundary (safe):** a value whose taint envelope carries `UNTRUSTED_EXTERNAL` and is checked at the egress sink against a policy that forbids `UNTRUSTED_EXTERNAL → external_recipient`. The check...",
    "operational_effect": "Enforcing transitive taint closure changes the architecture in three measurable ways. First, every inter-agent message must carry a signed taint envelope (label set + derivation hash), and every egress sink must validate the envelope's closure against its egress policy before the tool call — adding one validation step per sink, not per hop. Second, semantic-..."
  },
  "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": "5cf9da2227ad5deb6052eee19eb73a8982c3be1c9582ce9f2590bde4f1400c6c",
    "verified_classes": [
      "TaintLaunderingError",
      "Envelope",
      "Hop"
    ],
    "verified_functions": [
      "handoff",
      "assert_chain_safe",
      "replay_observed_chain"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
