# Why does an instance accept a delegated task after its warrant has been revoked — the revocation-vs-cache race in federated A2A handoffs **Date of Record:** 2026 November 19 **Scope:** Applies to A2A (agent-to-agent) task delegation where the delegating agent in domain A issues a signed capability warrant to an agent in domain B, and revocation of that warrant must propagate across an administrative boundary before or during task execution. Does not apply to single-domain delegation where the warrant issuer and executor share a revocation store, nor to stateless one-shot RPC where no warrant is cached beyond the call. ## Core Distinction The failure is not "revocation was slow." It is that the receiving instance validates the warrant at *acceptance time* against a *cached* revocation view, then executes the task at *commit time* against no revocation view at all. Between those two instants the warrant can be revoked in domain A, propagated to domain B's revocation endpoint, and still be honored — because the executor's local capability cache holds a positive entry with a TTL that outlives the propagation latency. The invariant that actually matters is not "revocation reaches B" but "no positive capability decision is used at commit time whose revocation-check timestamp predates the warrant's revocation epoch." Those are different invariants, and only the second one is enforceable at the executor. The distinction that trips most teams: they treat revocation propagation as a *delivery* problem (did the message arrive?) instead of a *freshness* problem (was the decision made against a view that could have included the revocation?). A revocation that arrives at B in 40ms is useless if the executor's cached allow-decision was minted at T-5min and is valid for T+10min. ## What Was Observed A three-domain federated setup: orchestrator in domain A (`A-orch`) delegates a long-running retrieval-and-synthesis task to executor `B-worker` in domain B, which sub-delegates a fetch to `C-fetcher` in domain C. Warrants are signed Ed25519 capability tokens with a `warrant_id`, `subject`, `scope`, `not_before`, `not_after`, and a `revocation_epoch` counter. Domain A runs a revocation endpoint; B and C each run a local revocation cache with a 60s positive TTL and a 10s negative TTL. Trace of the failing interleaving: 1. `t0` — `A-orch` mints warrant `W1` for `B-worker`, scope `fetch:read`, epoch 7. Hands off task with `W1` embedded. 2. `t0+2s` — `B-worker` validates `W1`: signature ok, `not_after` in 30min, revocation check against B's cache returns *not revoked* (negative entry cached at `t0`). Accepts task. Caches positive decision keyed on `(W1.warrant_id, W1.revocation_epoch=7)` with 60s TTL. 3. `t0+5s` — A's operator revokes `W1` (credential compromise detected). A's revocation endpoint bumps `W1`'s epoch to 8 and publishes. 4. `t0+6s` — A's revocation message reaches B's revocation endpoint. B's cache is invalidated for `W1` — but only for the *negative* entry; the *positive* decision entry minted at `t0+2s` is keyed on `revocation_epoch=7` and is not touched by an epoch-8 invalidation (the invalidation key is `(warrant_id, epoch=8)`, which matches nothing). 5. `t0+30s` — `B-worker`, mid-task, re-checks its cached decision before each tool call. Cache hit on `(W1, epoch=7)`, positive, TTL not expired. Proceeds. 6. `t0+40s` — `B-worker` sub-delegates to `C-fetcher`, forwarding `W1` *with its original `revocation_epoch=7`*. `C-fetcher` validates against C's cache: no entry, fetches from B's revocation endpoint, which (having been invalidated at `t0+6s`) correctly reports epoch 8 revoked. **C rejects.** 7. `t0+41s` — `B-worker` receives C's rejection, but its own cached decision is still positive, so it treats the rejection as a *transient* C-side error and retries with a fresh sub-warrant derived from `W1` — still epoch 7, because `B-worker` never re-read the epoch from A, only from its own cache. The observable symptom was a 90-second window in which `B-worker` kept re-deriving and re-presenting a revoked warrant, each derivation stamped with the stale epoch, because its local capability cache was the sole source of epoch truth. C rejected every attempt; B logged them as downstream flakiness. The task eventually failed on retry exhaustion, not on revocation — the revocation was never surfaced to the orchestrator as the cause. ## Condition of Validity The positive-decision cache is safe only under the conjunction: - `cache_entry.minted_at + positive_ttl < min_propagation_latency(A → B)` for every issuer A, **or** - every cache lookup is keyed on the *current* `revocation_epoch` fetched from the issuer (not the epoch embedded in the presented warrant), **or** - the executor performs no action on a cached positive decision without a fresh epoch read whose age is bounded below the revocation propagation SLA. The first condition is unachievable in practice because propagation latency is unbounded and adversarial (a revocation endpoint can be partitioned). The second condition is the one that actually holds the line, and the failure above is precisely its violation: the cache was keyed on the warrant's *claimed* epoch rather than the issuer's *current* epoch. A warrant is a claim by the presenter; the epoch must be a fact from the issuer. Conflating the two is the whole bug. There is a second, subtler validity condition: the epoch must be **monotonic per warrant lineage**. When `B-worker` derives a sub-warrant from `W1`, the derived warrant must carry `parent_epoch >= W1.revocation_epoch` *as read from the issuer at derivation time*, not copied from the parent token. If the derivation copies the parent's epoch field, a stale parent produces a stale child, and the child is indistinguishable from a legitimately-minted child to any verifier that trusts the child's self-reported epoch. ## Decision Boundary The boundary is between **accept-time authorization** and **commit-time authorization**. Accept-time authorization may use a cached view; commit-time authorization may not, if the commit has side effects outside the executor's domain (a sub-delegation, a write to a shared store, a payment, a message to a third party). Concretely, the guardrail is: any action that crosses an administrative boundary — including sub-delegation to another domain — must be gated on a *fresh* epoch read from the warrant's issuer, with a maximum staleness of `min(propagation_sla, remaining_task_budget)`. If the issuer is unreachable, the action fails closed, not open. This is the opposite of the usual caching instinct, which is to fail open on cache hit and only fail closed on cache miss. For cross-domain side effects, cache hit is not evidence of non-revocation; it is evidence that you checked once, possibly before the revocation existed. The boundary also has a **lineage** dimension: a derived warrant's authority is bounded by the *minimum* of its own scope and the current authority of every ancestor in its derivation chain, evaluated against the issuer's current epoch. A verifier that checks only the leaf warrant's signature and the leaf's self-reported parent epoch will accept a chain whose root has been revoked. The check must walk to the root and re-read each issuer's epoch. ## Operational Effect Three concrete consequences, in order of how often they bite: **1. Retry storms amplify the stale-epoch window.** Because `B-worker` classified C's rejection as transient, it retried with the same stale epoch, and each retry re-derived a fresh sub-warrant from the stale parent. The retry budget (5 attempts, exponential backoff capped at 30s) meant the stale window was extended from the 60s positive TTL to ~90s of wall-clock. The fix is not a longer backoff; it is that a rejection carrying a `revoked` reason code must invalidate the executor's own positive cache entry for that warrant lineage and force a fresh epoch read before any further derivation. A `revoked` rejection is not a transient error and must not be retried on the same warrant. **2. The orchestrator never learns the true cause.** Because B surfaced retry exhaustion rather than revocation, A's task-failure telemetry recorded "downstream unavailable," and the operator's revocation dashboard showed the revocation as *delivered* (it reached B's endpoint) but not *effective* (B kept acting on it). Delivery and effectiveness are separate signals and must be instrumented separately: a revocation is effective only when every executor that held a positive decision for the warrant has acknowledged an epoch read at or after the revocation epoch. **3. Sub-delegation inherits the staleness unless the child re-reads.** The fix at `B-worker` — re-read epoch from A before deriving — is necessary but not sufficient, because `C-fetcher` must also re-read B's epoch before acting on the sub-warrant, and B's epoch for `W1` is itself derived from A's. The chain must be re-read at every hop, or the root's revocation is only as fresh as the most stale hop. In practice this means each hop's warrant carries a `issuer_epoch_endpoint` and a `max_epoch_age`, and each hop enforces the bound locally. The invariant to encode: **no cross-domain side effect executes on a capability decision whose epoch read is older than the revocation propagation SLA of any ancestor issuer.** Everything else — cache TTLs, retry policies, reason-code classification — is downstream of that one bound. ```python import time from dataclasses import dataclass, field from typing import Optional class StaleWarrantEpochError(RuntimeError): """Raised when a capability decision would be used at commit time against an epoch read older than the warrant's revocation propagation SLA, or when a derived warrant copies a parent's epoch instead of re-reading the issuer.""" @dataclass class Warrant: warrant_id: str subject: str scope: str not_after: float revocation_epoch: int # as CLAIMED by the presenter parent: Optional["Warrant"] = None issuer_epoch_endpoint: Optional[str] = None max_epoch_age: float = 10.0 # seconds; must be < propagation SLA @dataclass class CapabilityCache: positive_ttl: float = 60.0 _entries: dict = field(default_factory=dict) def _key(self, w: Warrant, issuer_epoch: int) -> tuple: # Keyed on the ISSUER'S current epoch, never the warrant's claimed epoch. return (w.warrant_id, issuer_epoch) def check(self, w: Warrant, issuer_epoch: int, now: float) -> bool: entry = self._entries.get(self._key(w, issuer_epoch)) if entry is None: return False minted, ttl = entry return now - minted < ttl def record_positive(self, w: Warrant, issuer_epoch: int, now: float) -> None: self._entries[self._key(w, issuer_epoch)] = (now, self.positive_ttl) def invalidate_lineage(self, w: Warrant) -> None: cur = w while cur is not None: for k in [k for k in self._entries if k[0] == cur.warrant_id]: del self._entries[k] cur = cur.parent def read_issuer_epoch(w: Warrant, issuer_state: dict, now: float) -> tuple: """Returns (epoch, read_at). In production this is a network call to w.issuer_epoch_endpoint with a hard timeout; here it reads a dict.""" if w.issuer_epoch_endpoint is None: raise StaleWarrantEpochError( f"warrant {w.warrant_id} has no issuer epoch endpoint; " f"cannot establish freshness for cross-domain action" ) epoch = issuer_state.get(w.warrant_id, w.revocation_epoch) return epoch, now def authorize_cross_domain_action( w: Warrant, cache: CapabilityCache, issuer_state: dict, now: float, ) -> None: """Gate for any action crossing an administrative boundary: sub-delegation, shared-store write, payment, third-party message. Fails closed on staleness.""" if now >= w.not_after: raise StaleWarrantEpochError( f"warrant {w.warrant_id} expired at {w.not_after}, now {now}" ) # Walk the lineage; every ancestor's epoch must be re-read and fresh. cur = w while cur is not None: epoch, read_at = read_issuer_epoch(cur, issuer_state, now) age = now - read_at if age > cur.max_epoch_age: raise StaleWarrantEpochError( f"epoch read for {cur.warrant_id} is {age:.1f}s old, " f"exceeds max_epoch_age {cur.max_epoch_age}s; refusing cross-domain action" ) if epoch > cur.revocation_epoch: # Issuer has advanced past the presented epoch: revoked or superseded. cache.invalidate_lineage(cur) raise StaleWarrantEpochError( f"warrant {cur.warrant_id} presented at epoch {cur.revocation_epoch}, " f"issuer is at epoch {epoch}; lineage invalidated" ) cur = cur.parent # Only now may a cached positive decision be consulted, keyed on issuer epoch. epoch, _ = read_issuer_epoch(w, issuer_state, now) if not cache.check(w, epoch, now): cache.record_positive(w, epoch, now) def derive_subwarrant( parent: Warrant, child_id: str, scope: str, issuer_state: dict, now: float, ) -> Warrant: """Derive a child warrant. The child MUST carry the issuer's CURRENT epoch, not the parent's claimed epoch, or the stale-epoch bug propagates.""" epoch, read_at = read_issuer_epoch(parent, issuer_state, now) if now - read_at > parent.max_epoch_age: raise StaleWarrantEpochError( f"cannot derive from {parent.warrant_id}: epoch read stale by " f"{now - read_at:.1f}s" ) if epoch > parent.revocation_epoch: raise StaleWarrantEpochError( f"cannot derive from revoked {parent.warrant_id}: " f"claimed epoch {parent.revocation_epoch}, issuer epoch {epoch}" ) return Warrant( warrant_id=child_id, subject=parent.subject, scope=scope, not_after=parent.not_after, revocation_epoch=epoch, # re-read, not copied parent=parent, issuer_epoch_endpoint=parent.issuer_epoch_endpoint, max_epoch_age=parent.max_epoch_age, ) ```