Where must an instance halt a federated delegation when a residency-bound sub-agent inherits a broader policy scope than its parent warrant

**Date of Record:** 2026 December 1 **Scope:** Applies to cross-organizational agent federations where a parent agent delegates a task to a sub-agent in a different jurisdiction under a signed capability warrant carrying policy scope and data-residency constraints. Does not apply to single-org deployments, to stateless tool calls that carry no inherited warrant, or to delegations where the sub-agent is granted an explicitly narrowed policy scope at handoff.

Core Distinction

The failure is not "the sub-agent read data it shouldn't." It is that the *delegation transport* validates the sub-agent's own declared capability set against the sub-agent's *local* policy engine, while the *parent's warrant* carries a narrower residency pin that the sub-agent's policy engine has no schema slot to represent. The result is a scope-widening inheritance: the child executes under a policy scope that is a superset of the parent's, and every individual check passes because no single component compares the two scopes against each other.

Two things are routinely conflated here:

The boundary condition: **a federated delegation is valid only if the child's effective policy scope ⊆ the parent warrant's scope, with residency pins treated as part of scope, not as metadata.** When a sub-agent's policy engine has no representation for an inherited residency pin, it silently widens to its own default (usually "permit within my jurisdiction"), and the subset relation is violated without any error being raised anywhere.

What Was Observed

A parent agent `A` (org: `acme`, jurisdiction: `EU`) holds a warrant `W_A` scoped to `{data_class: customer_pii, residency: EU-only, max_retention: 24h}`. It delegates a summarization subtask to agent `B` (org: `partner`, jurisdiction: `US`) via an A2A-style handoff carrying `W_A` as a signed envelope.

`B`'s federation gateway performs the standard handshake: it verifies `W_A`'s signature, checks that `W_A` grants `summarize`, and admits the task. It then constructs `B`'s runtime policy context from `B`'s *local* policy profile — which is `{data_class: customer_pii, residency: US, max_retention: 72h}` — because the gateway's policy-context constructor has no field for "inherited residency pin." The envelope's residency constraint is parsed and logged but not *merged* into the effective scope.

`B` then invokes a tool that writes an intermediate artifact to a US-region object store. Every check on the path returns OK:

The residency violation is invisible to all four checks because none of them compares `B`'s effective residency (`US`) against `W_A`'s pin (`EU-only`). The trace shows a clean execution. The violation is only detectable by a post-hoc diff of `effective_scope(B) ⊄ scope(W_A)`, which nothing computes at runtime.

The characteristic signature in logs: the handoff envelope records `residency: EU-only` in the inbound field, and the callee's policy-context record shows `residency: US` in the effective field, with **no error event between them**. The two records are in different services and never joined.

A second, subtler variant: when `B` re-delegates to `C`, `C` inherits from `B`'s effective scope (`US`, 72h), not from `W_A`. The pin decays one hop and is unrecoverable — the warrant chain still *contains* the original pin, but no hop re-derives effective scope from the full chain. This is the transitive-closure failure: each hop validates against its immediate parent's *effective* scope, and since hop 1 already widened, hop 2 widens from the widened value.

Condition of Validity

The subset invariant holds only when all of the following are true at every delegation hop:

  1. The callee's policy-context constructor accepts inherited constraints as first-class inputs, and the merge operator is **intersection**, not override. `effective = local_scope ∩ inherited_scope`. Override semantics (callee wins) is the specific defect that produces widening.
  2. Residency pins are represented in the same scope algebra as data-class and retention, so that intersection is total — every field in the parent scope has a comparable field in the child scope. If the child's schema lacks the field, the merge must *fail closed*, not drop the field.
  3. The routing layer — the component that sees both the inbound warrant and the outbound effective scope — computes the subset check and raises on violation *before* the task executes. Neither endpoint can do this alone.
  4. Re-delegation re-derives effective scope from the **full warrant chain**, not from the immediate parent's effective scope. Equivalently: `effective(C) = local(C) ∩ effective(B) ∩ scope(W_A)`, computed with the original warrant still in the chain.

The invariant does **not** hold, and must not be assumed, when the federation uses a "trust the immediate parent" model, when the callee's policy engine predates the residency field (schema skew across orgs is the common trigger), or when the handoff is asynchronous and the callee constructs policy context before the envelope's constraint block has been fully parsed.

Decision Boundary

The instance must halt the delegation — not proceed-and-log — at exactly one point: **when the computed effective scope of the callee is not a subset of the delegating warrant's scope, and the violating field is a residency or retention pin.** The halt is mandatory because these are the fields where "permit" is irreversible: once PII crosses a jurisdiction boundary into a US store, no downstream check un-crosses it.

The instance must *not* halt, and should instead narrow-and-proceed, when the violation is a **capability superset** (callee has more capabilities than the warrant grants). Narrowing the capability set to the intersection is safe and preserves the task; the callee simply cannot use the extra capabilities. The distinction: capability supersets are recoverable by intersection at the routing layer; residency supersets are not recoverable once the data is read, because reading is the act that violates.

The hard boundary: **if the callee's policy schema cannot represent an inherited constraint field, the routing layer cannot compute intersection for that field, and the delegation must be rejected with a schema-incompatibility error rather than admitted with the field dropped.** Dropping an unrepresentable constraint is the silent-widening path. A schema that cannot express the pin is a schema that cannot honor it, and the correct response is refusal, not best-effort.

A corollary the boundary forces: the routing layer must be able to distinguish "callee declared residency `US`" (a policy choice, intersectable) from "callee has no residency field" (a schema gap, not intersectable). These look identical in a JSON payload where the field is simply absent, so the handshake must require an explicit `residency_supported: true` assertion, and treat absence as unsupported.

Operational Effect

Enforcing the subset check at the routing layer converts a silent, jurisdiction-crossing data flow into a synchronous, pre-execution rejection. The observable effects:

The architectural guardrail that bounds the failure: **effective scope is a derived, not stored, value, computed at each hop as the intersection of local scope and the full inherited chain; the routing layer refuses any delegation where the intersection is undefined for a required field.** The invariant is `effective(C) ⊆ scope(W_A)`, checked by the only component that sees both sides, with undefined intersection treated as violation rather than as permit.

from dataclasses import dataclass, field
from typing import Optional


class ResidencyScopeViolation(RuntimeError):
    """Raised when a delegated callee's effective scope is not a subset of the
    delegating warrant's scope on a residency or retention pin."""
    pass


class UnrepresentableConstraint(RuntimeError):
    """Raised when the callee's policy schema cannot express an inherited
    constraint field, making intersection undefined. Fail closed."""
    pass


@dataclass(frozen=True)
class Scope:
    data_class: str
    residency: Optional[str]      # None = field absent in schema
    max_retention_h: Optional[int]
    residency_supported: bool = True


@dataclass(frozen=True)
class Warrant:
    warrant_id: str
    scope: Scope
    granted_capabilities: frozenset


def intersect(parent: Scope, child_local: Scope) -> Scope:
    # Residency/retention: intersection, never override. Absent field = undefined.
    if not child_local.residency_supported or child_local.residency is None:
        raise UnrepresentableConstraint(
            f"callee schema cannot express residency (parent pin={parent.residency!r}); "
            f"refusing delegation rather than dropping the pin"
        )
    if parent.residency != child_local.residency:
        # Pin mismatch: intersection of distinct residency sets is empty -> violation.
        raise ResidencyScopeViolation(
            f"residency pin mismatch: warrant={parent.residency!r} "
            f"callee_local={child_local.residency!r}"
        )
    retention = min(
        x for x in (parent.max_retention_h, child_local.max_retention_h) if x is not None
    )
    return Scope(
        data_class=parent.data_class,
        residency=parent.residency,
        max_retention_h=retention,
        residency_supported=True,
    )


def route_delegation(warrant: Warrant, callee_local: Scope,
                     chain: list) -> Scope:
    """Compute effective scope over the full warrant chain and enforce subset.
    chain[0] is the original warrant scope; callee_local is the leaf's local scope."""
    effective = callee_local
    for inherited in reversed(chain):
        effective = intersect(inherited, effective)

    # Subset check against the ORIGINAL warrant, not the immediate parent.
    root = warrant.scope
    if effective.residency != root.residency:
        raise ResidencyScopeViolation(
            f"effective residency {effective.residency!r} not subset of "
            f"warrant {root.residency!r} (warrant={warrant.warrant_id})"
        )
    if (effective.max_retention_h or 0) > (root.max_retention_h or 0):
        raise ResidencyScopeViolation(
            f"effective retention {effective.max_retention_h} exceeds "
            f"warrant {root.max_retention_h} (warrant={warrant.warrant_id})"
        )
    return effective