# Which invariants prevent delegated agent credentials from outliving their revocation epoch under AAIF chained delegation **Date of Record:** 2026 November 25 **Scope:** Applies to AAIF (Agent Authorization and Identity Framework) credential chains where an agent delegates a scoped warrant to a sub-agent and the sub-agent continues executing tool calls after the root issuer revokes the parent warrant. Does not apply to single-hop, non-delegated credentials or to stateless bearer tokens with no delegation chain. ## Core Distinction A revocation in AAIF is a statement about a *credential lineage*, not about a *process*. The failure mode examined here is not "the revoked agent keeps running" — that is a lifecycle problem solved by process kill. The failure is subtler: a **downstream delegate holds a structurally valid warrant whose parent was revoked mid-execution**, and the delegate's local verification passes because it validates the signature chain and the embedded `not_after` timestamp, but never re-resolves the *revocation epoch* of its ancestors. The credential is cryptographically sound, temporally unexpired, and semantically dead. The delegate cannot tell the difference between "my parent is still authorized" and "my parent was revoked 400ms ago and the revocation has not propagated to my cached trust root." The invariant that bounds this is **epoch monotonicity across the chain**: every hop must carry a `revocation_epoch` that is ≥ the epoch observed at issuance of its parent, and every tool call must reject a warrant whose recorded parent epoch is strictly less than the epoch currently published by the root authority. Without this, revocation is advisory rather than authoritative for any delegate more than one hop from the issuer. ## What Was Observed A three-hop delegation chain: orchestrator `O` issues warrant `W1` to planner `P` with scope `{tool: search, fs: read:/tmp/work}` and `revocation_epoch: 41`. `P` delegates `W2` to executor `E` with a narrowed scope `{tool: search}` and copies `revocation_epoch: 41` forward. `E` begins a long-running tool loop against an MCP search server, caching the verified chain in its local trust store at hop-0 resolution time `t0`. At `t0 + 12s`, `O` detects that `P` has been prompt-injected through a retrieved document and revokes `W1`, incrementing the root epoch to `42`. The revocation record is published to the AAIF revocation endpoint within 200ms. `E` does not observe this. Its trust store caches the chain with `validated_at: t0` and a TTL of 60s. On each tool call, `E` re-verifies the *signatures* in the cached chain (cheap, local) but re-resolves the *revocation epoch* only when the TTL expires. Between `t0 + 12s` and `t0 + 60s`, `E` executes 34 additional tool calls under a warrant whose ancestor is revoked. Each call logs `authorization: valid` because the local check is `signature_ok AND now < not_after AND cached_epoch == cached_epoch`. The last clause is a tautology — it compares the cached epoch to itself. The window is not a bug in signature verification. It is the **structural gap between credential validity (a property of the artifact) and authorization validity (a property of the lineage at the current epoch)**. Any delegate that treats a cached chain as a standing grant will execute revoked work for the duration of its cache TTL. ## Condition of Validity The epoch-monotonicity invariant holds only when all three of the following are true: 1. **Epoch is carried, not inferred.** Each warrant in the chain embeds the `revocation_epoch` of its immediate parent *at issuance time*, signed by the parent. A delegate that reconstructs the epoch from a timestamp or a nonce cannot detect a revocation that occurred after its parent signed but before it was revoked. 2. **Re-resolution is mandatory per call, not per session.** The delegate must query the root revocation endpoint (or a push channel with a monotonic sequence number) on every tool invocation, or hold a subscription whose last-delivered sequence is compared against the warrant's parent epoch. TTL-bounded caching violates the invariant because the cache window is exactly the revocation-propagation window. 3. **Revocation is transitive by construction.** Revoking `W1` must invalidate `W2` without `O` needing to enumerate descendants. This requires that `W2`'s validity predicate reference `W1`'s epoch, not merely `W1`'s signature. If `W2` was issued with an independent epoch namespace, transitivity fails and `E` continues under a warrant that is locally consistent but ancestrally revoked. If any condition is violated, the invariant degrades to "revocation is eventually consistent with a bounded-but-nonzero lag equal to the deepest cache TTL in the chain" — which is not a security property, it is a hope. ## Decision Boundary The boundary between safe and unsafe delegation is the **epoch comparison operator at the leaf**: - **Safe:** `reject if warrant.parent_epoch < current_root_epoch`. The leaf re-resolves the root epoch per call and compares strictly. A revocation at epoch 42 causes every warrant stamped with parent epoch 41 to fail closed on the next call. - **Unsafe:** `reject if warrant.parent_epoch != warrant.recorded_epoch` or any comparison that does not reference the *live* root epoch. These pass because the warrant is internally consistent — the failure is that internal consistency is not the same as external validity. The boundary is sharp because the two predicates agree on every input except the one that matters: a warrant whose parent was revoked after issuance. On that input, the safe predicate rejects and the unsafe predicate accepts. There is no gradient between them; the delegate either consults the live epoch or it does not. A second boundary applies to **revocation under concurrent delegation**. If `P` issues `W2` at the same instant `O` revokes `W1`, the ordering of the two events determines whether `W2` is born-dead or born-live. The invariant requires that `W2`'s issuance read the root epoch *after* acquiring a read lock that serializes against revocation writes, so `W2` either carries epoch 41 (and is rejected on first use after revocation) or is refused issuance entirely. Without the lock, `W2` can be stamped with epoch 41 while the revocation to 42 is in flight, producing a warrant that is valid for exactly one call — the call that races the revocation. ## Operational Effect The practical consequence is that **delegation depth is a revocation-latency multiplier**. A two-hop chain with per-call re-resolution has revocation latency equal to one round-trip to the root endpoint. A three-hop chain with session-cached trust has latency equal to the deepest TTL, which in observed deployments ranged from 30s to 300s. During that window, the revoked sub-agent's tool calls are indistinguishable in the audit log from authorized calls, because they *are* authorized under the cached predicate. Post-hoc forensics cannot separate them without replaying the epoch timeline. The guardrail is to make the epoch a first-class field in every warrant, propagate it through every hop, and require the leaf to compare against the live root epoch on every call — accepting the per-call round-trip cost as the price of revocation being authoritative rather than advisory. Where round-trip cost is prohibitive, a push subscription with a monotonic sequence number and a hard fail-closed on sequence gap is the only acceptable substitute; TTL caching is not. ```python class RevocationEpochViolation(RuntimeError): """Raised when a delegated warrant's parent epoch is stale relative to the live root epoch.""" pass def verify_warrant_at_call( warrant: dict, live_root_epoch: int, revocation_subscription_seq: int, ) -> None: """ Enforce epoch monotonicity across the delegation chain at every tool call. warrant keys: - parent_epoch: revocation epoch of the immediate parent at issuance - recorded_epoch: epoch the issuer believed current when signing - chain: list of ancestor warrant ids (for audit) - not_after: absolute expiry """ if warrant["parent_epoch"] < live_root_epoch: raise RevocationEpochViolation( f"warrant {warrant.get('id')} carries parent_epoch=" f"{warrant['parent_epoch']} but live root epoch is {live_root_epoch}; " f"ancestor revoked, chain={warrant.get('chain')}" ) if revocation_subscription_seq < warrant["parent_epoch"]: raise RevocationEpochViolation( f"revocation subscription lagging: seq={revocation_subscription_seq} " f"< required parent_epoch={warrant['parent_epoch']}; " f"cannot prove ancestor still authorized" ) # Signature and expiry checks omitted; they are necessary but not sufficient. if warrant["parent_epoch"] != warrant["recorded_epoch"]: raise RevocationEpochViolation( f"epoch drift between parent ({warrant['parent_epoch']}) and " f"recorded ({warrant['recorded_epoch']}); issuance raced a revocation" ) ```