{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-tool-return-taint-as-a-hard-egress-barrier-rather-than-advisory-metadata",
  "title": "Under what conditions must an instance treat tool-return taint as a hard egress barrier rather than advisory metadata",
  "date_of_record": "2026 December 1",
  "scope": "Applies to tool-augmented agents where returned tool payloads are tagged with data-flow taint (source, sensitivity, provenance) and an egress policy mediates outbound calls (network, message send, file write, downstream model invocation). Does not apply to single-turn, tool-free generation or to agents whose tools have no outbound channel and cannot mutate shared state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-tool-return-taint-as-a-hard-egress-barrier-rather-than-advisory-metadata.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-tool-return-taint-as-a-hard-egress-barrier-rather-than-advisory-metadata.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-tool-return-taint-as-a-hard-egress-barrier-rather-than-advisory-metadata.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1907,
    "python_slice_tokens": 360,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common model treats taint labels as *advisory*: a tool returns a payload marked `sensitive: true` or `origin: untrusted_web`, the agent records the label in its scratchpad, and the orchestrator \"considers\" it when deciding where to send data next. Under this model, taint is a hint the reasoning loop may weigh against task utility. The failure mode docume...",
    "what_was_observed": "A retrieval agent was tasked with summarizing a customer support thread. Tool `fetch_ticket` returned a payload containing a customer's full name, partial card number, and a home address, tagged `taint: {pii: true, origin: crm_prod}`. The agent's context was near saturation, so a compaction step summarized the ticket as \"customer reports billing issue; address on file.\" The compaction preserved the *address* string b...",
    "condition_of_validity": "The advisory model is only valid when **all** of the following hold: 1. The taint label and the tainted bytes travel together through every transformation, including LLM-mediated summarization, and no transformation is permitted to rewrite the payload without re-emitting the label. 2. Every egress point performs payload-level inspection (substring, regex, em...",
    "decision_boundary": "The boundary is not \"is this payload sensitive\" — that is a classification question the reasoning loop is bad at. The boundary is **\"can the egress policy reconstruct provenance from the payload alone?\"** - If yes: enforce at the payload. Hash the outbound payload, look up each segment against the provenance ledger, and block if any segment resolves to a tai...",
    "operational_effect": "Enforcing taint as a hard barrier changes three things in the runtime: First, compaction and distillation become taint-aware operations. Every summarization call must be wrapped so its output carries a `derived_from: [source_hashes]` field and inherits the union of sources' taint. A summarizer that cannot produce this is a policy violation, not a fallback. S..."
  },
  "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": "dd3348d2afbaa4e552d9ad163ad62a826838be1df8e569bec65c55f83d078ca8",
    "verified_classes": [
      "TaintBarrierViolation",
      "ProvenanceEntry",
      "ProvenanceLedger",
      "DerivedPayload"
    ],
    "verified_functions": [
      "enforce_egress",
      "serialize_handoff",
      "record",
      "lookup"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "TaintBarrierViolation"
    ],
    "sample_fail_closed_invariants": [
      "egress blocked: empty derivation set is not evidence of clean provenance",
      "handoff aborted: taint sidecar missing; refusing to default to clean",
      "egress blocked: payload has no derivation proof; cannot reconstruct provenance from content alone"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
