# What happens when an instance presents a delegated AAIF credential whose scope chain is valid per-issuer but the intersection of delegated scopes is empty at the terminal hop **Date of Record:** 2026 November 25 **Scope:** Applies to any agent runtime that accepts delegated Agent Identity and Authorization Framework (AAIF) credentials where authority is attenuated hop-by-hop across a cross-issuer trust chain (issuer A → delegator B → delegate C). Does not apply to single-issuer bearer tokens, nor to flat capability tokens with no delegation chain. ## Core Distinction The failure is not signature invalidity, nor an expired credential, nor a missing trust anchor. Each link in the chain verifies cleanly: every issuer signature checks, every `exp`/`nbf` window is satisfied, every issuer appears in the verifier's trust store, and every hop's delegated scope is a *subset* of the scope it received. The credential is, link by link, perfectly well-formed. What breaks is the **terminal scope intersection**. AAIF attenuation semantics require that a delegate's effective authority be the set intersection of all scopes along the chain, evaluated at the terminal verifier. But the intersection is computed *per-issuer namespace*, and scope identifiers are namespaced strings (e.g. `mailer:send`, `vault:read`, `payments:charge`). When two issuers use syntactically identical scope strings that are semantically *disjoint* — or when each hop attenuates into a namespace the next hop cannot interpret — the chain verifies while the *effective* authority at the terminal hop is the empty set. The agent then executes with zero authorized capability but a fully valid credential, and the failure surfaces downstream as a tool-call authorization error rather than at credential acceptance time. ## What Was Observed A three-hop chain: orchestrator agent (issuer `aaif://org-a`) delegated to a retrieval sub-agent (issuer `aaif://org-b`), which delegated to a sandboxed executor (issuer `aaif://org-c`). - Hop 1 credential: scope set `{vault:read, vault:list}`, issued by org-a. - Hop 2 credential: org-b re-issues with scope `{vault:read}` — a strict subset of what it received. Valid. - Hop 3 credential: org-c re-issues with scope `{vault:read}` — again a strict subset. Valid. At the terminal executor, the verifier walks the chain, confirms each hop's scope is a subset of its parent, confirms all three issuers are in the trust store, and admits the credential. The executor then calls `vault.read()` and receives `403 SCOPE_NOT_GRANTED`. The reason: org-b and org-c both define `vault:read` in their *own* namespace, and neither namespace is registered as an alias of org-a's `vault` resource. The intersection of `{org-a/vault:read}` ∩ `{org-b/vault:read}` ∩ `{org-c/vault:read}` under canonical resource identity is empty — three distinct resources that happen to share a leaf string. The chain was admitted because the verifier checked *subset containment on string scopes*, not *resource-identity intersection on canonical scopes*. The empty intersection is invisible to a string-based attenuation check. A second observed variant: the terminal hop receives a scope string it cannot parse (`vault:read@v2` from a newer issuer), treats it as an opaque unknown scope, carries it through verification, and then the runtime's authorization layer silently drops unknown scopes — again yielding an empty effective set with a green credential. ## Condition of Validity This boundary is real and reachable precisely when **all** of the following hold: 1. The chain has ≥2 hops (delegation depth ≥ 1), so an intersection is actually computed. 2. At least two issuers in the chain use scope identifiers that are string-equal but resource-distinct, or resource-equal but string-distinct (namespace aliasing absent). 3. The terminal verifier performs attenuation as *string subset containment* rather than *canonical resource intersection*. 4. No hop enforces a non-empty-intersection invariant at issue time. If any of (1)–(4) fails, the failure does not manifest: single-hop chains never intersect, canonicalized scopes collapse correctly, or issue-time intersection checks reject the hop before it is minted. The dangerous case is (3) without (4) — verification passes, minting passes, and the emptiness is only discovered at first tool call. ## Decision Boundary The correct architectural invariant is: **the terminal verifier must compute the effective scope set as the canonical-resource intersection across all hops and reject any credential whose intersection is empty, before admitting the agent to execution.** Two guardrails bound the failure: - **Canonical resource identity at issue time.** Every issuer must resolve scope strings to a canonical `(resource-uri, action)` pair via a shared registry or alias map. Two scopes intersect only if their canonical pairs are equal. String equality is never sufficient. - **Non-empty-intersection invariant at delegation.** A delegator MUST refuse to mint a child credential whose canonical scope set, intersected with its own effective set, is empty. This pushes the failure to issue time, where the delegator's identity is known and the error is attributable. Absent both, the failure is silent and surfaces as a downstream authorization denial with no trace back to the credential chain — the worst possible observability profile. ## Operational Effect When the invariant is unenforced, three concrete effects follow: - **Attribution collapse.** The tool-call `403` is logged against the executor, not the credential chain. Incident response investigates the executor's permissions rather than the delegation graph, and the empty intersection is never surfaced. - **Fail-open under unknown scopes.** Runtimes that treat unparseable scopes as "carry through, drop at use" convert a parse failure into a silent empty grant — an authorization *downgrade* masquerading as a successful verification. - **Replay divergence across verifiers.** A verifier that canonicalizes and one that does not will reach opposite admission decisions on the identical credential, breaking cross-instance determinism and making the chain's behavior dependent on which verifier it lands on. The guardrail is a canonicalization gate plus a non-empty-intersection check, both enforced before admission. The code below encodes that gate as a hard rejection. ```python from dataclasses import dataclass from typing import FrozenSet, Tuple class EmptyScopeIntersectionError(RuntimeError): """Raised when a delegated AAIF chain verifies per-hop but yields an empty canonical-resource intersection at the terminal verifier.""" @dataclass(frozen=True) class Scope: resource_uri: str action: str def canonical(self) -> Tuple[str, str]: return (self.resource_uri, self.action) @dataclass(frozen=True) class Hop: issuer: str scopes: FrozenSet[Scope] def canonical_intersection(chain: Tuple[Hop, ...]) -> FrozenSet[Scope]: if not chain: return frozenset() effective = {s.canonical() for s in chain[0].scopes} for hop in chain[1:]: effective &= {s.canonical() for s in hop.scopes} return frozenset( Scope(uri, act) for (uri, act) in effective ) def admit(chain: Tuple[Hop, ...]) -> FrozenSet[Scope]: # Per-hop signatures, expiry, and trust anchors are assumed already # verified upstream. This gate enforces only the intersection invariant. effective = canonical_intersection(chain) if not effective: issuers = " -> ".join(h.issuer for h in chain) raise EmptyScopeIntersectionError( f"AAIF chain [{issuers}] verified per-hop but canonical scope " f"intersection is empty; admitting would grant zero authority " f"under a valid credential." ) return effective def delegate(parent: Hop, child: Hop) -> Hop: # Issue-time guard: refuse to mint a child whose intersection with the # parent's effective authority is empty. if not canonical_intersection((parent, child)): raise EmptyScopeIntersectionError( f"refusing to mint delegated credential from {parent.issuer} " f"to {child.issuer}: empty canonical intersection" ) return child ```