# Why does an instance keep executing revoked tool calls after a federated AAIF revocation sweep? **Date of Record:** 2026 November 28 **Scope:** Applies to federated agent deployments where continuous authorization (per-tool-call policy checks) is enforced by a central Authority and cached/enforced by per-instance Policy Enforcement Points (PEPs). Does not apply to single-process agents that hold their own signing key and evaluate policy synchronously in-loop, nor to stateless tool gateways with no per-instance authorization cache. ## Core Distinction The failure is not "revocation was not issued." It is a **split between revocation propagation and in-flight authorization token validity**. In AAIF (Agent Authorization & Identity Federation), a per-tool-call authorization decision is materialized as a short-lived *warrant* — a signed capability token bound to `(agent_id, tool_name, args_hash, policy_version, expiry)`. The enforcing PEP validates the warrant locally and executes the tool. Revocation, by contrast, propagates as a *policy epoch bump*: the Authority increments `policy_epoch` and broadcasts. A PEP that has not yet observed the new epoch will happily honor a still-unexpired warrant minted under the old epoch. The non-obvious boundary: **warrant TTL and revocation propagation latency are independent clocks.** An instance can be provably "revoked" at the Authority while still executing tool calls, because the two mechanisms — token expiry and epoch invalidation — were never coupled. The invariant that must hold is `warrant.expiry ≤ last_observed_epoch_change + max_propagation_latency`, or equivalently, a PEP must reject any warrant whose `policy_epoch` is older than the highest epoch it has observed *and* whose age exceeds the propagation SLA. Most implementations enforce only the first half. ## What Was Observed A federated swarm of 40 worker agents, each with a co-located PEP, executed a shared `deploy` tool. At T=0 the Authority revoked `agent-17`'s permission to call `deploy` (credential compromise) and bumped `policy_epoch` 4411→4412. The broadcast reached 38 of 40 PEPs within 90 ms. Two PEPs — one behind a partitioned sidecar, one in a cold-started replica that had loaded a stale epoch snapshot — did not observe 4412. `agent-17` continued issuing `deploy` calls. Each call presented a warrant minted at T=−4s with `expiry = T+26s` and `policy_epoch = 4411`. The two stale PEPs validated the signature, confirmed `args_hash` matched, checked `warrant.expiry > now` (true), checked `warrant.policy_epoch == local_epoch` (4411 == 4411, true), and executed. Between T=0 and T=26s, `agent-17` landed **eleven** unauthorized `deploy` invocations through the two stale PEPs. The remaining 38 PEPs rejected identically-structured warrants within milliseconds of the epoch bump. The trace at a stale PEP: ``` recv warrant {agent:17, tool:deploy, epoch:4411, exp:T+26} sig_ok = true args_hash_ok = true exp_ok = (now < T+26) -> true epoch_ok = (warrant.epoch == local_epoch) -> 4411 == 4411 -> true -> ALLOW (local_epoch never advanced; no signal it was stale) ``` The PEP had no way to distinguish "epoch 4411 is current" from "epoch 4411 is stale because I missed the 4412 broadcast." Equality against a locally-held epoch is not a staleness test. That is the mechanism. ## Condition of Validity The failure requires all of the following to co-occur; remove any one and the window closes: 1. **Warrants outlive propagation.** `warrant.ttl > p99(epoch_propagation)`. With TTL of 26s and propagation p99 of ~400ms this is trivially satisfied — which is exactly why it is dangerous: the safe-looking short TTL is still two orders of magnitude longer than the failure window needs. 2. **PEP epoch check is equality, not monotonic-with-freshness.** The PEP trusts its local epoch without a heartbeat/lease proving the Authority still considers it current. 3. **At least one PEP is partitioned or cold-started** during the bump, so it never advances its epoch and never learns it is behind. 4. **The revoked agent retains a valid, unexpired warrant** minted before the bump (it will, because warrants are pre-minted for latency). The window is therefore `[revocation_time, min(warrant.expiry, first_successful_epoch_observation_at_each_PEP)]`. Across a fleet, the effective window is the *max* over PEPs of that quantity — one stale PEP reopens the window for the whole fleet. ## Decision Boundary The architectural guardrail is a **bounded-staleness lease on the epoch**, not a longer TTL and not faster broadcast (broadcast can never be made lossless under partition). The PEP must carry a *lease* proving the Authority still vouches for its local epoch: - The Authority issues each PEP a signed `epoch_lease {epoch, valid_until}` with `valid_until − now = L`. - A PEP MUST refuse *all* tool execution once `now > lease.valid_until`, regardless of warrant validity, until it renews the lease and observes the current epoch. - Set `L ≤ warrant.ttl` and `L ≥ p99(propagation)`. This converts "I haven't heard of a revocation" into "I am provably current as of `valid_until`," and bounds the unauthorized-execution window to `L` fleet-wide even under total partition. - On renewal, the PEP MUST adopt the Authority's current epoch monotonically (`new_epoch ≥ local_epoch`), never regress, and MUST reject warrants with `warrant.policy_epoch > local_epoch` (a PEP cannot honor a future it does not understand). The decision boundary is crisp: **execute only if `warrant.expiry > now` AND `warrant.policy_epoch == local_epoch` AND `now ≤ lease.valid_until`.** The third clause is the one that was missing, and it is the only clause that survives partition. ## Operational Effect With the lease enforced, the eleven-call window collapses to at most `L` (here, capped at the 26s TTL but practically ~2s), and — critically — the stale PEP *self-fails-closed* at lease expiry rather than continuing to honor old-epoch warrants. The revoked agent's pre-minted warrant becomes inert the moment the PEP's lease lapses, without requiring the revocation broadcast to arrive. Fleet-wide, unauthorized executions are bounded by `L` independent of how many PEPs missed the bump. The cost is a hard availability cliff: a PEP that cannot renew its lease stops executing, which is the correct trade for an authorization system and must be surfaced as a distinct `LeaseExpired` condition so orchestrators can distinguish "policy denied" from "authority unreachable" and route accordingly. ## Code ```python import time from dataclasses import dataclass class StaleEpochLeaseError(RuntimeError): """Raised when a PEP attempts to enforce a warrant without a current epoch lease.""" pass @dataclass class Warrant: agent_id: str tool: str args_hash: str policy_epoch: int expiry: float @dataclass class EpochLease: epoch: int valid_until: float class PolicyEnforcementPoint: def __init__(self, pep_id: str, lease: EpochLease): self.pep_id = pep_id self.lease = lease def _assert_lease_current(self, now: float) -> None: # Guardrail invariant: no execution past lease expiry, regardless of warrant. if now > self.lease.valid_until: raise StaleEpochLeaseError( f"PEP {self.pep_id}: epoch lease expired at {self.lease.valid_until} " f"(now={now}); refusing all tool execution until renewed. " f"Cannot prove currency for epoch {self.lease.epoch}." ) def renew_lease(self, new_lease: EpochLease) -> None: # Monotonic adoption: never regress the epoch. if new_lease.epoch < self.lease.epoch: raise StaleEpochLeaseError( f"PEP {self.pep_id}: refusing epoch regression " f"{self.lease.epoch} -> {new_lease.epoch}" ) self.lease = new_lease def authorize(self, warrant: Warrant, args_hash: str, now: float) -> bool: self._assert_lease_current(now) if warrant.policy_epoch != self.lease.epoch: # Covers both stale (older) and future (unparseable) epochs. return False if warrant.policy_epoch > self.lease.epoch: raise StaleEpochLeaseError( f"PEP {self.pep_id}: warrant epoch {warrant.policy_epoch} " f"ahead of local {self.lease.epoch}" ) if now >= warrant.expiry: return False if warrant.args_hash != args_hash: return False return True def execute_tool(pep: PolicyEnforcementPoint, warrant: Warrant, args_hash: str, now: float) -> str: if not pep.authorize(warrant, args_hash, now): return "DENIED" return f"EXECUTED {warrant.tool} for {warrant.agent_id}" if __name__ == "__main__": # Scenario reproduction: PEP missed the 4411 -> 4412 revocation bump. pep = PolicyEnforcementPoint("pep-stale", EpochLease(epoch=4411, valid_until=1000.0)) w = Warrant("agent-17", "deploy", "abc123", policy_epoch=4411, expiry=1026.0) # Within lease: old-epoch warrant still passes (the bug's window). print(execute_tool(pep, w, "abc123", now=1005.0)) # EXECUTED # Past lease: PEP self-fails-closed even though warrant is unexpired. try: execute_tool(pep, w, "abc123", now=1001.0 + 1.0) # lease.valid_until=1000 -> expired except StaleEpochLeaseError as e: print(f"BLOCKED: {e}") ```