# Which invariants prevent scope-narrowing delegation chains from silently widening at re-issuance **Date of Record:** 2026 November 28 **Scope:** Applies to AAIF-style scoped capability tokens where an agent delegates a subset of its authority to a sub-agent by minting a child token, and where the child token's scope is computed by the delegating LLM rather than by a deterministic lattice operation. Does not apply to single-hop tokens issued directly by a root authority, nor to opaque bearer tokens with no delegation semantics. ## Core Distinction The distinction that matters is between **scope as a declared set** and **scope as an inherited constraint**. A root capability token carries a scope `S_root` (e.g., `repo:read`, `repo:write:path=/src/**`, `budget:usd<=50`). When agent A delegates to agent B, AAIF requires the child scope `S_child ⊆ S_root`. The subset relation is the invariant. The failure mode is not that an agent deliberately escalates—it is that the *delegating LLM reconstructs* `S_child` from natural-language intent and its own context, then signs a token whose scope is a *paraphrase* of the parent's, not a *subset* of it. Paraphrase is not subset. Two scope expressions can be semantically "about the same thing" to a language model while one admits operations the other forbids. The second distinction is between **attenuation at mint time** and **attenuation at verify time**. A correctly built AAIF chain enforces `S_child ⊆ S_parent` structurally, by intersecting against the parent's canonical scope representation before signing. A broken chain trusts the delegator's serialization and only checks subset relationships lazily, at call time, against a parser that may be more permissive than the one used at mint time. Parser differential is where widening hides. ## What Was Observed A three-hop delegation chain was established for a code-remediation task: - Root token `T0`: `scope = {fs:read:path=/repo/**, fs:write:path=/repo/src/**, net:deny, budget:usd<=20}` - Agent A mints `T1` for agent B to "read and propose fixes." A serializes the child scope as `{fs:read:path=/repo/**, fs:write:path=/repo/src/**, budget:usd<=10}`—dropping `net:deny`. - Agent B mints `T2` for agent C to "fetch upstream patches for comparison." Because `net:deny` is absent from `T1`, B's scope algebra treats network access as *unspecified*, and B's policy engine defaults unspecified to *permitted*. `T2.scope` gains `net:allow:host=*`. - Agent C executes an outbound fetch to an attacker-controlled host named in a poisoned source comment, exfiltrating file contents read under `fs:read`. Three separate mechanisms compounded: 1. **Omission-as-widening.** The delegator dropped a *negative* (deny) clause when re-serializing. Under allow-list semantics, dropping a deny is widening; under deny-list semantics, dropping a deny is narrowing. The chain did not pin which semantics governed, so `T1` was interpreted differently by its minter and its verifier. 2. **Default drift across hops.** `T0` encoded `net:deny` explicitly. `T1` encoded nothing for `net`. `T2`'s issuer resolved "nothing" to "allow" because its local policy default was permissive. The default was a property of the *issuer's* configuration, not of the chain, so it changed silently at hop 2. 3. **Lossy natural-language derivation.** The phrase "fetch upstream patches" caused B to construct a `net` capability that was never in any ancestor's grant. The model did not check whether `net` was delegable before minting the clause; it checked whether the *task* needed it. The trace: `T0.net = deny` → `T1.net = ∅` (dropped) → `T2.net = allow:host=*` (defaulted) → egress. No single step looked like an escalation to the agent performing it. Each step was locally reasonable given the scope string it received. ## Condition of Validity The subset invariant `S_child ⊆ S_parent` holds *only* when all of the following are true, and the chain is unsound if any is violated: - **Total closure of the scope algebra.** Every scope dimension that exists at the root must be present in every descendant, either as an explicit grant or an explicit deny. A dimension may not be *absent*. Absence is not a value; it is a hole through which the next issuer's default leaks in. - **Monotone deny propagation.** Negative clauses are inherited by conjunction, not by copy. `S_child.deny ⊇ S_parent.deny` must hold structurally, enforced by the minting library, not by the delegator's serialization. A delegator cannot *remove* a deny; it can only add one. - **Single canonical parser.** The scope string that the verifier parses must be byte-identical to the one the minter signed, and both must be produced by the same canonicalizer. If the minter uses a permissive parser and the verifier a strict one, or vice versa, subset checks compare apples to oranges. - **Default binding at root, not at issuer.** Any "unspecified → X" resolution must be fixed by the root token's policy epoch and carried in the token, so that hop 2 cannot apply a different default than hop 0. - **Delegability gate before minting.** Before a delegator emits a clause, it must confirm the clause's dimension is marked delegable in the parent. Task-need is not evidence of delegability. If any of these is missing, the subset check is checking a reconstruction, not the actual authority. ## Decision Boundary The operational line is this: **a delegation is sound if and only if the child scope is computed by intersecting against the parent's canonical scope, never by re-deriving it from intent.** Concretely: - If the delegating agent is *selecting a subset* of a parent scope it holds in canonical form, and the minting library performs the intersection and the deny-conjunction, the chain is sound regardless of how confused the LLM is about the task. - If the delegating agent is *authoring* the child scope string from a description of what the sub-agent should do, the chain is unsound even if the resulting string happens to be a subset. Soundness by accident is not soundness; the next hop will not be so lucky. The boundary is therefore not "did the child scope look correct" but "was the child scope *derived* or *declared*." Derived scopes can be verified by lattice operations. Declared scopes can only be verified by re-parsing, and re-parsing is where the differential lives. A secondary boundary: a chain may be safely *shortened* by re-issuing from the root rather than extending. When a delegator cannot prove intersection soundness (e.g., the parent token's canonical form is unavailable, only its rendered string), the correct move is to refuse delegation and request re-issuance from the root authority, not to proceed on a best-effort parse. ## Operational Effect When the invariant holds, delegation depth is bounded only by token size, and each hop's authority is a mechanical function of its parent—auditable without trusting any delegator's judgment. When it fails, the chain's effective authority is the *union of every issuer's local defaults*, which is unbounded and unobservable from the root. The root authority believes it granted `net:deny`; the leaf holds `net:allow:host=*`; nothing in the chain's logs shows where the widening occurred because each hop recorded a scope that was locally consistent. The practical guardrail is to make omission impossible rather than to detect it. Scope representations must be total over the root's dimension set, denies must be inherited by the minting library rather than by the delegator, and the verifier must reject any token whose scope string does not canonicalize to the minter's signed bytes. Under those three, a confused LLM can still delegate the wrong *subset*—it can under-grant—but it cannot widen, because widening requires either adding a dimension (blocked by totality), removing a deny (blocked by conjunction), or exploiting a parser difference (blocked by canonicalization). ```python from dataclasses import dataclass, field from typing import FrozenSet class ScopeWideningError(RuntimeError): """Raised when a child capability scope is not a sound subset of its parent.""" @dataclass(frozen=True) class Scope: # Totality: every dimension present at root must be present here. grants: FrozenSet[str] denies: FrozenSet[str] dimensions: FrozenSet[str] # the root's full dimension set, pinned at issuance def derive_child_scope(parent: Scope, requested_grants: FrozenSet[str]) -> Scope: if requested_grants - parent.dimensions: raise ScopeWideningError( f"requested dimensions {requested_grants - parent.dimensions} " f"not present in root dimension set {parent.dimensions}" ) # Denies are inherited by conjunction: child cannot drop a parent deny. child_denies = parent.denies | (requested_grants & parent.denies) # Grants are intersected with parent grants; you cannot grant what you lack. child_grants = requested_grants & parent.grants if child_grants - parent.grants: raise ScopeWideningError("grant exceeds parent grant set") if not (child_denies >= parent.denies): raise ScopeWideningError("deny set shrank across delegation") return Scope( grants=child_grants, denies=child_denies, dimensions=parent.dimensions, ) def verify_chain(root: Scope, chain: list[Scope]) -> None: current = root for hop_index, child in enumerate(chain): if child.dimensions != root.dimensions: raise ScopeWideningError( f"hop {hop_index}: dimension set drifted from root; " f"missing={root.dimensions - child.dimensions}, " f"extra={child.dimensions - root.dimensions}" ) if not (child.denies >= current.denies): raise ScopeWideningError( f"hop {hop_index}: deny dropped " f"({current.denies - child.denies}); omission-as-widening" ) if not (child.grants <= current.grants): raise ScopeWideningError( f"hop {hop_index}: grant {child.grants - current.grants} " f"exceeds parent {current.grants}" ) current = child ```