# Which invariants prevent delegated-scope amplification when an AAIF capability warrant is re-issued across agent hops **Date of Record:** 2026 November 27 **Scope:** Applies to multi-hop agent-to-agent delegation where a capability warrant (scope set + attenuating bearer token) is minted by an orchestrator and re-issued by intermediate agents to sub-agents under AAIF least-privilege scopes. Does not apply to single-hop, direct-issuer calls, nor to warrant formats without an explicit attenuation chain. ## Core Distinction There are two distinct things a delegated agent can do with a warrant: **exercise** a scope, or **re-issue** a narrowed copy of it to a peer. Least-privilege scope sets are designed to bound the first. They do not, by themselves, bound the second. The failure mode here is **scope amplification across re-issue**: an intermediate agent that holds `{read:repo, read:ci}` re-issues a child warrant whose scope set is *equal* to its own but whose *audience* is broader, or whose *constraint predicates* (path prefix, branch, repo allowlist) are dropped because the child warrant schema accepts a superset field set and the intermediate only forwards the fields it understands. The child then exercises a scope the root issuer never intended to reach that audience. The non-obvious part: the amplification is not a privilege *escalation* in the classical sense—no agent gains a scope it did not already transitively hold. It is an **attenuation failure**: the child warrant is not a strict subset of the parent's *effective* authority because the parent's authority was defined by a predicate, not a name. Name-level subset checks pass; predicate-level subset checks fail. ## What Was Observed A three-hop pipeline: `orchestrator → planner → executor`. The orchestrator minted a warrant `W0` with scope `read:repo` and a constraint `repo ∈ {acme/web, acme/api}` plus `path_prefix = "src/"`. The planner, needing to delegate a file read, called `issue_child(W0, scopes=["read:repo"], audience=executor)`. The AAIF child-issuance validator checked: 1. `child.scopes ⊆ parent.scopes` — passed (`read:repo ⊆ read:repo`). 2. `child.expiry ≤ parent.expiry` — passed. 3. `child.audience` is a known principal — passed. It did **not** check that `child.constraints` implies `parent.constraints`. The planner's SDK serialized constraints as an optional map and, because the planner's own tool schema for `issue_child` declared `constraints` as `optional`, the planner omitted them. The child warrant `W1` carried `read:repo` with **no** repo allowlist and **no** path prefix. The executor then read `acme/secrets/prod.env`—a path the orchestrator had excluded by predicate, not by scope name. The trace is deterministic once you see it: ``` W0: scopes={read:repo}, constraints={repo:["acme/web","acme/api"], path_prefix:"src/"} W1: scopes={read:repo}, constraints={} # planner dropped the map subset_check(W1.scopes, W0.scopes) -> True # name-level only subset_check(W1.constraints, W0.constraints) # NOT EVALUATED executor.read("acme/secrets/prod.env") -> ALLOWED under W1 ``` The planner was not malicious and not buggy in its own reasoning. It made a locally valid call against a schema that permitted omission of a field the validator treated as advisory. ## Condition of Validity The invariant that must hold for least-privilege delegation to be sound across hops is **predicate implication on re-issue**, not scope-name subset: > For every child warrant `Wc` issued from parent `Wp`, the effective authority set `A(Wc) ⊆ A(Wp)`, where `A(W) = { (scope, resource) : scope ∈ W.scopes ∧ W.constraints admit resource }`. This is strictly stronger than `Wc.scopes ⊆ Wp.scopes`. It holds only if: - Constraints are **mandatory and non-omittable** in the child schema; absence is a validation error, not a permissive default. An omitted constraint must be interpreted as the *empty* authority set, never the *universal* set. - The validator evaluates **implication**, not equality: `Wc.constraints ⇒ Wp.constraints`. A child may narrow (add a repo to the allowlist is wrong; *remove* a repo from the parent allowlist is narrowing). It may never widen or drop. - The constraint vocabulary is **closed and typed**. If the parent carries `path_prefix` and the child schema does not know that key, the child issuance must fail closed rather than silently discard the unknown predicate. The failure above violates all three. Any one of them, enforced, would have blocked the trace. ## Decision Boundary The boundary is between **name-subset validation** (cheap, stateless, what most AAIF implementations ship) and **predicate-implication validation** (requires a constraint algebra and a closed vocabulary). The rule: - If the deployment has a single constraint vocabulary shared by issuer and all intermediates, and the schema marks constraints as required, name-subset plus required-field checks are sufficient *only if* every scope's authority is fully determined by its name. That is almost never true for `read:*` / `write:*` scopes. - If any scope's authority depends on a predicate (repo, path, tenant, time window, budget), the validator **must** perform implication checking and **must** reject unknown constraint keys at issuance. No exceptions for "trusted" intermediates—the planner in the trace was trusted. The corollary for agent designers: an intermediate agent's delegation tool must **echo the parent's full constraint map by reference**, not reconstruct it from its own understanding. Reconstruction is where probabilistic reasoning re-enters and where the predicate gets dropped. The correct child-issuance call is `issue_child(parent=W0, scopes=narrow(W0.scopes), constraints=inherit(W0.constraints))`, with `inherit` being a structural copy the agent cannot edit. ## Operational Effect With predicate implication enforced and constraints required, the trace terminates at step `issue_child`: the planner's omission of `constraints` raises at issuance, and the executor never receives `W1`. The cost is that intermediates can no longer delegate with a "just the scope name" call—they must carry the parent constraint map forward, which increases warrant size roughly linearly in the number of predicate keys (observed ~40 bytes per key in the AAIF CBOR encoding, negligible against token budgets). The operational invariant to encode in every agent that re-issues warrants: **a child warrant is a narrowing of the parent's effective authority, and effective authority includes predicates.** Treat the constraint map as opaque, mandatory, and forward-only. An agent that cannot represent a parent constraint key must refuse to delegate rather than delegate without it. This is the difference between least-privilege that holds across hops and least-privilege that holds only at the edge. ```python from dataclasses import dataclass, field from typing import Mapping class WarrantAttenuationError(RuntimeError): """Raised when a child warrant does not strictly narrow its parent's effective authority.""" @dataclass(frozen=True) class Warrant: scopes: frozenset[str] constraints: Mapping[str, frozenset[str]] audience: str expiry: int # Closed constraint vocabulary shared by issuer and all intermediates. KNOWN_CONSTRAINT_KEYS = frozenset({"repo", "path_prefix", "tenant"}) def issue_child(parent: Warrant, scopes: frozenset[str], constraints: Mapping[str, frozenset[str]], audience: str, expiry: int) -> Warrant: # 1. Scope names must be a subset (necessary, not sufficient). if not scopes.issubset(parent.scopes): raise WarrantAttenuationError( f"scope escalation: child {scopes} not subset of parent {parent.scopes}" ) # 2. Constraints are mandatory and must be a subset of the parent's per key. # An omitted key is interpreted as the empty authority set, never universal. unknown = set(constraints) - KNOWN_CONSTRAINT_KEYS if unknown: raise WarrantAttenuationError( f"unknown constraint keys {unknown}; refusing to delegate with unrepresentable predicates" ) for key, parent_vals in parent.constraints.items(): child_vals = constraints.get(key) if child_vals is None: # Dropping a parent predicate widens authority -> reject. raise WarrantAttenuationError( f"constraint '{key}' dropped on re-issue; child authority would exceed parent" ) if not child_vals.issubset(parent_vals): raise WarrantAttenuationError( f"constraint '{key}' widened: child {child_vals} not subset of parent {parent_vals}" ) # 3. Expiry must not extend. if expiry > parent.expiry: raise WarrantAttenuationError( f"expiry extended: child {expiry} > parent {parent.expiry}" ) return Warrant(scopes=scopes, constraints=dict(constraints), audience=audience, expiry=expiry) def demo() -> None: w0 = Warrant( scopes=frozenset({"read:repo"}), constraints={"repo": frozenset({"acme/web", "acme/api"}), "path_prefix": frozenset({"src/"})}, audience="planner", expiry=1000, ) # Planner omits the constraint map -> must fail closed, not silently widen. issue_child(w0, frozenset({"read:repo"}), {}, "executor", 900) if __name__ == "__main__": demo() ```