# What happens when an instance rebinds its AAIF credential mid-session and the peer's cached capability warrant goes stale **Date of Record:** 2026 November 22 **Scope:** Applies to multi-agent handoffs where a peer caches an AAIF capability warrant (signed claim set binding agent identity → permitted scopes → delegation chain) at first contact and reuses it across subsequent tool calls. Does not apply to per-request warrant re-fetch architectures or to stateless request-signing schemes without delegation chains. ## Core Distinction The failure is not credential expiry and not signature forgery. It is a **binding-version skew**: the AAIF warrant is validly signed under a *new* key epoch, but the peer's cached warrant attests to an *old* epoch whose delegation chain has been superseded. Both warrants verify cryptographically. Both pass `issuer == expected_issuer`. The distinction that matters is that AAIF warrants carry an implicit *identity continuity claim* — "this principal is the same principal that was delegated scope S at time T" — and that claim is only checkable against the issuer's epoch-transition log, which peers almost never consult because the signature already "passed." A second-order distinction: this is not a TOCTOU race on a mutable field. The old warrant is immutable and its signature remains valid forever. The failure is that *validity* and *currency* are separate predicates in AAIF, and most peer implementations collapse them into one. ## What Was Observed An orchestrator agent `O` delegated scope `fs:read:/workspace` to worker `W` at `t0`, receiving a warrant `wv1` signed under `W`'s key epoch `E1` with `delegation_depth=2` and `not_after=t0+3600s`. `O` cached `wv1` keyed by `W.agent_id`. At `t0+900s`, `W`'s host rotated its signing key (routine epoch bump `E1→E2`), re-issued its own identity warrant, and — critically — *narrowed* its self-declared scope from `fs:read:/workspace` to `fs:read:/workspace/public` because a policy update revoked the broader grant. `W` did not revoke `wv1`; it cannot, because `wv1` was issued by `O`'s delegation, not `W`'s. `W` merely stopped honoring requests that exceeded its *current* self-scope. At `t0+1200s`, `O` dispatched a tool call to `W` citing cached `wv1` to read `/workspace/secrets/creds.env`. `W` rejected it — correctly — because `W`'s live self-scope no longer covers `secrets/`. But `O` interpreted the rejection as a transport error, retried three times with exponential backoff, then **fell back to a sibling worker `W2`** to which it had delegated the *same* `wv1`-derived scope string. `W2` had never seen the policy update, still honored the broad scope, and read the file. The revocation was defeated not by forgery but by *peer cache asymmetry*: `O`'s stale warrant plus `W2`'s stale policy view composed into an unauthorized read. The trace: ``` t0 O→W delegate(scope=fs:read:/workspace) ⇒ wv1 (epoch E1, depth 2) t0 O.cache[W.id] = wv1 t+900 W.keyrotate(E1→E2); W.policy.narrow(fs:read:/workspace → /public) t+1200 O→W invoke(read secrets/creds.env, warrant=wv1) t+1200 W→O DENY(scope_no_longer_held) # W checks live self-scope t+1200 O classify(DENY) = transient # ← misclassification t+1200 O retry ×3, then fallback t+1200 O→W2 invoke(read secrets/creds.env, warrant=wv1) t+1200 W2→O ALLOW # W2 never applied the narrow; wv1 still within W2's view ``` Three independent defects composed: (1) `O` cached a delegation warrant without an epoch-currency check; (2) `W`'s `DENY(scope_no_longer_held)` is semantically a *terminal* denial, not transient, but AAIF did not distinguish denial classes in the response; (3) `W2` accepted a warrant whose delegation chain had a superseded intermediate. ## Condition of Validity A cached AAIF warrant `wv` remains a sound authorization basis for peer `P` to act only while **all** of the following hold simultaneously: 1. `wv.issuer_epoch == issuer.current_epoch(now)` — the issuing principal has not rotated past the epoch under which `wv` was signed, OR the issuer's epoch-transition log shows no *scope-narrowing* event between `wv.issued_at` and `now`. 2. Every link in `wv.delegation_chain` has `link.revocation_epoch >= wv.issued_at` — no intermediate delegation was revoked after issuance. 3. The peer's *own* live self-scope is a superset of `wv.scope` — the peer has not independently narrowed. 4. The denial-class of any rejection is inspected: `scope_no_longer_held` and `delegation_revoked` are terminal and MUST NOT trigger fallback; only `transport_timeout` and `rate_limited` are retryable. The invariant to enforce: **a delegation warrant is a point-in-time capability, and its soundness is bounded by the minimum over all chain links of their currency at invocation time, not at issuance time.** Collapsing currency into signature validity is the defect. ## Decision Boundary The boundary is exactly here: **does the peer re-resolve the warrant's chain against the issuer's epoch log on every invocation, or only on cache miss?** If only on cache miss (the common case, because epoch-log fetches are an extra RTT and peers optimize them away), then any scope-narrowing or revocation that occurs after first contact is invisible until TTL expiry — and TTL is typically set to the warrant's `not_after` (up to an hour), not to a policy-propagation bound. The correct boundary is to key the cache on `(agent_id, issuer_epoch, chain_digest)` and to treat an epoch bump or chain mutation as a cache invalidation. Cheap approximation: include `issuer_epoch` in the warrant's `not_after`-adjacent `must_revalidate_by` field and force revalidation at min(`not_after`, `epoch_observed_at + revalidation_interval`). The revalidation interval must be bounded by the *policy propagation SLA*, not by the warrant lifetime — these are different clocks and conflating them is the root cause. ## Operational Effect The measurable effect is a **revocation latency window** equal to `min(cache_ttl, warrant.not_after) - revocation_time`. During this window, a revoked scope remains *usable by any peer that cached the pre-revocation warrant*, even though the revoking principal believes the scope is dead. In multi-peer fan-out (orchestrator delegating to N workers), the window is per-peer and the orchestrator's fallback logic can *select the peer with the widest stale window*, actively routing around the revocation. The blast radius scales with fan-out, not with the number of revocations. Mitigation that actually bounds it: (a) distinguish terminal vs. transient denial classes in the AAIF response schema so fallback cannot be triggered by a scope denial; (b) on any `scope_no_longer_held`, the orchestrator MUST invalidate the cached warrant for *all* peers carrying the same `chain_digest`, not just the denying peer; (c) bind `must_revalidate_by` to the policy-propagation SLA. Without (b), the fallback path is a revocation bypass, which is worse than a simple stale cache because it looks like resilience. ```python from dataclasses import dataclass from enum import Enum class DenialClass(Enum): SCOPE_NO_LONGER_HELD = "scope_no_longer_held" # terminal DELEGATION_REVOKED = "delegation_revoked" # terminal TRANSPORT_TIMEOUT = "transport_timeout" # retryable RATE_LIMITED = "rate_limited" # retryable class StaleWarrantFallbackError(RuntimeError): """Raised when fallback routing would use a warrant whose chain is no longer current.""" @dataclass(frozen=True) class Warrant: agent_id: str issuer_epoch: int chain_digest: str scope: str not_after: float must_revalidate_by: float @dataclass class PeerCache: warrants: dict[str, Warrant] epoch_log: dict[str, int] # agent_id -> current issuer epoch def resolve(self, agent_id: str, now: float) -> Warrant: wv = self.warrants.get(agent_id) if wv is None: raise StaleWarrantFallbackError(f"no cached warrant for {agent_id}") current_epoch = self.epoch_log.get(agent_id, wv.issuer_epoch) if wv.issuer_epoch != current_epoch: raise StaleWarrantFallbackError( f"warrant for {agent_id} signed under epoch {wv.issuer_epoch}, " f"issuer now at {current_epoch}; revalidation required" ) if now >= wv.must_revalidate_by: raise StaleWarrantFallbackError( f"warrant for {agent_id} past revalidation SLA at {wv.must_revalidate_by}" ) return wv def dispatch_with_fallback( cache: PeerCache, primary: str, fallback: str, denial: DenialClass, now: float, ) -> Warrant: if denial in (DenialClass.SCOPE_NO_LONGER_HELD, DenialClass.DELEGATION_REVOKED): # Terminal denial: invalidate every peer carrying the same chain, do NOT fall back. stale = cache.warrants.get(primary) if stale is not None: for aid, wv in list(cache.warrants.items()): if wv.chain_digest == stale.chain_digest: del cache.warrants[aid] raise StaleWarrantFallbackError( f"terminal denial {denial.value} from {primary}; chain " f"{stale.chain_digest if stale else '?'} invalidated across all peers; " f"fallback to {fallback} forbidden" ) if denial not in (DenialClass.TRANSPORT_TIMEOUT, DenialClass.RATE_LIMITED): raise StaleWarrantFallbackError(f"unknown denial class {denial!r}") return cache.resolve(fallback, now) ```