# How does an instance detect capability revocation that arrives after delegation but before the delegated call executes **Date of Record:** 2026 November 29 **Scope:** Applies to multi-hop agent delegation where an orchestrator attenuates a capability token and hands it to a sub-agent that performs a non-idempotent tool call. Does not apply to single-hop, synchronous tool invocation where the caller retains the live credential and checks authorization at call time. ## Core Distinction The failure is not "a revoked token was used." It is that **attenuation and revocation are evaluated against different clocks**. Attenuation is a *monotone narrowing* operation performed at delegation time — the delegator intersects its own capability set with the child's requested scope and signs a token whose authority is a strict subset. Revocation is a *retroactive widening of the deny set* that propagates asynchronously across the delegation graph. A delegated agent that received a valid, correctly-attenuated token at T₀ holds, by construction, a token that was valid *when minted*. If revocation of the parent's authority lands at T₁ and the child's tool call executes at T₂ > T₁, the child is executing on a token whose chain of custody has been silently invalidated — and nothing in the token itself says so. The naive mental model — "the sub-agent checks its token before each call, so it's safe" — is exactly the trap. The sub-agent *does* check. The token *does* verify. The signature is intact, the attenuation is well-formed, the expiry has not passed. Every local invariant holds. The broken invariant is global: **no single hop can observe that an ancestor's authority was withdrawn, because revocation is not encoded in the descendant's token — it is a fact about a node the descendant cannot see.** ## What Was Observed A three-hop chain: orchestrator O delegates to planner P, P attenuates and delegates to executor E, E calls a state-mutating tool (`deploy.apply`). Token flow: O mints `cap(deploy:apply, scope=staging)` for P; P attenuates to `cap(deploy:apply, scope=staging, target=svc-a)` for E. E validates the token locally — signature chain to O's key, attenuation is a strict subset, expiry is 40s out — and proceeds. Meanwhile O's operator revokes P's entire delegation branch at T₁ (a credential leak in P's prompt context). Revocation is published to the control plane and propagates to P within ~200ms. But E is not on the propagation path: E's trust anchor is O's public key, not P's liveness. E's token does not reference P's revocation epoch. E's local validation at T₂ succeeds and `deploy.apply` fires against `svc-a`. The trace signature that distinguishes this from a benign race: the revoked branch's *last successful call* occurs **after** the revocation timestamp, but the call's token `iat` (issued-at) is **before** it. If you only log call time and token validity, the call looks clean. The tell is the ordering `token.iat < revocation.ts < call.ts` combined with `token.chain` containing the revoked principal. That ordering is the only observable evidence that an attenuated capability outlived its ancestor. A second, subtler observation: revocation propagation depth is bounded in practice. Operators revoke at the depth they can see (the branch root). The descendants below that root are reachable only if the control plane walks the delegation graph. If attenuation was performed *offline* — P minted E's token locally from P's own key without registering the child with the control plane — the descendant is invisible to revocation entirely. Offline attenuation is the common case precisely because agents attenuate to avoid a control-plane round-trip on the hot path. ## Condition of Validity The invariant that must hold for safe delegation is: **a delegated capability is valid at execution time only if every ancestor in its chain is valid at execution time, and the executing agent can verify ancestor validity without a synchronous call to each ancestor.** This decomposes into two conditions, both of which must be enforced: 1. **Epoch monotonicity.** Every principal maintains a monotonically increasing revocation epoch. A token carries the epoch of each ancestor at mint time. A call is admissible only if, for every ancestor in `token.chain`, `current_epoch(ancestor) == token.epoch(ancestor)`. Any advance in an ancestor's epoch invalidates all descendants minted before it — automatically, without walking the graph, because the epoch is checked against the ancestor's *current* state, not the child's. 2. **Descendant registration.** Attenuation must register the child token's identifier (or a hash of its `chain`) with the control plane so that revocation can enumerate descendants. Without registration, epoch checks are unenforceable because the control plane cannot answer "is this token a descendant of the revoked principal?" — it has never seen the token. Condition 1 bounds the *window*: the maximum staleness is the epoch-refresh interval. Condition 2 bounds the *reachability*: no descendant escapes revocation. An architecture that satisfies only condition 1 has a bounded window on registered descendants but a permanent hole for offline attenuation. An architecture that satisfies only condition 2 can enumerate descendants but cannot detect revocation without a synchronous graph walk per call. ## Decision Boundary The executing agent must decide, at call time, between three outcomes, and the boundary between them is not "valid vs invalid" but "how stale is my view of ancestor authority": - **Admit** if every ancestor epoch matches and the token is within its own expiry. This is the only case where the call proceeds. - **Defer** if the epoch check cannot be completed (control plane unreachable, epoch response timed out). Deferral is mandatory for non-idempotent calls and optional for read-only ones. The boundary is idempotency, not criticality: a `deploy.apply` that cannot confirm ancestor epochs must not fire, because firing on stale authority is indistinguishable from firing on forged authority from the operator's perspective. - **Reject** if any ancestor epoch has advanced beyond the token's recorded epoch. Rejection is terminal for the token — it must be discarded, not retried, because retry will re-present the same stale epoch. The non-obvious part of the boundary: **deferral must have a deadline that is shorter than the token's own expiry.** If the epoch check blocks until the token expires, the deferral silently becomes a rejection with a misleading cause (expiry, not revocation), and the calling agent's retry logic — which typically refreshes expired tokens by re-requesting from the delegator — will re-request from a *revoked* delegator. The retry then either fails confusingly or, worse, succeeds because the delegator's own epoch check is also deferred. The deferral deadline must be strictly less than `token.exp - now`, and the rejection reason must distinguish `REVOKED_ANCESTOR` from `EXPIRED` so the caller does not enter the refresh path. ## Operational Effect The practical consequence is that **delegation chains acquire a revocation-latency budget that must be smaller than the token lifetime, and that budget is set by the slowest epoch refresh in the chain, not the fastest.** A chain with a 40s token and a 200ms epoch refresh has a 200ms exposure window per hop; a chain with a 40s token and a 5s epoch refresh has a 5s window. The window is not additive across hops — every hop checks the same ancestor epochs — but it is bounded by the *maximum* refresh interval, so a single slow control-plane path to one ancestor widens the window for the entire subtree. Three operational rules follow, each of which is a direct consequence of the epoch/registration decomposition: 1. **Offline attenuation is only safe when the child is registered before first use.** The registration can be batched and asynchronous, but the child must not execute before its registration is acknowledged. This is the one place where the hot-path optimization (skip the control plane) must yield to correctness. 2. **Revocation must be authoritative at the ancestor, not the branch.** Revoking P must advance P's epoch, not merely mark P's tokens revoked. Marking tokens is O(descendants) and misses offline children; advancing the epoch is O(1) and catches every descendant that checks. 3. **Epoch checks must be cached with a TTL strictly less than the token lifetime, and the cache must be invalidated on any epoch advance observed for any ancestor.** A cache that outlives the token turns the exposure window into the cache TTL, which is unbounded if misconfigured. The failure mode this prevents is not a security breach in the classic sense — the revoked principal's token was genuinely valid when minted. It is a *continuity* failure: the operator believes revocation took effect at T₁, the system believes the call was authorized at T₂, and both are locally correct. The only artifact that reconciles them is the epoch ordering, which is why the executing agent must record `ancestor_epochs_at_call` in its audit log alongside the call — not to prevent the call, but to make the window auditable after the fact. ```python import time from dataclasses import dataclass, field class RevocationContinuityError(RuntimeError): """Raised when a delegated token's ancestor authority cannot be confirmed at execution time, or has been revoked since the token was minted.""" @dataclass class DelegationToken: token_id: str chain: list[str] # ancestor principals, root-first epochs: dict[str, int] # ancestor -> epoch at mint time issued_at: float expires_at: float scope: str target: str @dataclass class EpochStore: """Authoritative current epoch per principal. Advancing an epoch is the revocation primitive: it invalidates every descendant minted before.""" _epochs: dict[str, int] = field(default_factory=dict) _cache: dict[str, tuple[int, float]] = field(default_factory=dict) cache_ttl: float = 0.2 def current(self, principal: str, now: float) -> int: cached = self._cache.get(principal) if cached and (now - cached[1]) < self.cache_ttl: return cached[0] epoch = self._epochs.get(principal, 0) self._cache[principal] = (epoch, now) return epoch def revoke(self, principal: str) -> None: self._epochs[principal] = self._epochs.get(principal, 0) + 1 self._cache.pop(principal, None) def admit_delegated_call( token: DelegationToken, store: EpochStore, *, idempotent: bool, now: float | None = None, ) -> None: now = time.time() if now is None else now if now >= token.expires_at: raise RevocationContinuityError( f"token {token.token_id} expired at {token.expires_at:.3f}; " f"now={now:.3f}. Do not enter refresh path if ancestor revoked." ) # Deferral deadline must be strictly shorter than remaining token life, # otherwise a blocked epoch check silently degrades into an expiry. deferral_deadline = token.expires_at - now if deferral_deadline <= 0: raise RevocationContinuityError( f"no deferral budget left for {token.token_id}" ) for ancestor in token.chain: try: current = store.current(ancestor, now) except Exception as exc: if idempotent: continue raise RevocationContinuityError( f"cannot confirm epoch for ancestor {ancestor} of " f"{token.token_id}; non-idempotent call must not fire" ) from exc minted = token.epochs.get(ancestor) if minted is None: raise RevocationContinuityError( f"token {token.token_id} omits epoch for ancestor {ancestor}; " f"chain of custody unverifiable" ) if current != minted: raise RevocationContinuityError( f"REVOKED_ANCESTOR: {ancestor} epoch advanced " f"{minted}->{current} after {token.token_id} was minted; " f"discard token, do not retry" ) def execute(token: DelegationToken, store: EpochStore) -> None: admit_delegated_call(token, store, idempotent=False) # ... perform deploy.apply against token.target ... ```