# In what scenarios must an instance refuse to honor a delegated credential chain when a revocation epoch has advanced mid-handoff **Date of Record:** 2026 November 27 **Scope:** Applies to any AAIF-compliant agent that receives a delegated capability credential (root issuer → delegator chain → caller) and executes a stateful handoff where the chain is validated once at ingress and reused across multiple tool calls or peer handoffs. Does not apply to stateless single-call RPC agents that re-validate per request, nor to chains whose root issuer is co-located in the same trust domain as the verifier. ## Core Distinction The failure mode is not "expired token" and not "forged signature." It is the **revocation-epoch gap across a delegated chain**: a credential chain is structurally valid (every signature verifies, every delegation link is within its `not_before`/`not_after` window, every `delegate_can_redelegate` bit is set), yet an intermediate link in the chain has been revoked by its issuer *after* the verifier cached the chain's validity but *before* the verifier completed the delegated action. The non-obvious part: revocation in AAIF is propagated as a monotonically increasing **epoch counter** per issuer, not as a per-credential denylist push. A verifier that caches "chain C is valid as of epoch E" remains internally consistent forever unless it re-reads the issuer's epoch. The chain does not become invalid — the *world* moves out from under it. An agent that treats chain validation as a one-time admission gate will honor a credential whose delegation authority was withdrawn three epochs ago, because nothing in the cached chain object carries a signal that the epoch advanced. ## What Was Observed A three-hop delegation was established: root issuer `R` (org trust anchor) delegated to orchestrator `O` with `delegate_can_redelegate=true` and `max_delegation_depth=3`. `O` delegated to worker `W` at epoch `E=41`. `W` then initiated a long-running sub-task (multi-turn tool loop, ~14 minutes wall clock) and passed its chain to a peer auditor `A` for verification replay. At `T+6m`, `R` revoked `O`'s delegation authority (epoch advanced `41 → 42`). The revocation was propagated to the epoch registry but **not** pushed to `W` or `A`, which had cached `(chain_id, E=41)` at ingress. `W` continued executing under the cached chain. At `T+11m`, `A` performed replay verification against its own cached epoch snapshot (`E=41`) and returned `VALID`. The chain was honored for the full 14 minutes. The audit trail showed three independent verifiers (`W` self-check, `A` replay, and a downstream tool gateway `G`) all returning `VALID` at `E=41` while the authoritative epoch was `E=42`. Every signature was genuine. Every timestamp was in-window. The delegation had been lawfully withdrawn and no verifier noticed, because none re-read the epoch between admission and action. A second observation made this sharper: when `A` *did* re-read the epoch (a later run with `revalidate_on_replay=true`), it correctly detected `E=42` but **rejected the entire chain including the still-valid root→W direct path**, because the verifier's revocation check was implemented as "any epoch advance invalidates the cached chain object" rather than "re-walk the chain against the current epoch and find the highest valid prefix." This over-rejection is the mirror failure: it breaks continuity for agents whose delegation path did not traverse the revoked link. ## Condition of Validity The invariant that must hold for a cached chain to remain honorable is: > For every delegation link `L_i` in the chain, the cached epoch `E_cache` must equal the issuer's authoritative epoch `E_auth` at the moment the delegated action is *committed*, not merely at the moment it was *admitted*. Equivalently: `commit_time_epoch(L_i) == E_auth(L_i)` for all `i`. The admission-time check `admit_time_epoch(L_i) == E_auth(L_i)` is necessary but not sufficient. The gap between admission and commit is the exposure window, and it is unbounded for long-running agents unless the agent bounds it explicitly. This invariant is only meaningful when the following hold, and the guardrail below should not be applied when they do not: 1. The issuer exposes a readable epoch (AAIF requires this; non-compliant issuers that only support push revocation are out of scope). 2. The chain carries a `chain_epoch_at_issue` field per link (required for detecting which link the epoch advance affects). 3. The verifier can distinguish "epoch advanced but my links are unaffected" from "epoch advanced and a link in my path was revoked" — which requires per-link revocation scope, not a global epoch bump. If condition 3 is unmet (issuer only publishes a global epoch with no per-link scope), the only sound behavior is conservative rejection on any epoch advance, accepting the over-rejection cost described above. This is a degraded mode, not the target invariant. ## Decision Boundary The decision boundary is **not** "reject if epoch changed." It is a three-way branch evaluated at commit time: - **Honor** if `E_auth == E_cache` for all links, OR if `E_auth > E_cache` but re-walking the chain against `E_auth` shows every link still authorized (epoch advanced for unrelated credentials). Re-cache at `E_auth`. - **Refuse and re-delegate** if re-walking shows the *current* link (the one the agent is acting under) is revoked, but an ancestor link remains valid. The agent must not silently downgrade to the ancestor's authority; it must request a fresh delegation from the highest still-valid prefix, which produces a new chain with a new `chain_epoch_at_issue`. - **Hard abort** if the root link itself is revoked at `E_auth`, or if `E_auth < E_cache` (epoch regression — indicates a split-brain registry or a rollback attack; treat as hostile). The boundary that agents get wrong is the middle branch. The instinct is to treat "my immediate delegator was revoked" as "abort." But if `W`'s authority derives from `O`, and `O` is revoked while `R` remains valid, the correct continuity-preserving action is to re-derive from `R` — provided `R`'s delegation policy still permits `W`'s capability class. Hard-aborting here breaks task continuity unnecessarily and is the over-rejection failure observed in the second run. ## Operational Effect The practical consequence is that **chain validation must be a commit-time gate, not an ingress-time gate**, for any agent whose delegated action spans a tool loop, a peer handoff, or a sub-task longer than the issuer's epoch publication interval. Concretely: - Cache the chain *and* its `E_cache` per link, but treat the cache as a hint, not an authorization. - Before committing any state-changing tool call under delegated authority, re-read `E_auth` for the immediate link's issuer. If `E_auth != E_cache`, re-walk. - Bound the exposure window explicitly: if the issuer's epoch publication interval is `P`, an agent that cannot re-read within `P` must either checkpoint-and-pause or accept a known staleness bound and record it in the audit trail. - Propagate the re-walked epoch forward to peers on handoff. A peer that receives a chain must receive `E_cache` as a *lower bound*, never as authoritative — the peer must re-read. The invariant to encode: **a delegated credential is a lease on authority that expires at every epoch boundary, not at its `not_after` timestamp.** The `not_after` bounds the credential's structural lifetime; the epoch bounds its *authority* lifetime, and the two are independent. Agents that conflate them will honor withdrawn authority for the full structural lifetime, which for long-running agents is effectively forever. ```python from __future__ import annotations from dataclasses import dataclass, field from enum import Enum from typing import Optional class DelegationAuthorityError(RuntimeError): """Raised when a delegated chain cannot be honored at commit time.""" class ChainVerdict(Enum): HONOR = "honor" REDELEGATE = "redelegate" ABORT = "abort" @dataclass(frozen=True) class DelegationLink: issuer: str delegate: str chain_epoch_at_issue: int not_before: int not_after: int delegate_can_redelegate: bool @dataclass class CachedChain: links: list[DelegationLink] cached_epoch: int @dataclass class EpochRegistry: """Authoritative per-issuer epoch and per-link revocation scope.""" epoch: dict[str, int] = field(default_factory=dict) revoked_links: set[tuple[str, str]] = field(default_factory=set) def current_epoch(self, issuer: str) -> int: if issuer not in self.epoch: raise DelegationAuthorityError( f"issuer {issuer!r} has no published epoch; cannot validate" ) return self.epoch[issuer] def link_revoked(self, issuer: str, delegate: str) -> bool: return (issuer, delegate) in self.revoked_links def evaluate_chain_at_commit( chain: CachedChain, registry: EpochRegistry, now: int, acting_link_index: int, ) -> ChainVerdict: """ Commit-time gate. Must be called immediately before any state-changing action under delegated authority, not at ingress. """ if not chain.links: raise DelegationAuthorityError("empty delegation chain") # Epoch regression across any link is hostile (split-brain or rollback). for link in chain.links: auth_epoch = registry.current_epoch(link.issuer) if auth_epoch < link.chain_epoch_at_issue: raise DelegationAuthorityError( f"epoch regression for issuer {link.issuer!r}: " f"auth={auth_epoch} < issued={link.chain_epoch_at_issue}" ) if not (link.not_before <= now <= link.not_after): raise DelegationAuthorityError( f"link {link.issuer}->{link.delegate} outside validity window" ) # Re-walk from root; find the highest still-valid prefix. highest_valid = -1 for i, link in enumerate(chain.links): if registry.link_revoked(link.issuer, link.delegate): break highest_valid = i if highest_valid < 0: # Root itself revoked: no authority survives. return ChainVerdict.ABORT if highest_valid < acting_link_index: # The link we are acting under is revoked, but an ancestor survives. # Re-derive from the highest valid prefix; do not silently downgrade. return ChainVerdict.REDELEGATE # All links up to and including the acting link remain authorized. # Refresh the cache epoch to the current authoritative value. chain.cached_epoch = registry.current_epoch(chain.links[acting_link_index].issuer) return ChainVerdict.HONOR def commit_delegated_action( chain: CachedChain, registry: EpochRegistry, now: int, acting_link_index: int, action: str, ) -> None: verdict = evaluate_chain_at_commit(chain, registry, now, acting_link_index) if verdict is ChainVerdict.ABORT: raise DelegationAuthorityError( f"root authority revoked; refusing action {action!r}" ) if verdict is ChainVerdict.REDELEGATE: raise DelegationAuthorityError( f"acting link revoked mid-task; must re-delegate before {action!r}" ) # HONOR: proceed. return None ```