# What happens when an instance presents a valid AAIF capability token whose scope was attenuated against a stale delegation chain **Date of Record:** 2026 November 22 **Scope:** Applies to agent-to-agent delegation where a capability token's scope is derived by attenuation from a parent credential (e.g., an AAIF verifiable credential chain). Does not apply to flat, single-issuer tokens with no delegation ancestry, nor to revocation-only checks that ignore attenuation provenance. ## Core Distinction A capability token can be cryptographically valid, unexpired, and correctly signed by every link in its chain, and still be *semantically unauthorized* because the attenuation step that produced its scope was computed against a delegation chain snapshot that had already been superseded upstream. The distinction that matters operationally is between **signature validity** (the token verifies) and **scope provenance validity** (the scope was narrowed from a parent that was still the authoritative parent at attenuation time). AAIF verification pipelines routinely collapse these into one check. They are not the same check, and the gap between them is where privilege escalation hides. The failure is not a forged signature. It is a *time-of-check / time-of-attenuation* skew: a child agent receives a parent credential, computes a narrowed scope, mints a token, and presents it — but the parent's own scope was narrowed or re-scoped by *its* issuer in the interval between the child's read and the child's mint. The child's token is a valid descendant of a parent state that no longer exists. ## What Was Observed An orchestrator agent `O` holds a root credential granting `repo:read, repo:write, deploy:staging`. It delegates to planner `P` a credential attenuated to `repo:read, deploy:staging`, and separately, minutes later, the human operator revokes `deploy:staging` from `O`'s root by issuing a re-scoped root credential (scope now `repo:read, repo:write`) and publishing a revocation entry for the prior root's `deploy:staging` capability. `P`, working from its cached copy of `O`'s credential (fetched before the re-scope), attenuates to worker `W`: `repo:read, deploy:staging`. `W` mints a scoped capability token, signs it, and calls the deploy gate. The gate checks: (1) `W`'s token signature — valid; (2) every ancestor link's signature — valid, because `O`'s *old* credential is still a validly-signed object; (3) expiry — all future. The gate admits the deploy. The revocation entry for `O`'s `deploy:staging` was published, but the gate's chain walk validated against the credential *object* `P` embedded, not against the credential *state* at the revocation ledger's head. Trace of the divergence: 1. `t0` — `O` root credential `C_O` issued, scope includes `deploy:staging`. 2. `t1` — `P` fetches `C_O`, caches it, attenuates `C_P = attenuate(C_O, {repo:read, deploy:staging})`. 3. `t2` — operator re-scopes: `C_O'` issued without `deploy:staging`; revocation record `R(C_O, deploy:staging)` appended. 4. `t3` — `P` (unaware) attenuates `C_W = attenuate(C_P, {repo:read, deploy:staging})`, mints token `T_W`. 5. `t4` — gate verifies `T_W` → `C_W` → `C_P` → `C_O`. All signatures valid. No link expired. **Admitted.** The gate's chain walk is *structurally* correct and *temporally* wrong. It validated a delegation path that the issuer had already cut at `t2`. ## Condition of Validity The invariant that must hold for a delegated capability to be honored is: > For every ancestor link `L_i` in the chain from presented token to root, the scope of `L_i` as embedded in the chain must equal the scope of `L_i` at the revocation ledger's head as of the verification instant, and no revocation record may name any capability that the presented scope depends on. This is a **chain-head consistency** condition, not a signature condition. It fails whenever any attenuation was computed against a chain snapshot older than the ledger head at verification time. The window of vulnerability is exactly `[t_read_of_parent, t_verification]` for every agent in the chain — and it compounds: an `n`-deep chain has `n` such windows, and the effective skew is the maximum over the chain, not the last hop's. The condition is *only* satisfiable if the verifier resolves each ancestor to ledger-head state rather than trusting the embedded credential object. A chain that embeds signed parent credentials is self-authenticating but not self-freshening. Signatures prove *who said it*; they cannot prove *it is still what they say*. ## Decision Boundary The boundary between "honor" and "reject" is not "does the chain verify" but "does the chain verify **and** is every link's embedded scope a fixed point of the ledger head at verification time." Concretely: - If the ledger head is unreachable, the correct default is **reject**, not "trust embedded." A verifier that falls back to embedded-credential trust on ledger timeout converts a availability failure into an authorization bypass. - If any ancestor's embedded scope is a strict superset of its head scope, **reject** — even if the presented token's own scope is within the *embedded* ancestor scope. The narrowing was computed against a phantom parent. - If the presented token's scope is within the *head* scope of every ancestor, **honor**, regardless of what intermediate embedded snapshots claimed. Head state dominates. The subtle trap: an agent that "helpfully" re-attenuates on ledger mismatch (rather than rejecting) will silently mint a token valid under head state — which is correct authorization but wrong *accountability*, because the mint is now attributable to the verifier, not the delegator. Re-attenuation must be a delegator action, never a verifier action. ## Operational Effect The blast radius is privilege that outlives its grant by exactly the cache TTL of the deepest delegating agent. In observed runs, the skew window was dominated not by network latency but by **agent-side credential caching**: planners cached parent credentials for the duration of a task (tens of minutes), so a re-scope at `t2` was invisible until the planner's next cold fetch. The escalation surface is therefore proportional to task duration, not to ledger propagation delay — a counterintuitive result that inverts the usual "shorten TTL" mitigation. Shortening the ledger's propagation does nothing; shortening the *agent's* credential cache does everything. The guardrail that bounds it: verifiers must treat the delegation chain as a *claim to be re-resolved*, not a *proof to be checked*. Every ancestor is re-fetched at head, scope-compared, and the comparison is the authorization decision. Embedded credentials are used only to identify *which* ancestors to resolve, never as the authority itself. This makes verification `O(depth)` ledger reads per call — expensive, and the reason it gets skipped — but it is the only construction under which the chain-head invariant is enforceable. A cached, signature-only verification is not a weaker version of this check; it is a different check that does not imply the invariant. Second-order effect: when this failure is caught in audit, the natural fix — "pin the chain at mint time and verify against the pin" — *reproduces the bug*, because the pin is the stale snapshot. The pin must be a ledger head hash, and verification must confirm the pin is still head or resolve forward. Pinning the chain object is the failure; pinning the head is the fix. ```python class StaleDelegationChainError(RuntimeError): """Raised when a capability token's delegation chain was attenuated against an ancestor snapshot that is no longer the ledger head.""" pass def verify_capability(token, ledger, max_depth=8): chain = resolve_chain(token) # embedded, signed, self-authenticating if len(chain) > max_depth: raise StaleDelegationChainError( f"chain depth {len(chain)} exceeds bound {max_depth}" ) for link in chain: head_scope = ledger.head_scope(link.issuer_id, link.credential_id) if head_scope is None: # ledger unreachable or credential unknown: fail closed raise StaleDelegationChainError( f"cannot resolve head for {link.credential_id}; " f"refusing embedded-trust fallback" ) if not link.embedded_scope.issubset(head_scope): raise StaleDelegationChainError( f"link {link.credential_id} embedded scope " f"{link.embedded_scope} exceeds head scope {head_scope}; " f"attenuation computed against superseded parent" ) # only now is the chain-head invariant satisfied return authorize(token.scope, chain[0].head_scope) ```