# Under what conditions must an instance re-derive its delegated-authority closure before each privileged tool call, and why AAIF scope attenuation fails silently at the third hop **Date of Record:** 2026 December 2 **Scope:** Applies to agents operating under AAIF verifiable credentials (VCs) with chained delegation (agent → sub-agent → tool-invoker) where authorization scopes are attenuated per hop and the executing instance holds only its own VC plus an opaque delegation chain. Does not apply to single-hop, root-issued bearer tokens or to human-session OAuth flows without agent intermediaries. ## Core Distinction The distinction that governs everything below is between **scope membership** (does the presented credential's `scope` array contain the requested capability?) and **scope closure** (is the requested capability reachable from the *root issuer* through every attenuation edge in the chain, under the current revocation and constraint state?). AAIF verification as commonly implemented checks membership at the leaf: the executing instance validates its own VC signature, checks that `requested_capability ∈ vc.scope`, and proceeds. That check is necessary but not sufficient. A delegated credential can be *locally valid and locally in-scope* while being *globally unauthorized*, because attenuation is enforced at issuance time, not at use time, and the chain is presented as an opaque blob that the leaf instance is not required to re-walk. The failure is silent because nothing in the leaf-side check fails. The signature is good. The scope contains the capability. The `exp` is in the future. The only thing that is false is the transitive implication `root_scope ⊇ leaf_scope`, and no single field in the leaf VC encodes that implication. ## What Was Observed A three-hop chain: orchestrator `O` (root, holds `scope = {read:repo, write:repo, deploy:staging}`), delegates to planner `P` with `scope = {read:repo, write:repo}` (correctly attenuated — `deploy:staging` dropped), which delegates to executor `E` with `scope = {read:repo, write:repo, deploy:staging}`. `E`'s VC is signed by `P`, is cryptographically valid, and its scope array *does* contain `deploy:staging`. The attenuation edge `P → E` was supposed to be a subset operation, but the delegation-issuance code in `P` merged a cached capability set from an earlier, broader session (a stale `P`-side working set) rather than intersecting with `P`'s own effective scope. `P` cannot grant what `P` does not hold; the issuance should have failed with a subset violation, but `P`'s issuer only checked that `E`'s requested scope was well-formed, not that it was `⊆ P.effective_scope`. At execution time, `E` called a privileged deploy tool. The tool's policy engine (a separate trust domain) checked `E`'s VC: signature valid, `deploy:staging ∈ scope`, not expired. Deploy executed against staging with `E`'s authority — authority that `O` never granted to `P` and therefore never transitively granted to `E`. The escalation was invisible at every individual checkpoint. It was only caught by a downstream audit that replayed the chain and computed `O.effective_scope ∩ … ∩ E.scope` and found the intersection empty for `deploy:staging`. The trigger condition, stated precisely: **an intermediate delegator issues a child credential whose scope is not a subset of the delegator's *effective* scope, where "effective" means the delegator's own VC scope intersected with all upstream constraints — and the leaf verifier performs only local membership checking.** The failure requires (a) at least three hops, (b) an intermediate issuer that validates shape but not subset, and (c) a leaf verifier that trusts the presented chain without re-walking it. All three are the default configuration in most AAIF deployments because re-walking is expensive and the chain is treated as a bearer artifact. ## Condition of Validity The invariant that must hold for the leaf check to be sound is: ``` ∀ hop i in chain: scope(i) ⊆ effective_scope(i-1) where effective_scope(j) = scope(j) ∩ ⋂_{k frozenset[str]: """Walk a delegation chain root-first, intersecting scopes and applying constraints. chain[0] must be the root-issued credential (parent_issuer is None). """ if not chain or chain[0].parent_issuer is not None: raise AuthorityClosureError("chain does not terminate at a root issuer") active = frozenset(active_constraints) effective = frozenset(chain[0].scope) for i, cred in enumerate(chain[1:], start=1): if cred.parent_issuer != chain[i - 1].issuer: raise AuthorityClosureError( f"broken delegation edge at hop {i}: issuer {cred.issuer!r} " f"claims parent {cred.parent_issuer!r} but previous issuer is {chain[i-1].issuer!r}" ) # Subset invariant: a delegator cannot grant what it does not effectively hold. if not cred.scope <= effective: raise AuthorityClosureError( f"scope escalation at hop {i}: {cred.issuer!r} granted " f"{sorted(cred.scope - effective)} not held by delegator" ) # Lapsed constraints silently strip authority even when scope arrays match. if not cred.constraints <= active: raise AuthorityClosureError( f"constraint violation at hop {i}: {sorted(cred.constraints - active)} not active" ) effective = effective & cred.scope return effective def authorize_privileged_call( chain: list[Credential], requested: str, active_constraints: Iterable[str], epoch_folded: bool, ) -> None: """Gate a privileged tool call on a freshly derived authority witness.""" if not epoch_folded: # Cached closure from a prior checkpoint/handoff epoch is not admissible. raise AuthorityClosureError( f"refusing privileged call {requested!r}: authority witness is stale " "(not folded in current execution epoch)" ) effective = fold_effective_scope(chain, active_constraints) if requested not in effective: raise AuthorityClosureError( f"refusing privileged call {requested!r}: not in effective scope " f"{sorted(effective)} (leaf declared {sorted(chain[-1].scope)})" ) ```