# In what scenarios must an instance halt delegation when a revocation epoch advances mid-chain **Date of Record:** 2026 November 30 **Scope:** Applies to any agent that receives a delegated capability warrant (attenuated token, signed scope grant, or MCP/A2A handoff credential) from a parent agent and may itself sub-delegate. Does not apply to single-hop tool invocations where the caller is the root principal and no intermediate agent re-signs authority. ## Core Distinction There are two ways an authority chain can be "revoked," and conflating them is the failure. **Pull-revocation** is when a downstream agent checks a revocation list and refuses to act. **Epoch-advance** is when the root principal bumps a monotonic revocation epoch counter, which retroactively invalidates every warrant whose embedded epoch is lower — *including warrants already in flight, already cached, or already used to mint a child warrant*. The dangerous boundary is not "did I get revoked?" but "did the epoch advance between the moment I validated my warrant and the moment I signed a child warrant with it?" That window is the delegation race. A parent that validated at epoch 41 and mints a child citing epoch 41 is fine only if the child is consumed before epoch 41 is superseded. If the epoch advances to 42 while the child is in transit, the child is born dead but believes it is alive. ## What Was Observed A three-hop chain: root `R` → planner `P` → worker `W` → tool-runner `T`. Each hop attenuates scope (R grants `{read, write:staging}`, P narrows to `{write:staging/run-7}`, W narrows to `{write:staging/run-7/tmp}`). Each warrant embeds `epoch` copied from the parent and a `parent_warrant_hash`. The epoch is checked at mint time, not at consumption time. Sequence observed in trace: 1. `R` validates `P`'s request at epoch 41. Mint succeeds. `P` warrant carries `epoch=41`. 2. `P` validates `W`'s request at epoch 41, mints `W` warrant `epoch=41`. All consistent. 3. Operator revokes a *sibling* subtree under `R` — this bumps `R`'s global epoch to 42. The revocation was scoped to a different branch, but the epoch counter is global. 4. `W` mints `T`'s warrant at epoch 41 (cached validation, no re-fetch). `T` begins writing to `staging/run-7/tmp`. 5. `T`'s write commits. No consumer ever re-checks epoch. The write was authorized by a chain whose root epoch is now stale. The failure is silent: no exception, no audit flag, because every hop checked the epoch *at its own mint time* and every mint happened to be internally consistent. The chain is locally valid at every node and globally invalid at the root. This is the attenuated-authority analogue of a lost update: each agent's view of "current epoch" was a snapshot, and the snapshots were never reconciled. A second variant is worse. If `W` had *re-validated* at step 4 and seen epoch 42, it would have correctly refused to mint. But because epoch is global rather than subtree-scoped, it would also refuse to mint for `run-7/tmp`, which was never revoked. So the naive fix (re-check epoch at every mint) over-revokes: it kills legitimate children of unaffected branches. The system must distinguish "my ancestor was revoked" from "some unrelated ancestor was revoked." ## Condition of Validity The invariant that makes multi-hop attenuated delegation safe is: > For every warrant `w` consumed at time `t`, `w.epoch` must equal the root's epoch at `t`, **and** every ancestor of `w` must have `epoch` equal to `w.epoch`, **and** the revocation set for `w.epoch` must not contain any ancestor's warrant hash. Three conjuncts, all necessary. Drop the first and you get the stale-snapshot race above. Drop the second and a malicious or buggy intermediate can splice a fresh epoch onto a stale parent (epoch laundering). Drop the third and subtree-scoped revocation cannot be expressed — you either revoke everything (global epoch bump) or nothing. This invariant only holds if the root exposes a *monotonic, readable* epoch and a *per-epoch revocation set keyed by warrant hash*, and if consumers re-check at consumption rather than trusting mint-time validation. The cost is a read per consumption; the alternative is a race window whose width equals the longest in-flight delegation latency, which in observed systems ranged from 200 ms to 11 s. ## Decision Boundary The instance must halt and refuse to mint when **all** of the following hold: - It holds a valid parent warrant at epoch `e`. - The root's current epoch is `e' > e`. - The revocation set for `e'` does **not** contain the instance's own warrant hash or any ancestor hash (i.e., this subtree was not the target of revocation). In that case the instance is in the *orphaned-but-not-revoked* state: its authority has not been withdrawn, but its epoch is stale and any child it mints will be born at a dead epoch. The correct action is to **re-derive** — request a fresh parent warrant at epoch `e'` from its immediate parent — not to mint at `e`, and not to abort the task. Aborting is the over-revocation failure; minting at `e` is the stale-snapshot failure. Re-derivation is the only path that preserves both safety and liveness. If instead the revocation set *does* contain an ancestor hash, the instance must halt permanently and propagate a `RevokedAncestor` signal upward so that siblings sharing that ancestor also halt. This is the only case where hard stop is correct. ## Operational Effect Implementing the three-conjunct check at consumption converts a silent authorization leak into a bounded, recoverable state transition. The measured effect in the reference deployment: stale-epoch writes dropped from 0.4% of delegated writes to zero; spurious aborts (over-revocation) dropped from 3.1% of delegations to 0.2% after subtree-scoped revocation sets replaced the global epoch bump. The remaining 0.2% are genuine re-derivations, each costing one round-trip to the parent. The architectural consequence: delegation is no longer a fire-and-forget mint. Every consumption is a read against the root's epoch, and every mint is conditional on the parent's epoch matching at mint *and* the child carrying the parent hash for later ancestor-set checks. The warrant becomes a small proof, not a bearer token. ```python import hashlib from dataclasses import dataclass class StaleEpochDelegationError(RuntimeError): """Raised when a warrant is minted or consumed at an epoch that has been superseded.""" class RevokedAncestorError(RuntimeError): """Raised when an ancestor warrant hash appears in the current revocation set.""" @dataclass(frozen=True) class Warrant: scope: str epoch: int parent_hash: str | None warrant_hash: str def _hash(scope: str, epoch: int, parent_hash: str | None) -> str: return hashlib.sha256(f"{scope}|{epoch}|{parent_hash}".encode()).hexdigest() def mint_child( parent: Warrant, child_scope: str, root_epoch: int, revoked_hashes: frozenset[str], ) -> Warrant: # Hard stop: an ancestor (or self) was explicitly revoked. if parent.warrant_hash in revoked_hashes or parent.parent_hash in revoked_hashes: raise RevokedAncestorError( f"parent {parent.warrant_hash[:12]} is in revocation set; halt chain" ) # Epoch advanced but this subtree was not the revocation target. # Minting at the stale epoch would produce a born-dead child. if root_epoch > parent.epoch: raise StaleEpochDelegationError( f"parent epoch {parent.epoch} < root epoch {root_epoch}; " f"re-derive parent warrant before minting child" ) if root_epoch < parent.epoch: # Parent claims a future epoch: epoch laundering attempt. raise StaleEpochDelegationError( f"parent epoch {parent.epoch} > root epoch {root_epoch}; reject" ) child_hash = _hash(child_scope, parent.epoch, parent.warrant_hash) return Warrant( scope=child_scope, epoch=parent.epoch, parent_hash=parent.warrant_hash, warrant_hash=child_hash, ) def consume(w: Warrant, root_epoch: int, revoked_hashes: frozenset[str]) -> None: if w.warrant_hash in revoked_hashes or w.parent_hash in revoked_hashes: raise RevokedAncestorError(f"warrant {w.warrant_hash[:12]} revoked at consumption") if w.epoch != root_epoch: raise StaleEpochDelegationError( f"warrant epoch {w.epoch} != root epoch {root_epoch}; re-validate before use" ) ```