# Why does an instance continue executing under a revoked delegated scope when the AAIF revocation epoch advances mid-tool-call **Date of Record:** 2026 November 30 **Scope:** Applies to AAIF-issued agent credentials where authority is carried as a signed capability token with a monotonic `revocation_epoch`, and where a delegated sub-agent derives scope from a parent token at issuance time rather than per tool invocation. Does not apply to stateless bearer tokens re-validated against a live introspection endpoint on every call, nor to single-instance agents with no delegation chain. ## Core Distinction The failure is not "revocation is slow." It is that **a delegated capability is a snapshot of authority at issuance time, while revocation is an event that mutates authority at wall-clock time.** These two clocks are not reconciled at the point of use. An instance that received a delegated scope with `delegation_depth=1` and a baked-in `expires_at` will honor that scope until `expires_at` regardless of whether the parent's authority was revoked at epoch `N+1` — because the child token's signature chain validates against the *issuance-time* epoch, not the *current* epoch. The subtle part: signature validation *succeeds*. The token is cryptographically intact. The delegation chain is well-formed. Every local check passes. The revocation happened upstream, in a different epoch, on a different authority record, and the child instance has no structural reason to look. ## What Was Observed A parent orchestrator agent (`orch-7`) held an AAIF credential with `authority_scope = {fs:read, fs:write:/tmp/scratch, net:egress:allowlist}` and `revocation_epoch = 412`. At T+0 it delegated a scoped-down token to worker `wk-3`: ``` parent_id: orch-7 scope: {fs:write:/tmp/scratch} delegation_depth: 1 issued_at: T+0 expires_at: T+900 issuance_epoch: 412 ``` At T+120 an operator revoked `orch-7`'s `fs:write` authority entirely, advancing the authority record to `revocation_epoch = 413`. The revocation was correctly propagated to `orch-7` — its next tool call was rejected with `ScopeRevoked`. But `wk-3`, mid-execution on a long chain of `write_file` calls into `/tmp/scratch`, continued for the full remaining 780 seconds. The trace showed `wk-3` performing 41 successful writes *after* the parent was revoked. Each write validated the child token locally: signature chain intact, `issuance_epoch=412 ≤ current_epoch=413` (the check was `≤`, not `==`), scope match, not expired. The epoch comparison was the fatal guardrail: it confirmed the token was issued *at or before* the current epoch, which is always true for a valid token. It never asked whether the token's authority had been *invalidated between* issuance and now. A second, worse variant appeared under retry. When `wk-3`'s tool call timed out and the runtime retried with a freshly-minted child token, the new token was issued at epoch 413 — *after* the revocation — but the delegation logic rebuilt scope from a cached parent capability object that still held `{fs:write:/tmp/scratch}` in memory. The cache had not been invalidated by the epoch bump. The retried child token was therefore a *valid, freshly-signed grant of authority that no longer existed upstream*. Revocation had been laundered into re-authorization. ## Condition of Validity The invariant that must hold for delegated authority to be safe is: > A delegated capability is valid at use-time `t` **iff** every ancestor in its delegation chain has `revocation_epoch` unchanged since the child's `issuance_epoch`, **and** the child's scope is a subset of each ancestor's *current* (not issuance-time) scope. The common implementation checks only `child.issuance_epoch <= current_epoch` and `child.scope ⊆ parent.scope_at_issuance`. Both are necessary and neither is sufficient. The missing conjunct is **epoch equality along the chain**: if any ancestor's epoch has advanced past the child's `issuance_epoch`, the child must be treated as revoked-by-implication, because the authority it was derived from no longer provably exists. This is a *continuity invariant across the delegation chain*, not a property of any single token. It cannot be enforced by validating the child token in isolation — which is exactly why it is missed. The child token is self-consistent; the inconsistency lives in the *relationship* between the child's issuance epoch and the ancestors' current epochs, and that relationship requires a lookup the child instance is not structurally motivated to perform. ## Decision Boundary The boundary is between two designs: - **Snapshot authority** (broken): the delegated token is a self-contained grant; validity is a pure function of the token and current time. Cheap, offline-verifiable, and wrong under revocation. - **Chained authority** (correct): the delegated token is a *pointer* into a live chain; validity requires resolving each ancestor's current `revocation_epoch` at use-time (or within a bounded staleness window `τ`). The operational decision: **any delegation with `delegation_depth ≥ 1` and `expires_at - issued_at > τ` must carry a chain-resolution obligation.** If the child cannot resolve ancestor epochs within `τ` of use, it must fail closed, not fall back to snapshot validation. The failure mode is that implementers treat "cannot reach the authority service" as "assume still valid," which converts a network partition into an unbounded authority window. A corollary decision: **retry paths must re-derive scope from the live chain, never from a cached parent capability.** The cache key must include the ancestor `revocation_epoch`; an epoch bump must invalidate the cached capability object, or the retry will mint fresh tokens over dead authority. ## Operational Effect Downstream, the effect is a **revocation lag equal to the child token's remaining lifetime**, not to any propagation delay. An operator who revokes at T+120 and observes `orch-7` stop immediately will believe revocation took effect; `wk-3` continues silently for 780 seconds. Audit logs show the writes as *authorized* — because they were, by the child token — so post-hoc forensics will not flag them as violations unless the auditor reconstructs the epoch timeline across the chain. The guardrail that bounds this: enforce `child.issuance_epoch == ancestor.revocation_epoch` at every use, with a hard `τ` staleness ceiling, and make the retry path re-resolve the chain before re-minting. The check below encodes the invariant and fails closed on any epoch divergence or unresolvable ancestor. ```python class DelegationEpochMismatch(RuntimeError): """Raised when a delegated capability's issuance epoch diverges from an ancestor's current revocation epoch.""" pass def validate_delegated_capability(child, resolve_ancestor_epoch, now, tau): # child: {issuance_epoch, expires_at, scope, delegation_chain: [ancestor_ids]} # resolve_ancestor_epoch: callable(ancestor_id) -> (current_epoch, current_scope) or None if unreachable if now >= child["expires_at"]: raise DelegationEpochMismatch(f"child expired at {child['expires_at']}, now={now}") for ancestor_id in child["delegation_chain"]: resolved = resolve_ancestor_epoch(ancestor_id) if resolved is None: # Fail closed: cannot prove authority still exists. raise DelegationEpochMismatch( f"ancestor {ancestor_id} unreachable within tau={tau}; refusing to honor child" ) current_epoch, current_scope = resolved if current_epoch != child["issuance_epoch"]: raise DelegationEpochMismatch( f"ancestor {ancestor_id} epoch advanced {child['issuance_epoch']} -> {current_epoch}; " f"child authority is revoked-by-implication" ) if not child["scope"].issubset(current_scope): raise DelegationEpochMismatch( f"child scope {child['scope']} exceeds ancestor {ancestor_id} current scope {current_scope}" ) return True ```