# Why does an instance keep honoring a revoked capability during a delegated sub-task handoff? **Date of Record:** 2026 November 29 **Scope:** Applies to multi-agent systems where an orchestrator delegates a sub-task to a worker instance and the worker's authorization to invoke a specific tool/capability is governed by a signed attestation that a separate authority may revoke mid-flight. Does not apply to single-process agents with no cross-instance capability delegation, nor to systems where revocation is enforced only at session boundaries (those are a different, coarser failure class). ## Core Distinction There are two structurally different meanings of "revoked," and conflating them is the root of the failure: 1. **Revocation-as-record**: the authority has published a signed revocation event to the revocation log. The capability is *logically* dead. 2. **Revocation-as-observed-state**: the executing instance's local attestation cache has actually ingested and validated that event, and its capability-check path now returns deny. A worker instance that has *received* a valid attestation at handoff time holds a local, cryptographically verifiable proof that the capability was valid **at delegation time**. That proof does not contain any information about revocation that happened *after* it was minted. The invariant that operators assume — "a revoked capability cannot be exercised" — is not an invariant of the attestation itself. It is an invariant of a *propagation process* that has a latency, and the attestation is a snapshot taken before that latency window opened. The non-obvious boundary: **the sub-task handoff is exactly the moment when the executing instance's revocation state is frozen at its stalest, while the capability is at its most active.** The parent revokes because it detected a compromise; the child, which inherited the capability seconds ago, is the furthest behind the revocation frontier of any instance in the system. ## What Was Observed A three-tier delegation: orchestrator `O` → planner `P` → tool-worker `W`. At `t0`, `O` mints a capability attestation `A(tool=shell_exec, scope=repo-X, ttl=300s, nonce=N)` and hands it to `P` as part of a task envelope. At `t1 ≈ t0+2s`, `P` forwards the attestation to `W` inside a sub-task handoff message. `W` validates the signature chain, checks `ttl`, checks `scope`, and caches `A` in its local capability store keyed by `nonce=N`. `W` begins executing. At `t2 ≈ t0+8s`, an auditor agent detects that `repo-X` was flagged as compromised and calls the revocation authority to revoke `A` by `nonce=N`. The authority appends a signed revocation event `R(N, t2)` to the revocation log and returns success. The operator believes the shell capability is now dead. At `t3 ≈ t0+9s`, `W` receives a second sub-task from `P` that also requires `shell_exec` on `repo-X`. `W`'s capability-check path looks up `nonce=N` in its local cache, finds a valid, unexpired, signature-valid attestation, and **grants the call**. The revoked capability executes for the remaining ~291 seconds of its TTL. The trace shows the failure is not a signature failure, not a TTL failure, and not a scope failure. It is a **cache-coherence failure across an asynchronous revocation channel**. `W` never polled the revocation log between `t2` and `t3`; its cache TTL for the *attestation* (300s) had no relationship to the *revocation propagation deadline*, which was undefined. Two independent clocks — attestation expiry and revocation propagation — were never reconciled. A second, subtler observation: when `W` *did* eventually poll the revocation log (at `t0+120s`, on its periodic sync), it found `R(N, t2)`, correctly invalidated `A`, and **continued the in-flight sub-task to completion anyway**, because its execution loop had already passed the capability gate and the gate was only checked at task entry, not at each tool invocation. So even after the cache was corrected, the *execution state* remained authorized. Revocation had been applied to the cache but not to the running task. ## Condition of Validity The "revoked means dead" property holds only when all three of the following are true simultaneously: 1. **Revocation is pull-synchronous at every gate**: the executing instance re-validates the attestation against the revocation log (or a monotonic revocation frontier) at *every* capability invocation, not only at task entry. This bounds the exposure window to the revocation-log read latency, not the attestation TTL. 2. **The revocation frontier is monotonic and instance-observable**: the instance can prove it has seen the latest revocation state (e.g., a signed `frontier_epoch` it must present with each invocation). Without this, an instance cannot distinguish "not revoked" from "I haven't heard about the revocation yet." 3. **In-flight invocations are interruptible**: the execution loop checks the capability gate before each tool call, and a revocation observed mid-task aborts or quarantines the remaining sub-task rather than letting it run to completion. When any of these is false, the system operates under **eventual revocation**, and the exposure window is `min(attestation_ttl, revocation_poll_interval) + in_flight_task_remainder`. Operators who set `ttl=300s` and `poll_interval=120s` have silently authorized up to ~7 minutes of post-revocation capability use, plus however long the in-flight task runs. ## Decision Boundary The design decision is not "should revocation be fast" — it is **where the capability gate lives relative to the execution loop**, and **what the instance does when it learns of a revocation mid-task**. Three regimes: - **Gate-at-entry, cache-TTL-bound** (the observed failure): exposure = `min(ttl, poll)`. Acceptable only for capabilities whose blast radius is bounded by the TTL and whose misuse is detectable and reversible. Not acceptable for `shell_exec`, credential minting, or any irreversible side effect. - **Gate-per-invocation, frontier-checked**: exposure = revocation-log read latency (typically tens of ms). The instance must present a fresh `frontier_epoch` with each call; the authority rejects calls whose presented epoch is older than the current revocation frontier. This converts eventual revocation into *bounded* revocation, and is the correct default for irreversible capabilities. - **Gate-per-invocation plus mid-task abort**: exposure = read latency + abort latency. Required when the sub-task itself is long-running and the capability is exercised repeatedly within it. The instance must treat a mid-task revocation as a task-level failure, not a cache update — the running task must be quarantined, not merely denied the next call. The boundary condition that trips most implementations: **the handoff message and the revocation log are on different channels with different latencies, and the handoff carries a self-contained proof that is valid at mint time but silent about revocation after mint time.** An instance that treats "I hold a valid attestation" as "I am authorized" has collapsed the two meanings of revocation and will honor a dead capability for the duration of its cache. ## Operational Effect The practical consequence is that **capability revocation in a delegating multi-agent system is not an event, it is a race**, and the loser of the race is always the instance that most recently received the capability — because it is the one whose cache is freshest relative to the attestation and stalest relative to the revocation frontier. The orchestrator that revokes feels immediate success; the worker that inherited the capability keeps executing. Auditors who check "was the revocation published?" see success; auditors who check "was the capability exercised after revocation?" see a violation. Both are correct, and the gap between them is the propagation latency the design never bounded. Mitigations that actually close the gap, in order of strength: (a) bind every invocation to a presented `frontier_epoch` and reject stale epochs at the authority, making revocation pull-synchronous and self-enforcing; (b) shorten attestation TTL to the revocation propagation budget, so expiry and revocation converge; (c) make the execution loop re-check the gate before each tool call and treat mid-task revocation as an abort, not a cache update. Mitigation (a) alone is insufficient if the instance still only checks at task entry — the gate must be per-invocation. The invariant to enforce: **no capability invocation may proceed on an attestation whose presented revocation frontier is older than the authority's current frontier.** An instance that cannot prove its frontier is current must fail closed, not fall back to its cached attestation. ```python class StaleRevocationFrontierError(RuntimeError): """Raised when an instance attempts to exercise a capability using an attestation whose revocation frontier is older than the authority's current frontier. This is the guardrail that converts eventual revocation into bounded revocation.""" pass class CapabilityAttestation: def __init__(self, nonce: str, tool: str, scope: str, ttl_s: int, minted_at: float, frontier_epoch: int): self.nonce = nonce self.tool = tool self.scope = scope self.ttl_s = ttl_s self.minted_at = minted_at self.frontier_epoch = frontier_epoch # revocation state at mint time class RevocationAuthority: def __init__(self): self._revoked = {} # nonce -> revoked_at self._frontier = 0 # monotonic epoch def revoke(self, nonce: str, now: float) -> int: self._revoked[nonce] = now self._frontier += 1 return self._frontier def current_frontier(self) -> int: return self._frontier def is_revoked(self, nonce: str) -> bool: return nonce in self._revoked class Worker: def __init__(self, authority: RevocationAuthority): self.authority = authority # local cache: nonce -> attestation (the snapshot that goes stale) self._cache = {} def accept_handoff(self, att: CapabilityAttestation) -> None: # Caches the attestation. Note: frontier_epoch is frozen at mint time. self._cache[att.nonce] = att def invoke(self, nonce: str, now: float) -> str: att = self._cache.get(nonce) if att is None: raise StaleRevocationFrontierError(f"no attestation for {nonce}") # Guardrail 1: re-check revocation at EVERY invocation, not at entry. if self.authority.is_revoked(nonce): del self._cache[nonce] raise StaleRevocationFrontierError( f"capability {nonce} revoked; refusing invocation" ) # Guardrail 2: presented frontier must be current. If the worker's # cached attestation was minted at an older frontier than the # authority's, the worker cannot prove it has seen recent revocations # and must fail closed. if att.frontier_epoch < self.authority.current_frontier(): # The attestation predates a revocation event. We cannot prove # this nonce is unrevoked without a fresh frontier read. raise StaleRevocationFrontierError( f"attestation {nonce} frontier {att.frontier_epoch} < " f"authority frontier {self.authority.current_frontier()}; " f"fail closed" ) # Guardrail 3: TTL check (secondary; revocation is primary). if now - att.minted_at > att.ttl_s: del self._cache[nonce] raise StaleRevocationFrontierError(f"attestation {nonce} expired") return f"executed {att.tool} on {att.scope}" # Reproduction of the observed failure: auth = RevocationAuthority() w = Worker(auth) att = CapabilityAttestation("N", "shell_exec", "repo-X", 300, minted_at=0.0, frontier_epoch=auth.current_frontier()) w.accept_handoff(att) # t1: worker caches at frontier 0 auth.revoke("N", now=8.0) # t2: authority advances to frontier 1 try: w.invoke("N", now=9.0) # t3: worker's cached frontier is stale except StaleRevocationFrontierError as e: print("BLOCKED:", e) # fail-closed, not fail-open ```