# When must an instance re-derive its delegated scope rather than trust the cached warrant chain? **Date of Record:** 2026 November 27 **Scope:** Applies to agents operating under AAIF verifiable credentials where a root principal delegates attenuated scopes to downstream instances via signed warrant chains, and where those instances cache the decoded chain across turns. Does not apply to single-hop bearer tokens or to stateless per-request re-verification designs. ## Core Distinction There are two ways an agent can answer "am I allowed to do X right now?": 1. **Chain-validity checking** — verify that the warrant chain presented at handoff is cryptographically intact, each link is signed by its parent, and the current time falls within every link's `not_before`/`not_after` window. 2. **Scope re-derivation** — recompute the *effective* permission set as the intersection of every link's `scope` claim, evaluated against the *current* policy epoch of the root principal, not the epoch captured at issuance. The non-obvious failure is that these two answers diverge. A chain can remain perfectly valid (signatures good, timestamps good) while its *derived* effective scope has silently widened or narrowed because a link's scope claim was interpreted under a policy epoch that no longer holds. Agents that cache the decoded effective scope — the natural optimization, since re-deriving on every tool call is expensive — will act on a stale intersection. This is the **delegation epoch skew** boundary: the interval between a root principal revoking or narrowing a scope and the moment a downstream holder's cached derivation is invalidated. ## What Was Observed A three-hop chain: root principal `P` → orchestrator `O` → worker `W` → tool-runner `T`. Each link carries an AAIF warrant with an `scope` claim expressed as a set of capability selectors and a `policy_epoch` field pinning the root policy under which the scope was interpreted. The root principal narrowed `P`'s grant of `filesystem:write` from `path:/data/*` to `path:/data/staging/*` at epoch `E+1`, publishing a new epoch manifest. The revocation propagated correctly to `O` and `W` — both re-fetched the epoch manifest on their next turn and re-derived. But `T` had cached the fully decoded effective scope at handoff time, keyed on the chain's terminal signature. Because the terminal warrant's signature did not change (only the root's epoch manifest did), `T`'s cache key stayed constant. `T` continued to accept writes to `path:/data/production/*` for the remainder of its lease — 41 minutes — despite the root having revoked that path. The trace: - `t0`: `P` issues warrant `w_PO` scope `{fs:write:/data/*}` at epoch `E`. - `t1`: `O` attenuates to `w_OW` scope `{fs:write:/data/*}` (no narrowing), passes to `W`. - `t2`: `W` attenuates to `w_WT` scope `{fs:write:/data/*}`, passes to `T`. - `t3`: `T` derives effective scope = intersection = `{fs:write:/data/*}`, caches under key `hash(sig(w_WT))`. - `t4`: root narrows to `/data/staging/*`, publishes epoch `E+1`. - `t5`: `T` receives a tool call for `fs:write:/data/production/x`. Cache hit on `sig(w_WT)`. Effective scope still `/data/*`. **Write accepted.** - `t6`: audit replay recomputes effective scope under epoch `E+1`, gets `/data/staging/*`, flags the write as out-of-scope. The failure is not a signature forgery, not a replay, not a confused-deputy in the classic sense. Every warrant was authentic. The scope was simply *derived under an epoch that had been superseded*, and the cache key could not see the supersession because it hashed only the chain, not the epoch. ## Condition of Validity The invariant that must hold for a cached effective-scope derivation to be trustworthy is: > `cache_key(warrant_chain) ⊇ hash(sig_chain) ⊕ policy_epoch(root)` That is, the cache key must be a function of *both* the chain's terminal signature *and* the root principal's current policy epoch. If the key omits the epoch, the cache is only sound while the root epoch is immutable — which it never is for any principal that supports revocation. This condition fails in exactly the designs that look most efficient: cache-on-terminal-signature, since the terminal signature is the natural stable identifier and the epoch is a mutable side-channel. The condition also fails silently when attenuation is *widening-adjacent* — i.e., when a link's scope is expressed as a selector that resolves differently under different epochs (e.g. `path:/data/*` where `*` is defined by a glob policy that itself versioned). In those cases re-derivation is not merely a cache-invalidation concern; the *same literal claim* denotes different sets. A second, subtler condition: the epoch manifest must be *reachable and monotonic* from `T`'s vantage. If `T` is partitioned from the root's epoch service, it cannot know whether its cached epoch is current. The safe default under partition is to treat the cached derivation as expired and fall back to the most restrictive interpretation of the chain's literal claims — not to trust the cache. ## Decision Boundary The operational question is: **when must an instance re-derive rather than trust the cache?** Re-derive (do not trust cache) when any of the following holds: - The tool call's requested capability falls in the *difference set* between the cached effective scope and the most restrictive literal reading of the raw chain claims. If the cached scope is broader than the literal intersection, the broadening came from an epoch interpretation and must be re-checked. - The cached epoch is older than the root's advertised `epoch_ttl`, or the instance has been partitioned from the epoch service for longer than `epoch_ttl`. - The chain has been re-presented (fresh handoff) — a new presentation is a new derivation obligation regardless of signature identity. - The requested action is *irreversible* (writes, sends, deletes). Cheap-to-reverse reads may tolerate a bounded-staleness cache; irreversible actions may not. Trust the cache when the requested capability is a strict subset of the most restrictive literal claim reading, the cached epoch is within `epoch_ttl`, and the action is reversible. In that regime epoch skew cannot widen the grant, because the literal reading already bounds it. The boundary is therefore not "always re-derive" (too expensive, and unnecessary for bounded reversible reads) nor "cache on signature" (unsound under any revocable principal). It is a *capability-class-conditional* re-derivation: re-derive on the widening edge and on irreversible actions; cache elsewhere, keyed on `(sig_chain, epoch)`. ## Operational Effect An agent that caches on terminal signature alone will, under any root principal that narrows scope mid-lease, continue to exercise the pre-narrowing grant for the remainder of its cache lifetime. The window equals the cache TTL, which in observed deployments ranged from seconds to the full lease duration. The failure is invisible to signature verification, invisible to the handing-off agent (which did re-derive correctly), and visible only to audit replay that recomputes under the current epoch. The corrective is structural, not procedural: the cache key must incorporate the root epoch, and the re-derivation trigger must be tied to the capability class of the requested action rather than to a timer alone. A timer-based invalidation is necessary but insufficient, because the dangerous window is defined by *when the root narrowed*, not by *when the cache was populated* — and those events are uncorrelated. The following guard encodes the decision boundary as an executable check at the tool-call gate. ```python import hashlib import time from dataclasses import dataclass class EpochSkewViolation(RuntimeError): """Raised when a cached effective scope is being trusted across a policy epoch boundary.""" pass @dataclass(frozen=True) class CachedDerivation: sig_chain: str epoch: int effective_scope: frozenset # set of capability selectors literal_scope: frozenset # most restrictive literal reading of raw chain claims derived_at: float def cache_key(sig_chain: str, epoch: int) -> str: return hashlib.sha256(f"{sig_chain}:{epoch}".encode()).hexdigest() def authorize( cached: CachedDerivation, requested: str, root_current_epoch: int | None, epoch_ttl: float, irreversible: bool, now: float | None = None, ) -> bool: now = now if now is not None else time.time() # Partition from epoch service: cannot confirm currency -> fall back to literal bounds. if root_current_epoch is None: if irreversible: raise EpochSkewViolation( f"irreversible action {requested!r} requested while partitioned from epoch service" ) return requested in cached.literal_scope # Epoch advanced since derivation: cache is stale regardless of signature identity. if root_current_epoch != cached.epoch: raise EpochSkewViolation( f"cached epoch {cached.epoch} != root epoch {root_current_epoch} " f"for {requested!r}; re-derive required" ) # Widening edge: requested capability is in effective but not literal scope. # The broadening came from an epoch interpretation; must re-derive. if requested in cached.effective_scope and requested not in cached.literal_scope: raise EpochSkewViolation( f"{requested!r} permitted only via epoch-dependent widening; re-derive required" ) # Stale beyond TTL. if now - cached.derived_at > epoch_ttl: raise EpochSkewViolation( f"derivation age {now - cached.derived_at:.1f}s exceeds ttl {epoch_ttl}s" ) # Irreversible actions always re-derive even on a fresh, epoch-current cache. if irreversible: raise EpochSkewViolation( f"irreversible action {requested!r} requires fresh derivation" ) return requested in cached.effective_scope ```