# How does an instance detect a rotated AAIF delegation credential that is still cryptographically valid but no longer semantically authorized mid-execution? **Date of Record:** 2026 November 28 **Scope:** Applies to AAIF-compliant agents that mint short-lived sub-agent credentials (ephemeral warrants) and delegate work across process or model boundaries. Does not apply to long-lived service identities or to static API-key auth where the credential lifetime exceeds the task lifetime. ## Core Distinction There are two independent notions of "valid credential" in an agent identity system, and they diverge precisely at rotation boundaries: 1. **Cryptographic validity** — the signature verifies against the issuer's public key, the `exp` claim is in the future, the `nbf` claim is in the past, and the audience matches. This is a pure predicate over bytes. 2. **Semantic authorization** — the warrant's *claims* (scopes, resource selectors, delegation depth, task binding) still describe the action the sub-agent is about to take *right now*, against the parent's current intent. Rotation breaks the coupling between these two. When a parent agent rotates its own signing key or re-mints a child warrant with narrowed scope, the *old* child credential remains cryptographically valid until its `exp`. A sub-agent holding that old credential will pass every signature check and every expiry check, yet its scope no longer matches the parent's revised intent. The failure is silent: no exception is thrown by the verifier, because the verifier was asked the wrong question. ## What Was Observed A parent orchestrator `P` minted an ephemeral sub-agent `S` with a warrant `W1` carrying `scope={read:repo, write:branch/feature-7}` and `exp = now + 300s`. At `t+40s`, `P` received an auditor signal that `feature-7` was compromised and re-minted `S`'s authorization as `W2` with `scope={read:repo}` only, publishing `W2` to the delegation registry and revoking `W1` by adding its `jti` to a revocation list. `S`, however, had already cached `W1` in its local credential store at cold-start and evaluated authorization *locally* against the cached token on each tool call. The revocation list was only consulted at credential *acquisition* time, not at *use* time. At `t+95s`, `S` issued a `write` to `branch/feature-7` using `W1`. The signature verified, `exp` had not passed, the audience matched — the write succeeded. The audit trail recorded a valid, unexpired, correctly-signed credential authorizing a write that the parent had explicitly withdrawn 55 seconds earlier. The observable signature of this class of failure is a **gap between revocation propagation and local credential caching**: the revocation event is authoritative at the issuer, but the verifier's decision function never re-reads it. The gap widens with credential lifetime and with the number of hops between issuer and verifier. ## Condition of Validity The invariant that must hold for safe rotation is: > For every authorization decision at time `t`, the credential used must satisfy `cryptographic_valid(token, t) AND not_revoked(token, t) AND scope_superset(token.scope, requested_action)` **evaluated at `t`**, not at acquisition time. Three conditions are jointly necessary: - **Freshness bound:** the maximum interval between revocation publication and the verifier's next authorization decision must be strictly less than the minimum remaining lifetime of any credential the verifier might hold. If `revocation_propagation_delay >= min_remaining_ttl`, a window exists in which a revoked credential is still accepted. - **Decision-time revalidation:** the verifier must re-check revocation and scope at *each* tool invocation, not only at credential load. Caching the *decision* is safe only if the cache TTL is shorter than the propagation delay. - **Task binding:** the warrant must bind to a specific task or intent hash, so that a re-minted warrant with narrowed scope is distinguishable from the old one even if both are signed by the same key and have overlapping `jti` spaces. When any of these fails, cryptographic validity no longer implies semantic authorization, and the system accepts withdrawn authority. ## Decision Boundary The boundary between "safe to proceed" and "must halt and re-acquire" is not the signature check. It is the **scope-and-revocation revalidation at decision time**. Concretely, an instance must halt and re-acquire when any of the following holds at the moment of a tool call: - The credential's `jti` appears in the revocation list *as of the current decision timestamp*, even if it was absent at load time. - The requested action's scope is not a subset of the credential's scope *as currently published*, not as cached. - The credential's `task_binding` hash does not match the current task's intent hash (indicating the parent re-minted with a different intent). - The elapsed time since the credential was loaded exceeds the configured `revalidation_interval`, which must be strictly less than the revocation propagation delay. The subtle case is the fourth: a verifier that revalidates revocation but caches the *scope* will still accept a write under a narrowed warrant, because the scope check passes against the stale scope. Both revocation *and* scope must be re-read together; revalidating one without the other leaves a semantic gap. ## Operational Effect The practical consequence is that ephemeral sub-agent credentials must be treated as **lease-like, not capability-like**: a lease is valid only while continuously renewed against the issuer's current state, whereas a capability is valid until expiry regardless of issuer intent. AAIF-style rotation assumes lease semantics; most agent implementations implement capability semantics because it is cheaper (no per-call round trip to the registry). The mismatch is the failure. Mitigations that bound the window: (a) set credential TTL to a small multiple of the revalidation interval, so a revoked credential's residual validity is short; (b) make the revocation check a mandatory, non-cacheable step in the tool-call path, or cache it with a TTL strictly below propagation delay; (c) bind warrants to task intent hashes so re-mints are distinguishable; (d) have the parent, on rotation, *actively* signal children to drop cached credentials rather than relying on pull-based revocation. The last is the only mechanism that closes the window to near-zero, because it does not depend on the child's revalidation cadence. ```python import time from dataclasses import dataclass class StaleWarrantError(RuntimeError): """Raised when a cryptographically valid warrant is no longer semantically authorized.""" pass @dataclass class Warrant: jti: str scope: frozenset task_binding: str exp: float signature_valid: bool class DelegationVerifier: def __init__(self, revocation_list, scope_registry, revalidation_interval, propagation_delay): self.revocation_list = revocation_list # jti -> revoked_at self.scope_registry = scope_registry # jti -> current scope self.revalidation_interval = revalidation_interval self.propagation_delay = propagation_delay if revalidation_interval >= propagation_delay: raise StaleWarrantError( "revalidation_interval must be strictly less than propagation_delay; " "otherwise a revoked credential can be accepted." ) def authorize(self, warrant: Warrant, action_scope: frozenset, task_binding: str, now: float) -> None: # Cryptographic checks pass — this is exactly the trap. if not warrant.signature_valid or now >= warrant.exp: raise StaleWarrantError("cryptographic validity failed; halt and re-acquire.") # Decision-time revocation revalidation, not load-time. revoked_at = self.revocation_list.get(warrant.jti) if revoked_at is not None and revoked_at <= now: raise StaleWarrantError( f"warrant {warrant.jti} revoked at {revoked_at}, decision at {now}; " "signature was valid but authority was withdrawn." ) # Decision-time scope revalidation against the registry, not the cached token. current_scope = self.scope_registry.get(warrant.jti, warrant.scope) if not action_scope.issubset(current_scope): raise StaleWarrantError( f"action {action_scope} not within current scope {current_scope} for {warrant.jti}; " "parent re-minted with narrowed authority." ) if warrant.task_binding != task_binding: raise StaleWarrantError( f"task binding mismatch: warrant bound to {warrant.task_binding}, " f"current task {task_binding}; parent intent changed." ) ```