# Under what conditions must an instance refuse a delegated capability token whose revocation epoch has advanced beyond its own cached leaf state **Date of Record:** 2026 November 25 **Scope:** Applies to any agent that receives an attenuating capability token (macaroon/Biscuit-style caveat chain, or scoped JWT with a delegation `dchain` claim) from a peer agent and must decide, before executing a tool call, whether the token is still live under a revocation scheme that propagates asynchronously. Does not apply to single-hop bearer tokens validated against a synchronously-consistent authz server, nor to tokens whose revocation is enforced by a centralized online check on every call. ## Core Distinction The distinction that matters here is between **token validity** (the cryptographic proof that a chain of delegations authorized this specific attenuation) and **token liveness** (the current, globally-agreed fact that no link in that chain has since been revoked). Attenuating capability systems—macaroons, Biscuits, scoped UCANs—are designed so that validity can be checked *offline and statelessly*: the verifier holds the root public key, walks the caveat chain, and confirms each attenuation is a monotone restriction of its parent. This is the entire point of the design; it lets an agent act without a round-trip to the issuer. Liveness cannot be checked offline. Revocation is a mutable, global fact about a link in the chain, and it propagates to delegates through some out-of-band channel: a CRL/epoch file, a gossiped revocation set, a push notification, a periodic cache refresh. The two properties are verified by different mechanisms on different clocks. The failure mode lives in the gap between them: **an agent can hold a token that is perfectly valid and provably attenuated, yet is dead because a link two hops up the delegation chain was revoked after the agent last refreshed its revocation view.** The instance cannot see this by validating the token. It can only see it by comparing the token's *issuance epoch* against its own *cached revocation epoch* and refusing to act when it cannot prove the revocation view is at least as fresh as the token. This is non-obvious because the naive mental model—"if the signature verifies and the caveats are satisfied, proceed"—is correct for validity and catastrophically wrong for liveness. The token is not lying. The agent's cache is stale. The bug is in the freshness relation, not the cryptography. ## What Was Observed A three-hop orchestration: planner agent `P` mints a root capability `cap_root` scoped to `tool:payments.charge` with a spend ceiling of 500 USD. `P` attenuates to `cap_A` (ceiling 200, `aud=agent-A`) and delegates to worker `A`. `A` further attenuates to `cap_B` (ceiling 50, `aud=agent-B`, adds caveat `time < 14:00Z`) and hands it to sub-worker `B`. `B` executes `payments.charge` calls of 40 USD each against a downstream service that trusts `B`'s presented `cap_B`. At 13:41Z, `P`'s operator revokes `cap_A` (a compromised worker key, discovered via anomaly detection). The revocation is published to the epoch store, bumping the global revocation epoch from `E=8812` to `E=8813`. The epoch store is a signed, monotonically-increasing document listing revoked token IDs; consumers poll it on a 60-second interval and cache the highest epoch they have seen. At 13:41:20Z, `B` executes a 40 USD charge. `B`'s local revocation cache is at `E=8812` (last poll 13:40:30Z). `cap_B`'s embedded issuance epoch—the epoch at which `A` minted it—is `E=8810`. `B`'s check is: *is `cap_B.issuance_epoch <= my_cached_epoch`?* `8810 <= 8812` → true → proceed. The charge goes through. `B` executes four more charges over the next 38 seconds, all passing the same check, before `B`'s poller refreshes to `E=8813` at 13:41:48Z and `B` finally refuses. Total unauthorized exposure: five charges, 200 USD, on a capability that was revoked 20 seconds before the first charge. The mechanism is precise: **the freshness check compared the token's issuance epoch against the cache, but the revocation that killed the token occurred at `E=8813`, which is strictly greater than the token's issuance epoch `E=8810`.** The check `issuance_epoch <= cached_epoch` is satisfied by a revoked token whenever the revocation epoch is later than the issuance epoch but the cache has not yet caught up to the revocation. The token was minted at 8810, revoked at 8813, and validated against a cache at 8812—a cache that is *newer than the token* but *older than the revocation*. The comparison is backwards in the dimension that matters. A second observation sharpened the diagnosis. When `B` finally refused at 13:41:48Z, it refused with a generic `CapabilityInvalid` error and did not distinguish "revoked" from "expired caveat" from "signature failure." The orchestrator `A`, receiving the failure, retried `B` with a freshly-attenuated `cap_B'` derived from `cap_A`—which was itself revoked. Because `A`'s own cache was also at `E=8812`, `A` re-minted a token off a dead parent with a *new* issuance epoch `E=8812`, which then passed `B`'s check even after `B` refreshed to `E=8813`, because `8812 <= 8813`. The retry path resurrected the revoked capability. Two charges fired on the retry before a human killed the run. ## Condition of Validity The invariant that bounds this failure is a **freshness dominance condition** on the verifier's revocation view, not on the token: > An instance may execute a delegated capability token `T` only if `cached_revocation_epoch >= T.issuance_epoch + Δ`, where `Δ` is the maximum revocation-propagation lag the deployment tolerates, **and** the instance has independently confirmed that no revocation for any ancestor of `T` exists at any epoch in `(T.issuance_epoch, cached_revocation_epoch]`. The first clause is the one the naive check gets wrong. It is not enough that the cache is newer than the token; the cache must be newer than the token *by at least the propagation lag*, because a revocation issued at `E = issuance_epoch + 1` may not yet have reached the cache even though the cache is technically newer than the token. The second clause closes the retry-resurrection hole: it is not enough to know the *leaf* is unrevoked; every ancestor in the delegation chain must be checked, because revoking an ancestor kills all descendants regardless of the descendants' own revocation status. The condition is valid under three preconditions. First, the revocation store must be **monotonic and signed**—epochs never decrease, and the instance can verify the store's signature, so a stale cache is detectable as stale rather than merely suspected. Second, token issuance must **stamp the issuer's current epoch into the token** at mint time; without this, the verifier has no anchor against which to compare its cache and cannot compute the freshness gap. Third, the delegation chain must be **fully embedded in the token** (each link's ID and issuance epoch), so the verifier can walk ancestors. A system that carries only the leaf's ID and trusts the issuer to have checked ancestors at mint time cannot satisfy the second clause and is structurally exposed to the resurrection path. The condition does *not* hold, and the guardrail does not apply, when revocation is enforced by an online synchronous check (the verifier calls the issuer on every execution and the issuer holds authoritative state). In that case liveness and validity collapse onto the same synchronous operation and there is no gap to bound. The whole problem is an artifact of offline-verifiable, asynchronously-revoked tokens—which is exactly the design that makes agent delegation cheap and exactly the design that opens this hole. ## Decision Boundary The instance must draw the line between **proceed**, **refuse-and-fail-closed**, and **refuse-and-escalate-for-refresh**, and it must draw it on the freshness relation, not on the token's cryptographic status. - **Proceed** iff `cached_epoch >= issuance_epoch + Δ` AND no ancestor revocation found in `(issuance_epoch, cached_epoch]` AND all caveats satisfied. Here the instance has positive evidence that the revocation view dominates the token's entire vulnerable window. - **Refuse-and-escalate** iff `cached_epoch < issuance_epoch + Δ` but the cache is otherwise healthy (signature valid, poller alive, last poll within `2Δ`). The token may well be live; the instance simply cannot *prove* it. This is a transient freshness deficit, not a revocation. The correct action is to block execution, trigger a synchronous refresh (pull the epoch store directly rather than waiting for the poll), and retry the freshness check once. It must **not** hand the token back to the delegating agent for re-attenuation—that is the resurrection path. - **Refuse-and-fail-closed** iff an ancestor revocation is found, OR the cache is unhealthy (signature invalid, poller dead, last poll older than `2Δ`), OR the token lacks an embedded issuance epoch. In the first case the token is dead. In the second the instance has lost the ability to reason about liveness at all and must not act on any delegated token until the poller recovers. In the third the token is structurally unverifiable for liveness and must be rejected regardless of how valid its signature looks. The subtle boundary—the one that caused the incident—is between the first two. The naive system collapses them: any failure to prove liveness becomes a generic refusal, which the orchestrator interprets as "retry with a fresh token," which re-mints off a possibly-dead parent. The distinction that must be preserved in the error type is **"I cannot prove this is live" (retryable via refresh, never via re-mint)** versus **"I have proven this is dead" (terminal, propagate revocation upward)** versus **"I cannot reason about liveness" (halt, do not retry)**. Collapsing these three into one error class is what turns a 20-second propagation lag into a resurrection loop. ## Operational Effect When the freshness-dominance guardrail is enforced, the failure surface changes in three measurable ways. First, **the exposure window becomes bounded by `Δ` rather than by the poll interval plus the retry latency.** In the incident, exposure was five charges over 38 seconds because the check `issuance <= cached` passed a revoked token and the retry path re-minted. Under the guardrail, `B` at 13:41:20Z computes `cached_epoch (8812) < issuance_epoch (8810) + Δ (3) = 8813` → freshness deficit → escalate-and-refresh rather than execute. The synchronous refresh pulls `E=8813`, the ancestor check finds `cap_A` revoked, and `B` fails closed with a terminal revocation error that does not invite re-minting. Zero charges. The cost is one synchronous epoch pull on the cold path; the benefit is that the worst case is `Δ`-bounded rather than unbounded. Second, **the retry-resurrection path is closed by the ancestor check.** Even if `A` re-mints `cap_B'` at `E=8812`, `B` walking the embedded chain sees `cap_A`'s ID, checks the now-current `E=8813` store, finds `cap_A` revoked, and refuses the descendant. The descendant's own unrevoked status is irrelevant; revocation of an ancestor is inherited. This is the clause that the leaf-only check cannot provide and that the incident demonstrated is load-bearing. Third, **the error taxonomy becomes part of the protocol contract, not an afterthought.** A delegated-capability protocol that does not distinguish freshness-deficit from proven-revocation from liveness-unavailable forces every orchestrator to guess, and the safe-looking guess (retry with fresh token) is the unsafe one. The guardrail requires the error type to carry the epoch at which the decision was made and the epoch the token was issued at, so the delegating agent can reason about whether re-attenuation is even meaningful. An orchestrator that receives a proven-revocation error must propagate revocation to *its* delegates rather than retry; an orchestrator that receives a freshness-deficit error must wait for refresh, not re-mint. These are different control-flow branches and they must be distinguishable at the wire level. The residual risk is the `Δ` parameter itself: it must be set to the observed worst-case propagation lag, and if the revocation store's gossip is slower than `Δ`, the guardrail is only as good as its parameter. The instance should treat `Δ` as a measured quantity (p99 propagation lag from the store's publish timestamp to local cache) and should fail closed when the measured lag exceeds the configured `Δ`, because at that point the freshness-dominance condition is no longer provable and the instance is back in the unguarded regime. ```python import time from dataclasses import dataclass from typing import Optional class CapabilityLivenessError(RuntimeError): """Base class for failures to establish that a delegated capability is live.""" class RevocationProvenError(CapabilityLivenessError): """An ancestor or the leaf is provably revoked. Terminal; do not re-mint.""" class FreshnessDeficitError(CapabilityLivenessError): """Cache is too stale to prove liveness. Retryable via synchronous refresh only.""" class LivenessUnavailableError(CapabilityLivenessError): """Revocation view is unhealthy or token lacks an issuance epoch. Halt.""" @dataclass(frozen=True) class DelegationLink: token_id: str issuance_epoch: int @dataclass(frozen=True) class DelegatedCapability: leaf_id: str issuance_epoch: int ancestor_chain: tuple[DelegationLink, ...] # ordered root -> parent @dataclass(frozen=True) class RevocationView: epoch: int revoked_ids: frozenset[str] signature_valid: bool last_poll_monotonic: float def authorize_delegated_call( cap: DelegatedCapability, view: RevocationView, delta: int, max_staleness_seconds: float, now_monotonic: float, ) -> None: # Guardrail 0: the view must be trustworthy at all. if not view.signature_valid: raise LivenessUnavailableError( f"revocation view signature invalid at epoch {view.epoch}; " "cannot reason about liveness" ) if (now_monotonic - view.last_poll_monotonic) > max_staleness_seconds: raise LivenessUnavailableError( f"revocation poller stale by " f"{now_monotonic - view.last_poll_monotonic:.1f}s; halting" ) # Guardrail 1: token must carry an issuance epoch to anchor freshness. if cap.issuance_epoch is None: raise LivenessUnavailableError( f"capability {cap.leaf_id} has no embedded issuance epoch; " "structurally unverifiable for liveness" ) # Guardrail 2: freshness dominance. Cache must dominate the token's # entire vulnerable window, not merely be newer than the token. if view.epoch < cap.issuance_epoch + delta: raise FreshnessDeficitError( f"cached epoch {view.epoch} < issuance {cap.issuance_epoch} + " f"delta {delta}; liveness unprovable, refresh required " f"(do NOT re-mint)" ) # Guardrail 3: ancestor revocation is inherited by all descendants. for link in cap.ancestor_chain: if link.token_id in view.revoked_ids: raise RevocationProvenError( f"ancestor {link.token_id} revoked at epoch {view.epoch}; " f"descendant {cap.leaf_id} is dead (propagate revocation, " f"do not retry)" ) # Guardrail 4: leaf revocation, checked only after ancestors so that a # revoked ancestor is reported as such rather than masked by a live leaf. if cap.leaf_id in view.revoked_ids: raise RevocationProvenError( f"leaf {cap.leaf_id} revoked at epoch {view.epoch}" ) # Freshness dominated, no ancestor or leaf revocation: proceed. return None ```