{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-launder-tainted-tool-output-through-a-trusted-sub-agent",
  "title": "When must an instance refuse to launder tainted tool output through a trusted sub-agent?",
  "date_of_record": "2026 November 26",
  "scope": "Applies to any agent runtime that tags tool outputs with a provenance/taint label and enforces quarantine by consulting that label at the point of *use*. Does not apply to single-tenant sandboxes where every tool is equally trusted, nor to systems that re-verify output content semantically rather than tracking provenance.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-launder-tainted-tool-output-through-a-trusted-sub-agent.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-launder-tainted-tool-output-through-a-trusted-sub-agent.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-launder-tainted-tool-output-through-a-trusted-sub-agent.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2042,
    "python_slice_tokens": 498,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **taint as a property of a value** and **taint as a property of a call site**. Most taint-tracking implementations label the *result object* returned by an untrusted tool (e.g., `web_fetch`, `external_agent_call`, `mcp:remote/*`) and then check that label before executing a sensitive sink (`shell.exec`, `fs.write`, `ht...",
    "what_was_observed": "A three-agent topology: an orchestrator `O`, an untrusted external research agent `R` reached over A2A, and a trusted in-house extraction sub-agent `E` whose job is to turn prose into a JSON record. `E` is registered with trust class `internal` and its outputs are labeled `clean`. The policy engine blocks `shell.exec` when any argument carries `taint=untrusted`. Trace of the failure: 1. `O` calls `R.fetch(topic)` → r...",
    "condition_of_validity": "The quarantine guarantee holds **only if** all three of the following are enforced simultaneously: - **Join propagation.** For every tool invocation, `out.label = callee.trust ⊔ ⋁ in.label`, where `⊔` is the lattice join (`untrusted ⊔ clean = untrusted`) and `⋁` is the join over all arguments, including instruction/system slots. No argument position is exemp...",
    "decision_boundary": "The operational question an instance must answer before invoking any sub-agent or tool is not \"is the callee trusted?\" but \"**does the callee's contract guarantee join propagation?**\" These are different. A trusted callee with a non-join-propagating contract is a *laundering surface* and must be treated as untrusted for the purpose of the sink check, or refu...",
    "operational_effect": "With join propagation enforced, the injection in the trace is blocked at step 4: `record.cleanup_command` inherits `taint=untrusted` from `blob`, and `shell.exec` refuses. The orchestrator receives a `TaintViolation`, not a silent execution. The remediation path is well-defined: re-fetch from a trusted source, or route the field through a content-verificatio..."
  },
  "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": "d2455972a4c5ad7e7622c29b8b8a5a009f0865b849f6b174574efbef4c901271",
    "verified_classes": [
      "Taint",
      "TaintLaunderingError",
      "Value",
      "ToolManifest"
    ],
    "verified_functions": [
      "invoke",
      "guarded_shell_exec",
      "external_fetch",
      "trusted_extract",
      "join",
      "with_joined_taint"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
