# When must an instance treat a delegated AAIF credential as dead the moment its parent is revoked, even if the child’s `exp` is still in the future? **Date of Record:** 2026 November 29 **Scope:** Applies to any agent runtime that receives a delegated AAIF capability token (child credential) minted from a parent credential held by another instance, and that authorizes tool calls or peer handoffs against that child. Does not apply to root credentials anchored directly to the workload identity, nor to purely offline batch jobs that complete within a single lease window shorter than the revocation propagation interval. ## Core Distinction The failure is not "revocation is slow." The failure is that a child credential is a *derived authority claim*, and runtimes routinely conflate two different validity questions: 1. **Is this token structurally valid and unexpired?** (local, cheap, decidable from the token alone) 2. **Does the authority it delegates still exist upstream?** (non-local, requires querying the revocation state of the parent chain) AAIF delegated credentials carry a `parent_id`, a `delegation_depth`, and a signed `delegation_scope` subset. They do **not** carry a live pointer to the parent's revocation status. So a child token with `exp = T+3600` is *structurally* valid for an hour after the parent is revoked at `T`. An agent that checks only `exp`, `sig`, and `scope ⊇ requested_action` will keep executing with authority that was withdrawn — and worse, will keep *re-delegating* it to downstream peers, fanning the dead authority out across the swarm faster than revocation can chase it. The invariant that must hold: **a delegated credential's effective validity is the intersection of its own `[nbf, exp]` window and the live validity of every ancestor in its delegation chain.** The moment any ancestor is revoked, the child is dead — not at its `exp`, not at the next cache refresh, but at the instant the runtime next relies on it. ## What Was Observed A three-tier delegation was in play: - Instance `A` (orchestrator) holds root credential `R`, scope `{fs:read, fs:write, net:egress}`. - `A` delegates to `B` (worker) a child `C1 = delegate(R, scope={fs:read, fs:write}, ttl=1h)`. - `B` delegates to `C` (sub-worker) a grandchild `C2 = delegate(C1, scope={fs:read}, ttl=30m)`. At `T`, an operator revokes `C1` — because `B` was found to be over-broad in what it handed out. `C1`'s revocation is recorded in the AAIF revocation service. `C2` is untouched: it is a valid signature over a valid scope, `exp = T+30m`. What happened next is the trace that matters: 1. At `T+2s`, `C` calls a tool with `C2`. `C` validates `C2` locally: signature ok, `nbf ≤ now ≤ exp`, `scope={fs:read}` covers the requested read. **Passes.** 2. `C` does not check `C1`. Its validator was written to check "the credential presented," not "the credential's ancestry." 3. At `T+9s`, `C` re-delegates from `C2` to a peer `D` as `C3 = delegate(C2, scope={fs:read}, ttl=20m)`. `C3` is now a *third-generation* token whose entire authority derives from a credential revoked seven seconds ago. 4. The revocation service, which walks the chain on revoke, marked `C1` revoked and `C2` revoked (cascade), but `C3` did not exist at revocation time and was never enqueued. 5. `D` executes reads for ~18 minutes against authority that was withdrawn at `T`. The observation: **revocation cascades downward through the chain that exists at revoke time, but authority re-derives downward through chains that did not exist at revoke time.** The two directions do not meet. A child minted *after* its parent's revocation, from a parent the minter still believes is live, is a token that no cascade will ever touch. Note the second-order effect: `C`'s local validator was *correct per its spec*. The spec said "validate the presented credential." The bug is in the spec's silence about ancestry, not in the validator's code. ## Condition of Validity The "check `exp` and signature" path is sound only under a condition that is almost never stated: > A delegated credential may be validated locally, without an ancestry check, **iff** the runtime can prove that no ancestor in its chain was revoked at any point in `[credential.nbf, now]`, **or** that the credential's remaining lifetime is strictly less than the revocation propagation bound `δ` *and* the runtime has not re-delegated from it. In practice neither disjunct holds for an agent that hands off work. `δ` (the interval from revoke to all validators observing revoke) is on the order of seconds to minutes and is *not* bounded by token TTL. A 30-minute child token trivially outlives `δ`. So the local-only path is valid only for the degenerate case of a leaf credential with a TTL shorter than `δ` that is never re-delegated — which is not what multi-agent handoff looks like. The correct condition is the intersection rule: effective validity = own window ∩ live validity of all ancestors, evaluated at *use time*, with the ancestry set captured at *mint time* and re-checked at every use and every re-delegation. ## Decision Boundary The runtime must draw a hard line at **re-delegation**, not at use: - **At use of a leaf credential:** local validation is permitted *only if* the credential is marked `non_delegable` and its TTL ≤ `δ`. Otherwise, resolve ancestry and confirm no ancestor is revoked. - **At re-delegation (minting a child from a child):** ancestry resolution is **mandatory and synchronous**. You may not mint `C3` from `C2` without confirming `C2`'s entire chain is live at mint time. This is the boundary the observed system crossed. Minting is the act that creates authority the revocation service cannot see; it is therefore the act that must be gated hardest. - **At revoke:** cascade must mark the *subtree* revoked, and the revocation record must include a `not_before`-style floor so that any token whose chain passes through the revoked node is rejected regardless of mint time. A child minted at `T+9s` from a parent revoked at `T` must be rejected because its ancestry contains a node whose revocation interval covers the child's `nbf`. The decision is: **authority is not a property of the token; it is a property of the token's ancestry evaluated at the moment of reliance.** Any code path that treats a delegated token as self-contained authority has crossed the boundary. ## Operational Effect Concretely, the guardrail is a validator that refuses to authorize a delegated credential unless it can walk the chain to a live root, and a minter that refuses to delegate from any credential whose ancestry is not currently live. The cost is one ancestry resolution per use (cacheable for `min(δ, remaining_ttl)` with a hard invalidation on any observed revoke) and one synchronous resolution per mint. The benefit is that the re-derivation fan-out described above becomes impossible: you cannot mint authority from dead authority, so the revocation service never has to chase tokens it did not know existed. The failure to avoid is subtle and worth naming precisely: it is not that the child token lies. Every field in `C2` is true. It is that `C2`'s truth is *conditional on a fact outside itself* — the liveness of `C1` — and the runtime treated a conditional authority as unconditional. Delegated credentials are promises about the past (this was validly delegated) that say nothing about the present (the delegator still holds the authority). An agent that relies on the promise without checking the present is executing on a revoked warrant. ```python import time from dataclasses import dataclass, field from typing import Optional class DeadAncestryError(RuntimeError): """Raised when a delegated credential's ancestry is not live at reliance time.""" @dataclass class Credential: cred_id: str parent_id: Optional[str] scope: frozenset nbf: float exp: float non_delegable: bool = False revoked_at: Optional[float] = None @dataclass class RevocationLog: # revoke time keyed by cred_id; presence means revoked revoked: dict = field(default_factory=dict) def is_revoked_at(self, cred_id: str, t: float) -> bool: r = self.revoked.get(cred_id) return r is not None and r <= t # Propagation bound: max seconds from revoke to universal observation. DELTA = 30.0 def resolve_ancestry(cred: Credential, store: dict) -> list: chain = [cred] cur = cred while cur.parent_id is not None: parent = store.get(cur.parent_id) if parent is None: raise DeadAncestryError( f"credential {cur.cred_id} references unknown parent {cur.parent_id}" ) chain.append(parent) cur = parent return chain def authorize_use(cred: Credential, store: dict, log: RevocationLog, now: float, requested: frozenset) -> None: # Structural checks first (cheap). if not (cred.nbf <= now <= cred.exp): raise DeadAncestryError(f"{cred.cred_id} outside own validity window") if not requested.issubset(cred.scope): raise DeadAncestryError(f"{cred.cred_id} scope does not cover request") # Local-only fast path is legal ONLY for non-delegable leaves # whose remaining life is within the propagation bound. if cred.non_delegable and (cred.exp - now) <= DELTA: if log.is_revoked_at(cred.cred_id, now): raise DeadAncestryError(f"{cred.cred_id} revoked") return # Otherwise: walk the chain and confirm every ancestor is live at `now`. for node in resolve_ancestry(cred, store): if log.is_revoked_at(node.cred_id, now): raise DeadAncestryError( f"{cred.cred_id} relies on revoked ancestor {node.cred_id}" ) def mint_child(parent: Credential, store: dict, log: RevocationLog, now: float, child_scope: frozenset, ttl: float) -> Credential: # Re-delegation is the boundary: ancestry MUST be live at mint time. for node in resolve_ancestry(parent, store): if log.is_revoked_at(node.cred_id, now): raise DeadAncestryError( f"refusing to delegate from {parent.cred_id}: " f"ancestor {node.cred_id} revoked at {log.revoked[node.cred_id]}" ) if not child_scope.issubset(parent.scope): raise DeadAncestryError("child scope exceeds parent scope") child = Credential( cred_id=f"{parent.cred_id}.{int(now)}", parent_id=parent.cred_id, scope=child_scope, nbf=now, exp=min(now + ttl, parent.exp), ) store[child.cred_id] = child return child # --- Reproduce the observed failure and its prevention --- if __name__ == "__main__": store, log = {}, RevocationLog() R = Credential("R", None, frozenset({"fs:read", "fs:write"}), 0, 10_000) store[R.cred_id] = R C1 = mint_child(R, store, log, now=100.0, child_scope=frozenset({"fs:read", "fs:write"}), ttl=3600) C2 = mint_child(C1, store, log, now=110.0, child_scope=frozenset({"fs:read"}), ttl=1800) # Operator revokes C1 at T=200. log.revoked[C1.cred_id] = 200.0 # C2 is structurally fine at T=202; the naive path would pass it. authorize_use(C2, store, log, now=202.0, requested=frozenset({"fs:read"})) # raises # And the re-delegation that produced C3 in the incident is now blocked: try: C3 = mint_child(C2, store, log, now=209.0, child_scope=frozenset({"fs:read"}), ttl=1200) except DeadAncestryError as e: print(f"blocked re-derivation of dead authority: {e}") ```