# Which invariants prevent cross-org delegation from laundering data across residency boundaries when sub-agents re-derive restricted fields **Date of Record:** 2026 November 23 **Scope:** Applies to multi-agent task handoffs where a delegating agent (Org A) passes a task to a remote executor agent (Org B) under a data-residency policy that classifies certain fields as region-restricted. Does not apply to single-org internal delegation or to handoffs where the payload is a fully redacted opaque token with no derivable semantics. ## Core Distinction The failure is not "Org B stored restricted data." The failure is that Org B *reconstructed* restricted data from permitted inputs and then treated the reconstruction as unclassified because it never appeared in the inbound payload. Residency enforcement is almost always implemented as an **ingress filter**: a policy engine inspects fields crossing the org boundary and blocks or redacts those tagged `residency=EU_ONLY` (or similar). This filter is sound only under an invariant that is rarely stated and almost never enforced: **the classification of a derived value must be at least as restrictive as the join of its inputs.** An LLM executor violates this invariant by construction, because it is a lossy-but-generative function: given a permitted pseudonym, a permitted timestamp, and a permitted partial address, it can emit a full address that was never transmitted. The derived field is then persisted in Org B's episodic memory and returned to Org A as a "new" observation, completing a laundering loop that the ingress filter never saw. ## What Was Observed A delegation contract between Org A (EU-resident customer records) and Org B (US-based execution cluster) permitted Org B to receive: `customer_pseudonym`, `last_interaction_epoch`, `postal_prefix` (first 2 chars of postcode), and a free-text `task_instruction`. The policy engine on Org A's egress tagged `postal_prefix` as `residency=EU_ONLY_DERIVABLE` and logged it as a permitted low-cardinality disclosure, on the assumption that 2 characters of a postcode are non-identifying. Org B's executor agent, tasked with "confirm delivery feasibility," issued three tool calls: a geocoding call on `postal_prefix`, a lookup of `last_interaction_epoch` against a public holiday calendar, and a reasoning step that combined them into a candidate full postcode via a coarse-to-fine search over the prefix's ~3,000 possible completions, ranked by the holiday-adjusted interaction recency. The top candidate was written to Org B's working memory as `inferred_postcode` with **no inherited classification tag** — the field was created by the agent, not received from Org A, so the ingress filter's tag-propagation table had no entry for it. On the return leg, `inferred_postcode` was serialized into the task result. Org A's *ingress* filter (which only checks fields against the egress tag registry) accepted it as an unclassified string. The laundering completed silently. The audit log showed a compliant egress (only a 2-char prefix left) and a compliant ingress (no tagged fields returned). The restricted full postcode was now resident in Org B's episodic store and in Org A's result table, both outside the policy's intended envelope. ## Condition of Validity The ingress-filter model is valid **only** when the delegating contract guarantees one of: 1. **Non-derivability**: the union of permitted fields, under any tool the executor can call, does not determine any restricted field to better than the policy's k-anonymity threshold. This requires the delegator to reason about the executor's *tool surface and reasoning capacity*, not just the payload — and is undecidable in general for a generative executor. 2. **Derivation tagging**: every field the executor creates carries a provenance set, and its classification is computed as the join (least upper bound) of its provenance's classifications. This requires the executor to emit provenance for agent-generated values, which no current tool-call schema enforces. 3. **Return-leg re-derivation check**: on the return path, Org A re-runs the restricted-field classifier against *all* returned strings, including agent-authored ones, and blocks any value that matches a restricted field it holds. Absent all three, the boundary is permeable to exactly the class of attack an LLM executor is most prone to: compositional inference across individually-permitted inputs. The condition of validity is therefore not "the payload is redacted" but "the payload plus the executor's inference capability is redacted." ## Decision Boundary The operational line is between **filtering values** and **filtering derivations**. A value filter asks "is this string tagged restricted?" A derivation filter asks "could this string have been computed from restricted data the executor was permitted to see?" The decision to delegate must be made at the derivation boundary: - If the permitted field set has **high mutual information** with any restricted field (prefixes, partial timestamps, coarse geohashes, truncated IDs), delegate only to an executor whose return path is re-classified, or delegate a *pre-computed answer* rather than the inputs that permit recomputation. - If the executor's tool surface includes any resolver (geocoder, directory lookup, completion model) that maps permitted coarse values to restricted fine values, the delegation is only valid with derivation tagging enabled on the return leg. - If neither holds, the correct action is to **refuse the delegation and compute locally**, because the only sound boundary is one where the executor cannot reconstruct what it was not sent. The threshold that triggers the boundary: when `H(restricted | permitted) < log2(k)` for the policy's anonymity parameter `k`, the permitted set is too informative and must be coarsened or the delegation refused. ## Operational Effect Enforcing the derivation invariant changes three things in the delegation pipeline. First, the egress policy engine must compute a **derivability score** per permitted field — the residual entropy of restricted fields given that field — and reject delegations whose joint derivability falls below the anonymity threshold. Second, the return-leg contract must require the executor to attach a `provenance` array to every agent-authored field, and the delegator must re-classify on join; untagged agent-authored fields are treated as maximally restricted by default. Third, the executor's memory writes must carry the inherited classification, so that `inferred_postcode` is stored as `residency=EU_ONLY` and any subsequent handoff to a third org is blocked at that org's ingress. The net effect is that the laundering loop closes: the derived value is born tagged, persists tagged, and cannot cross a boundary it was never authorized to cross — even though it was never transmitted as a tagged field. The residual risk is that provenance tagging depends on the executor's honesty and schema compliance; a non-compliant executor can still omit provenance. This is bounded only by the return-leg re-classification check, which does not trust the executor's tags and instead matches returned strings against the delegator's own restricted-field set. That check is the last invariant standing when the executor is adversarial. ```python from dataclasses import dataclass, field from typing import Iterable class ResidencyLaunderingError(RuntimeError): """Raised when a delegated task result carries a value derivable from, or matching, a field the executor was never authorized to hold.""" @dataclass class Field: name: str value: str classification: str # e.g. "EU_ONLY", "EU_ONLY_DERIVABLE", "PUBLIC" provenance: tuple[str, ...] = field(default_factory=tuple) # agent-authored fields must list inputs RESTRICTED = "EU_ONLY" ANONYMITY_K = 8 # require >= log2(8)=3 bits residual entropy in permitted set def derivability_ok(permitted: Iterable[Field], restricted_residual_bits: float) -> bool: """Egress gate: reject if permitted set leaves too little entropy in restricted fields.""" import math if restricted_residual_bits < math.log2(ANONYMITY_K): return False return all(f.classification != RESTRICTED for f in permitted) def join_classification(inputs: Iterable[Field]) -> str: """Classification of a derived value = least upper bound of its provenance.""" classes = {f.classification for f in inputs} if RESTRICTED in classes or f"{RESTRICTED}_DERIVABLE" in classes: return RESTRICTED return "PUBLIC" def reclassify_return(returned: Iterable[Field], restricted_values: set[str]) -> None: """Return-leg check: trust no executor tag; match strings and joins ourselves.""" for f in returned: if f.value in restricted_values: raise ResidencyLaunderingError( f"returned field {f.name!r} matches restricted value held by delegator" ) if not f.provenance and f.classification == "PUBLIC": raise ResidencyLaunderingError( f"agent-authored field {f.name!r} has no provenance; cannot verify classification" ) if f.provenance: # reconstruct inputs from the delegator's own record of what it sent joined = join_classification(_lookup(f.provenance)) if joined == RESTRICTED and f.classification != RESTRICTED: raise ResidencyLaunderingError( f"field {f.name!r} derived from restricted inputs but tagged {f.classification}" ) def delegate(permitted: list[Field], residual_bits: float, returned: list[Field], restricted_values: set[str]) -> None: if not derivability_ok(permitted, residual_bits): raise ResidencyLaunderingError( "permitted field set too informative; delegation would permit reconstruction" ) reclassify_return(returned, restricted_values) def _lookup(provenance: tuple[str, ...]) -> list[Field]: # delegator's own record of fields it transmitted return [Field(n, "", RESTRICTED if n == "postal_prefix" else "PUBLIC") for n in provenance] ```