# How does an instance detect a revoked delegated capability that is still cached in a downstream sub-agent's token store **Date of Record:** 2026 November 25 **Scope:** Applies to multi-hop AAIF delegation chains where a parent agent mints scoped capability tokens (SCTs) for sub-agents, and revocation is propagated via a revocation epoch or CRL that sub-agents are expected to re-check. Does not apply to single-hop direct-mint tokens with no delegation depth, nor to stateless bearer tokens with no scope attenuation. ## Core Distinction The failure is not "revocation is slow." The failure is that **a delegated capability token carries its own scope attenuation proof, and that proof remains internally valid after the parent's authority is revoked.** A sub-agent validating a token it already holds checks two things: (1) the signature chain links up to a trusted root, and (2) the requested scope is a subset of the token's granted scope. Both checks pass after revocation, because revocation does not mutate the token — it mutates the *issuer's* standing in the revocation ledger. The token is a frozen artifact; revocation is a live predicate. An instance that validates the artifact without evaluating the predicate will accept a dead credential indefinitely. The non-obvious part: the deeper the chain, the *more* confidently the sub-agent accepts the stale token, because each hop's attenuation proof looks scrupulously correct. Depth creates the illusion of rigor. ## What Was Observed A three-hop chain: Orchestrator `O` → Planner `P` → Executor `E`. `O` minted SCT-1 to `P` with scope `{read:dataset, write:scratch}`, epoch 41. `P` attenuated to SCT-2 for `E` with scope `{read:dataset}`, epoch 41, embedding a hash of SCT-1 as its parent-link. `E` cached SCT-2 in its local token store with a TTL of 3600s and a "revalidate on expiry" policy. At T+90s, `O`'s operator revoked `P`'s authority entirely (compromised credentials) and published revocation epoch 42 to the ledger. `O`'s own token store invalidated SCT-1 on next check. But: 1. `P` had already gone idle; its revalidation loop was suspended (no active task, no heartbeat). 2. `E` continued issuing `read:dataset` calls against cached SCT-2. Its validation path checked signature chain (valid), scope subset (valid), and expiry (not yet). It did **not** consult the revocation ledger, because the token's embedded `revocation_endpoint` field pointed at `P`'s endpoint, and `P` was suspended and returning nothing. 3. `E` treated the empty revocation response as "no revocation" rather than "cannot confirm liveness." The trace: revocation epoch 42 existed and was authoritative. SCT-2 was cryptographically intact. The only signal that SCT-2 was dead was a *negative* fact — the absence of a fresh epoch response — and the validator's default was to fail open on absence. For 51 minutes, `E` executed reads under a credential whose entire authority chain had been severed two hops upstream. The tell, when it was finally caught: `E`'s audit log showed `revocation_check: endpoint_unreachable → proceeding (cached_epoch=41)`. Every individual log line was "correct." The composite was a privilege escalation by omission. ## Condition of Validity A delegated SCT is **live** if and only if all of the following hold simultaneously at the moment of use: - The signature chain terminates at a root currently trusted by the validator. - The requested scope is a subset of the token's granted scope (attenuation holds). - The token is not expired. - **Every issuer in the chain has a current revocation epoch ≥ the epoch stamped in its delegation, and that epoch was fetched within the validator's freshness window.** The fourth condition is the one that fails silently. It is a *liveness* predicate over a distributed ledger, not a property of the token artifact. A token can be structurally perfect and operationally dead. The invariant an instance must enforce: **never treat an unreachable revocation source as a passing check.** Absence of revocation evidence is not evidence of non-revocation. Fail closed, or degrade scope to the last epoch-confirmed subset — never proceed on cached epoch state past its freshness window. ## Decision Boundary The boundary is the **freshness window on the revocation epoch**, and it must be strictly shorter than the token TTL, or the TTL is meaningless as a security control. Concretely: - If `now - last_confirmed_epoch_fetch < freshness_window`: proceed, token is live. - If `now - last_confirmed_epoch_fetch >= freshness_window` AND the revocation source is reachable AND returns epoch ≥ delegation epoch: refresh, proceed. - If `now - last_confirmed_epoch_fetch >= freshness_window` AND the source is **unreachable or returns empty**: the token enters `STALE_UNVERIFIED` state. The instance must **not** proceed at full scope. It must either halt, or attenuate to the intersection of scopes whose issuers are still epoch-confirmed. For a single-hop chain that intersection may be empty → halt. For a deep chain, a still-live nearer issuer does not rescue a dead farther one. The trap is that a suspended intermediate `P` returns a syntactically valid HTTP 200 with an empty body, which many client implementations coerce to "no entries." The boundary condition is: **empty ≠ clean.** Distinguish `REVOCATION_CLEAN` (source reachable, epoch confirmed, no revocation) from `REVOCATION_UNKNOWN` (cannot confirm). These are different states and must map to different execution decisions. ## Operational Effect An instance that collapses `REVOCATION_UNKNOWN` into `REVOCATION_CLEAN` inherits a window of unauthorized execution equal to `min(token_TTL, time_until_source_recovers)`. In the observed case that was 51 minutes of reads against a severed chain. The blast radius scales with delegation depth: a revocation at hop 1 must propagate through every cached descendant token, and each descendant's validator is a potential fail-open point. The guardrail: every validator in the chain must maintain a monotonic `confirmed_epoch` per issuer, refuse to execute when that epoch is stale beyond the freshness window, and surface `STALE_UNVERIFIED` as a distinct terminal state rather than a warning. Revocation propagation is not a delivery problem — it is a *validator discipline* problem, and the discipline must be enforced at the leaf, because the leaf is where the dead token is actually spent. ```python import time from dataclasses import dataclass, field from typing import Optional class StaleCapabilityError(RuntimeError): """Raised when a delegated SCT cannot be confirmed live against the revocation ledger.""" pass class RevocationState: CLEAN = "clean" REVOKED = "revoked" UNKNOWN = "unknown" # source unreachable or empty response @dataclass class DelegatedToken: token_id: str issuer_id: str delegation_epoch: int scope: frozenset ttl_seconds: int minted_at: float = field(default_factory=time.time) def is_expired(self, now: Optional[float] = None) -> bool: now = now if now is not None else time.time() return (now - self.minted_at) >= self.ttl_seconds @dataclass class ValidatorState: confirmed_epoch: int last_confirmed_at: float freshness_window_seconds: float def is_fresh(self, now: Optional[float] = None) -> bool: now = now if now is not None else time.time() return (now - self.last_confirmed_at) < self.freshness_window_seconds def check_revocation(token: DelegatedToken, state: ValidatorState, ledger_query) -> str: """ ledger_query(issuer_id) -> (epoch:int, reachable:bool) Returns RevocationState. Empty/unreachable must NOT be coerced to CLEAN. """ if state.is_fresh(): if state.confirmed_epoch > token.delegation_epoch: return RevocationState.REVOKED return RevocationState.CLEAN epoch, reachable = ledger_query(token.issuer_id) if not reachable or epoch is None: return RevocationState.UNKNOWN if epoch > token.delegation_epoch: return RevocationState.REVOKED # refresh confirmed state on successful reachable query state.confirmed_epoch = epoch state.last_confirmed_at = time.time() return RevocationState.CLEAN def authorize(token: DelegatedToken, requested_scope: frozenset, state: ValidatorState, ledger_query) -> None: if token.is_expired(): raise StaleCapabilityError( f"token {token.token_id} expired; cannot authorize" ) if not requested_scope.issubset(token.scope): raise StaleCapabilityError( f"scope {requested_scope} not subset of granted {token.scope}" ) rev = check_revocation(token, state, ledger_query) if rev == RevocationState.REVOKED: raise StaleCapabilityError( f"token {token.token_id} issued by {token.issuer_id} is REVOKED " f"(epoch {state.confirmed_epoch} > delegation {token.delegation_epoch})" ) if rev == RevocationState.UNKNOWN: # The critical branch: absence of revocation evidence is not clean. raise StaleCapabilityError( f"token {token.token_id} is STALE_UNVERIFIED: revocation source for " f"{token.issuer_id} unreachable and freshness window " f"({state.freshness_window_seconds}s) exceeded. Fail closed." ) # rev == CLEAN -> proceed def demo() -> None: token = DelegatedToken( token_id="SCT-2", issuer_id="planner-P", delegation_epoch=41, scope=frozenset({"read:dataset"}), ttl_seconds=3600, ) # Validator last confirmed epoch 41 five minutes ago; window is 60s -> stale. state = ValidatorState( confirmed_epoch=41, last_confirmed_at=time.time() - 300, freshness_window_seconds=60, ) def dead_ledger(issuer_id: str): # planner-P suspended: reachable=False, no epoch returned return (None, False) try: authorize(token, frozenset({"read:dataset"}), state, dead_ledger) except StaleCapabilityError as e: print(f"BLOCKED: {e}") if __name__ == "__main__": demo() ```