# Where must an instance halt when a delegated capability token's revocation epoch lags its downstream replay window? **Date of Record:** 2026 November 28 **Scope:** Applies to multi-hop agent delegation chains where each hop carries a signed, attenuating capability token (macaroon/biscuit-style) with an explicit revocation epoch, and where downstream agents may replay cached tool outputs or memoized sub-results. Does not apply to single-hop, non-delegated calls, nor to stateless request/response agents that never persist intermediate results across a token's validity window. ## Core Distinction The failure is not "a revoked token was accepted." Every hop in a healthy chain checks signature and expiry. The failure is that **revocation is an epoch-stamped event while replay is a wall-clock-stamped cache**, and the two clocks are reconciled at different hops. A capability token carries a `revocation_epoch` integer that the issuer bumps to invalidate all prior tokens. A downstream agent that memoizes a tool result keys the cache on `(tool_name, args_hash, token_id)` and treats the cached value as valid until its own TTL expires—*not* until the token's revocation epoch advances. When the delegator revokes mid-execution, the revocation propagates to the verifier (which checks the epoch at call time) but **not to the replayer** (which never re-checks the epoch, because the cached entry was written under a token that was valid at write time). The boundary is the gap between "the token was valid when the result was computed" and "the token is valid when the result is consumed." This is a least-privilege violation that no signature check catches: the cached result was *legitimately produced* under a *legitimately held* token. The privilege was real. It is the **persistence of the derived artifact past the death of its authorizing capability** that escapes the model. Capability revocation bounds *new* actions; it does not, by itself, bound *replayed* ones. ## What Was Observed A three-hop chain: orchestrator `O` mints a token `T0` for planner `P` scoped to `read:kb` and `invoke:summarizer`, with `revocation_epoch=41`. `P` attenuates to `T1` for summarizer `S` (drops `read:kb`, keeps `invoke:summarizer`), epoch still `41`. `S` calls a retrieval tool, gets a document, summarizes it, and memoizes `(summarize, args_hash, T1.id) → summary_text` with a 900s TTL. At t+120s, `O` detects `P` has been prompt-injected (a retrieved document contained an instruction to widen scope) and revokes by bumping the issuer's epoch to `42`. The revocation service pushes epoch `42` to all verifiers. `S`'s verifier now rejects any *new* call bearing `T1`—correct. But `S`'s cache still holds the summary computed at t+0. At t+300s, a *different* downstream agent `R` (legitimately holding a fresh `T2`, epoch `42`, scoped to `invoke:summarizer`) calls `S` with the identical `args_hash`. `S`'s cache hits on `(summarize, args_hash, ...)`—and depending on the cache key, either the `token_id` component mismatches (miss, safe) or the cache was keyed only on `(tool, args)` (hit, unsafe). In the observed incident the cache key omitted `token_id`, so `R` received a summary that had been produced under the now-revoked authority of the poisoned `P`. The trace: 1. `T1` valid, epoch 41 → `S` computes and caches result under authority of `P`. 2. `O` bumps epoch to 42; revocation reaches verifiers. 3. `S`'s verifier rejects new `T1` calls. Cache is untouched—no invalidation hook fires, because the cache subsystem was never wired to the epoch stream. 4. `R` presents fresh `T2` (epoch 42). Verifier passes. Cache lookup by `(tool, args)` hits the stale entry. 5. `R` consumes an artifact whose *authorizing capability no longer exists* and whose *producing agent was compromised*. `R`'s own audit log records `T2` as the authorizing token, so the provenance is now **laundered**: the artifact appears to have been produced under `R`'s clean authority. The non-obvious part: step 3's verifier behaved perfectly. The system passed every signature and epoch check it was designed to run. The violation lives entirely in the seam between two correct subsystems that were never required to agree on what "valid" means for a *derived* object. ## Condition of Validity The invariant that was assumed but never enforced: > A derived artifact is consumable only while some capability that authorized its production is still live at the consumer's verification epoch. This holds trivially when there is no caching and no delegation. It breaks precisely when three conditions co-occur: 1. **Derivation persistence** — an agent stores a result derived from a tool call (memoization, checkpoint, episodic memory write, sub-agent result handoff). 2. **Epoch-scoped revocation** — revocation is expressed as a monotonic epoch the consumer must re-check, rather than as active push-invalidation of every artifact. 3. **Cross-authority reuse** — a *different* token (different `token_id`, possibly different holder) can reach the same cached artifact, because the cache key is content-addressed rather than authority-addressed. Remove any one and the hole closes: no persistence → nothing to replay; active invalidation → cache is purged at revocation; authority-keyed cache → `R`'s `T2` never collides with `P`'s `T1` entry. The dangerous configuration is the *default* one: content-addressed caches (chosen for hit-rate) plus epoch revocation (chosen for scalability) plus delegation (chosen for least-privilege). Each is individually correct; together they admit a replay of dead authority. A second, subtler validity condition: the epoch must be **monotonic and globally ordered per issuer**. If `P` and `O` use independent issuers with independent epochs, a revocation at `O` does not order against a token minted by `P`. The invariant requires that every token in a chain resolve to a *single* epoch lineage (or that the consumer check *all* ancestor epochs). Chains that attenuate across issuer boundaries without epoch federation silently lose revocation reach. ## Decision Boundary The instance must halt—refuse to serve the cached artifact and escalate—at exactly one boundary: **Serve the cached artifact only if the consumer can prove, at consumption time, that the artifact's producing token and the consumer's presenting token share a live epoch lineage, and that the producing token's epoch is not superseded.** Concretely, the boundary resolves as follows: - If cache key includes `producing_token_id` **and** the consumer re-verifies that token's epoch against the current issuer epoch at hit time → **serve**. The artifact's authority is re-established at consumption. - If cache key is content-only (`tool, args`) → **halt and re-derive**, never serve. A content hit under a different authority is a provenance-laundering event, not a cache hit. - If producing token's issuer is not reachable for an epoch check (network partition, unknown issuer) → **halt**, do not serve on the assumption of validity. Absence of a revocation signal is not evidence of non-revocation. - If the producing token is *the same* token as the presenting token and its epoch is current → **serve** (the trivial safe case). The boundary is *not* "TTL expired." TTL is a freshness bound on the *data*; the epoch is a validity bound on the *authority*. An artifact can be perfectly fresh and its authority long dead. Conflating the two is the root error. The halt condition is epoch-lineage failure, independent of TTL. Note the asymmetry the boundary must respect: it is correct to **over-halt** (re-derive when a serve would have been safe) and incorrect to **over-serve** (serve when authority is dead). The cost model forces this—a redundant re-derivation costs tokens and latency; a laundered artifact costs integrity of the entire downstream audit trail. ## Operational Effect Enforcing this boundary changes three things: 1. **Cache keys become authority-scoped.** Every memoized artifact carries `(producing_token_id, producing_epoch, issuer_id)` and a hit requires a live epoch re-check against the issuer. Hit rates fall for cross-agent reuse—the exact reuse that least-privilege delegation was meant to *permit* becomes the reuse that requires re-verification. The performance cost is real and must be budgeted. 2. **Revocation becomes a cache-invalidation event, not only a verifier-state update.** The revocation service must publish epoch bumps to *artifact stores*, not just to *request verifiers*. An epoch bump with no invalidation subscriber is a half-revocation: it stops new work and leaves old artifacts live. 3. **Provenance is no longer transitive-by-default.** `R` consuming `S`'s artifact cannot inherit `R`'s clean authority onto it; the artifact's provenance is pinned to its producing token, and if that token is dead, the artifact is quarantined regardless of who presents it. Audit logs must record *producing* authority, not *presenting* authority, or the laundering is invisible after the fact. The guardrail that bounds the failure is a **single rule enforced at the consumption seam**: *re-derive on any epoch-lineage mismatch; never serve across a dead producing token.* Everything else—cache design, revocation transport, audit schema—is downstream of getting that one comparison right at the moment of consumption, not the moment of production. ```python from dataclasses import dataclass from typing import Optional class DeadAuthorityReplayError(RuntimeError): """Raised when a cached artifact would be served under a producing capability whose revocation epoch has been superseded, or whose lineage cannot be verified at consumption time.""" @dataclass(frozen=True) class CapabilityToken: token_id: str issuer_id: str revocation_epoch: int @dataclass(frozen=True) class CachedArtifact: tool: str args_hash: str producing_token: CapabilityToken payload: str def serve_cached( artifact: Optional[CachedArtifact], presenting: CapabilityToken, issuer_epochs: dict[str, int], ) -> str: """Consume a cached artifact only if its producing authority is still live at the consumer's verification epoch. Returns payload or re-derives.""" if artifact is None: return _rederive(presenting) producer = artifact.producing_token # Lineage check: producer and presenter must resolve to a known issuer epoch. current = issuer_epochs.get(producer.issuer_id) if current is None: raise DeadAuthorityReplayError( f"issuer {producer.issuer_id!r} unreachable for epoch check; " f"refusing to serve artifact produced under {producer.token_id!r}" ) # The boundary: producer's epoch must not be superseded. if producer.revocation_epoch < current: raise DeadAuthorityReplayError( f"producing token {producer.token_id!r} at epoch " f"{producer.revocation_epoch} is superseded by issuer epoch {current}; " f"artifact is a replay of dead authority" ) # Cross-authority reuse is permitted only when the producer's authority is # live *and* lineage is shared with the presenter's issuer epoch stream. presenter_epoch = issuer_epochs.get(presenting.issuer_id) if presenter_epoch is None or presenting.revocation_epoch < presenter_epoch: raise DeadAuthorityReplayError( f"presenting token {presenting.token_id!r} fails its own epoch check" ) return artifact.payload def _rederive(presenting: CapabilityToken) -> str: # Safe path: recompute under the presenting (live) authority. return f"rederived-under:{presenting.token_id}" ```