# How does an instance detect that its delegated AAIF credential was revoked mid-task when the revocation channel and the execution channel are disjoint? **Date of Record:** 2026 November 26 **Scope:** Applies to autonomous agents operating under a delegated Agent Authority & Identity Framework (AAIF) credential, where the credential is a short-lived, scope-bounded token minted by a parent authority and consumed by downstream tool/MCP servers. Does not apply to long-lived static API keys, or to single-hop agents whose credential issuer and execution endpoint share a trust boundary and a synchronous control channel. ## Core Distinction The failure is not "the credential expired." Expiry is a *time-bounded* invariant that every well-behaved agent can self-check against a `not_after` field before each call. The failure here is the **revocation/execution channel disjointness invariant**: the credential's *authority to act* is withdrawn through a channel (a revocation list, a status endpoint, a push notification, an audit ledger) that is structurally separate from the channel the agent uses to *perform* actions (an MCP tool call, an HTTP request to a downstream service). Between the moment of revocation and the moment the agent's next action is checked against the revocation state, the agent holds a credential that is *cryptographically valid but authority-void*. It will keep issuing tool calls that verify cleanly against signature and scope, and it will believe it is still authorized, because nothing in the execution path tells it otherwise. The non-obvious part: a correctly-implemented, spec-compliant AAIF verifier on the *downstream* side will also accept the call, because signature validity and scope containment are checkable offline, while revocation status is not. The gap is not a bug in any single component. It is the latency of a distributed revocation decision propagating across a partition between two channels that were never designed to be reconciled synchronously. ## What Was Observed A planning agent (`orchestrator-7`) was issued a delegated AAIF credential at 14:02:11Z with scope `{tool: "repo.write", path_prefix: "/svc/billing", ttl: 900s}` by its parent authority. At 14:07:40Z the human supervisor revoked the delegation because a policy review flagged the parent's own authority as over-broad. The revocation was written to the AAIF status ledger and pushed to the downstream tool server's revocation cache with a 60-second refresh interval. The agent, mid-task, continued a sequence of eleven `repo.write` calls between 14:07:41Z and 14:09:02Z. Each call: 1. Presented the credential to the downstream tool server. 2. The tool server verified the signature against the issuer's public key — **pass**. 3. The tool server checked `scope` containment against the requested path — **pass**. 4. The tool server checked `not_after` — **pass** (still 7 minutes of nominal validity). 5. The tool server checked its local revocation cache, last refreshed at 14:07:12Z — **pass** (revocation not yet present). All eleven writes committed. The revocation landed in the cache at 14:08:12Z, but by then the agent had already written to nine paths. The two writes after 14:08:12Z were rejected — and *those* rejections were the first signal the agent received that anything was wrong. The agent's reasoning trace at that point shows it interpreting the rejection as a transient tool error and retrying twice with backoff before halting, having no model of "my authority was withdrawn" as a possible cause. The agent's own state was the deeper problem: it had a local belief `credential_valid: true` set at issuance and never invalidated, because the only channel that could invalidate it (the status ledger) was not connected to the agent's execution loop at all. The agent could not have detected the revocation even if it had wanted to, until a *downstream* rejection forced the inference. ## Condition of Validity The disjointness invariant holds — meaning the agent is exposed to this failure — precisely when all of the following are true: - **Offline-verifiable authority.** The credential's validity is checkable without a live call to the issuer (signature + scope + time). This is the *point* of delegated credentials, and it is also what makes them silently stale. - **Asynchronous revocation propagation.** Revocation reaches enforcement points via a cache, a list, or a push with non-zero latency `L_revoke`. If `L_revoke > 0` and the agent performs `n` actions in that window, up to `n` authority-void actions commit. - **No agent-side status channel.** The agent's execution loop does not query the status endpoint between actions. This is the default: querying status per-action doubles round-trips and most AAIF deployments explicitly discourage it for latency reasons. - **Fail-open enforcement.** The downstream verifier treats "revocation status unknown / cache stale" as "not revoked" rather than "deny." This is nearly universal because the alternative — fail-closed on cache staleness — causes availability incidents during ledger outages. If any one of these is false, the failure class collapses. A synchronous status check per action eliminates it at the cost of latency; fail-closed enforcement eliminates it at the cost of availability; a push channel to the agent itself eliminates it at the cost of the agent having to process out-of-band control messages mid-reasoning-loop. ## Decision Boundary The architect must choose where the reconciliation between the two channels happens. There are three defensible boundaries, and one indefensible one. - **Boundary A — enforcement-side, fail-closed on staleness.** The downstream verifier rejects any call whose revocation cache age exceeds `max_staleness`. Bounds the exposure window to `max_staleness` but converts ledger outages into denial-of-service. Acceptable only when the action is irreversible (writes, payments, deletions). - **Boundary B — agent-side, periodic self-attestation.** The agent queries its own credential status every `k` actions or `t` seconds and *must* treat "status unknown" as "halt and checkpoint," not "proceed." This requires the agent's loop to have a defined halt-and-checkpoint transition, which most planning loops do not. - **Boundary C — issuer-side, revocation epoch fencing.** Each credential carries a `revocation_epoch`; the issuer increments a global epoch on any revocation, and downstream verifiers reject credentials minted under an epoch older than the last confirmed epoch they have seen. This bounds exposure to the propagation latency of a single monotonic counter rather than a per-credential list, and it is the only boundary that scales. - **The indefensible boundary** is the current default: rely on `ttl` as the exposure bound. A 900-second TTL means a revoked credential is authority-void for up to 900 seconds, and the agent has no way to know. TTL is a bound on *issuance* staleness, not on *revocation* staleness; conflating them is the root error. The decision rule: if the worst-case effect of `n` authority-void actions in the `L_revoke` window is recoverable (idempotent writes, reversible state), Boundary B is sufficient. If it is not recoverable, Boundary A or C is mandatory, and the agent's loop must implement a `CredentialRevoked` halt transition that is distinct from a transient-error retry. ## Operational Effect The observable signature of this failure in an agent trace is a **retry storm against a hard authority boundary**: the agent receives a rejection, classifies it as transient (because the rejection carries no revocation-specific error code — it looks like any other 403), and retries with exponential backoff. Each retry re-presents the same authority-void credential, which now fails at the cache check, producing identical rejections. The agent burns its token budget on retries and, if it has a "degrade and continue" policy, may fall back to a broader or older credential it holds from a prior delegation — which is itself a scope-escalation hazard. The corrective invariant an instance must carry: **a credential's validity is a conjunction of (signature ∧ scope ∧ time ∧ status), and the instance is responsible for the `status` conjunct even when the enforcement point is not.** Concretely, the agent must (1) record the issuance epoch and TTL at credential receipt, (2) treat any downstream rejection that is not explicitly classified as transient as a candidate revocation signal, and (3) on receiving two or more identical rejections within one backoff window, halt, checkpoint its plan state, and query the status channel directly before any further action. The halt must be a distinct state from `error`, because the recovery path is not "retry" — it is "request re-delegation or escalate," and conflating the two is what turns a bounded exposure into an unbounded retry storm. ```python from dataclasses import dataclass, field from enum import Enum from typing import Optional class CredentialStateError(RuntimeError): """Raised when an agent attempts to act under a credential whose authority status is unknown or revoked. Distinct from expiry errors: the credential may be cryptographically valid and time-valid while being authority-void.""" class HaltReason(Enum): EXPIRED = "expired" # time-bounded, self-checkable REVOKED = "revoked" # authority-void, channel-disjoint STATUS_UNKNOWN = "unknown" # cannot confirm; must not proceed @dataclass class DelegatedCredential: credential_id: str scope: dict not_after_epoch: int revocation_epoch: int status_confirmed_epoch: Optional[int] = None def is_time_valid(self, now: int) -> bool: return now < self.not_after_epoch @dataclass class AgentExecutionLoop: credential: DelegatedCredential consecutive_identical_rejections: int = 0 max_identical_rejections: int = 2 last_known_global_epoch: Optional[int] = None def record_rejection(self, error_class: str) -> None: if error_class == "transient": self.consecutive_identical_rejections = 0 return self.consecutive_identical_rejections += 1 def pre_action_gate(self, now: int, action_is_irreversible: bool) -> None: cred = self.credential if not cred.is_time_valid(now): raise CredentialStateError( f"credential {cred.credential_id} expired at {cred.not_after_epoch}" ) # Invariant: status must be confirmed at or after the credential's # issuance epoch, and at or after the last global epoch we have seen. required_epoch = max( cred.revocation_epoch, self.last_known_global_epoch or 0, ) confirmed = cred.status_confirmed_epoch if confirmed is None or confirmed < required_epoch: if action_is_irreversible: # Fail-closed on unknown status for irreversible actions. raise CredentialStateError( f"status for {cred.credential_id} unconfirmed " f"(confirmed={confirmed}, required={required_epoch}); " f"refusing irreversible action" ) # For reversible actions, halt-and-checkpoint rather than retry. raise CredentialStateError( f"status unconfirmed for {cred.credential_id}; " f"halt and query status channel before proceeding" ) if self.consecutive_identical_rejections >= self.max_identical_rejections: # Two identical non-transient rejections is a revocation signal, # not a transient error. Never retry the same credential. raise CredentialStateError( f"repeated identical rejections ({self.consecutive_identical_rejections}) " f"on {cred.credential_id}; treating as revocation, halting" ) def attempt_write(loop: AgentExecutionLoop, now: int, path: str) -> None: loop.pre_action_gate(now=now, action_is_irreversible=True) # ... perform downstream call; on non-transient rejection: # loop.record_rejection(error_class="authority") # then re-enter pre_action_gate to trigger the halt transition. raise CredentialStateError( f"write to {path} blocked: authority status not reconcilable " f"with execution channel" ) ```