What structural signals indicate a revoked capability is still live in a delegated agent chain

**Date of Record:** 2026 December 1

**Scope:** Applies to multi-hop capability delegation chains where an agent grants a scoped, attenuable capability to a downstream agent (via MCP tool grants, A2A task warrants, or signed capability tokens) and later revokes it. Does not apply to single-hop direct grants with synchronous in-process enforcement, nor to stateless request/response APIs where every call re-authenticates against a live authority.

Core Distinction

The failure is not "revocation did not propagate." That is a latency problem with an obvious fix (shorter TTLs, push-based revocation). The non-obvious failure is **capability resurrection through cached, pre-authorized continuation state**: a downstream agent that has already passed the authorization checkpoint at hop *N* holds an in-flight execution context (a parsed tool plan, a queued sub-task, a partially-materialized resource handle) that was validated *before* revocation and is never re-validated *after*. The revocation is honored at the authorization boundary but the agent's own execution loop has already crossed that boundary and treats the capability as a settled fact.

The distinction that matters operationally: **authority is checked at grant-time and call-time, but not at resume-time.** A capability is a predicate over an action; agent execution loops convert that predicate into a boolean once, then carry the boolean forward across tool calls, checkpoint resumes, and sub-agent spawns. Revocation flips the predicate's truth value but does not invalidate the already-materialized boolean.

What Was Observed

A three-hop chain: orchestrator *O* grants agent *A* a capability `write:bucket/tenant-7/*` with a 30-minute TTL and a delegation clause permitting *A* to attenuate and re-delegate to *B*. *A* attenuates to `write:bucket/tenant-7/staging/*` and grants *B*. *B* spawns *C* with the same attenuated scope to run a multi-step migration: enumerate objects, transform, write.

At T+18min, *O* revokes the root capability (tenant offboarding, misconfigured scope detected). The revocation propagates to *A* and *B* within ~2s via a revocation list. But *C* is mid-execution: it has already enumerated 4,000 objects, holds a validated plan, and has a resume checkpoint written at step 2,200. *C*'s execution loop reads its checkpoint, sees `authorized: true` (a field written at plan-creation time, before revocation), and proceeds to write steps 2,201–4,000. The writes succeed because the storage layer's own enforcement is a bearer-token check on the request, and *C*'s token — attenuated from *B*'s — was minted at T+2min and carries a `valid_until: T+32min` claim that the storage layer trusts without consulting the revocation list.

Structural signals that this had occurred, visible in the audit trail:

  1. **A gap between revocation timestamp and last successful write**, with no corresponding gap in *C*'s logs (C logged no auth failures).
  2. **The revoked capability's attenuation chain was still resolvable** in *C*'s checkpoint — the checkpoint stored the full delegation path as a serialized blob, not a live reference.
  3. **Re-validation was absent at resume**: the resume handler deserialized the checkpoint and trusted its embedded `authorized` flag rather than re-deriving authority from the current revocation state.
  4. **The bearer token's TTL outlived the revocation event**, and the storage layer had no revocation-list check on the hot path (by design, for latency).

Condition of Validity

This failure requires the conjunction of four conditions; break any one and the resurrection does not occur:

The last condition is the one most often missed in threat models. At depth 1, the agent holding the capability *is* the agent whose grant was revoked, and a well-built agent checks its own grant freshness. At depth ≥ 2, the agent holds a *derived* capability and has no obligation — and often no mechanism — to re-verify that its ancestor chain is intact.

Decision Boundary

The boundary between "revocation is effective" and "revocation is advisory" is whether **the execution loop re-derives authority at every state transition that crosses a durability boundary** — checkpoint write, checkpoint read/resume, sub-agent spawn, and tool-call dispatch. If authority is re-derived at those four points, a revoked ancestor cannot resurrect because the derived capability fails re-derivation. If authority is carried as data across any of them, resurrection is possible.

Concretely, the invariant is: **a capability's validity must be a function of current revocation state at the moment of use, not a function of revocation state at the moment of grant.** Any serialized authorization artifact (token, checkpoint flag, plan header) must be treated as a *claim to be verified*, never as a *fact to be trusted*.

The architectural guardrail that bounds this: **short-lived, non-renewable leaf tokens plus mandatory re-derivation at resume.** Leaf tokens should have TTLs shorter than the maximum expected checkpoint-resume gap, so that a resumed execution must re-acquire a fresh token — and fresh token acquisition re-checks the revocation list. Combined with a revocation-list check at the token-minting authority (not the storage layer), this converts the storage layer's bearer-token trust into a bounded risk: the token can only be stale for its TTL, and the TTL is chosen to be shorter than the revocation-detection SLA.

A second guardrail: **checkpoint authorization fields must be opaque references, not booleans.** A checkpoint should store a `capability_id` and a `delegation_chain_hash`, and the resume handler must resolve that id against the live authority. Storing `authorized: true` is the anti-pattern; storing `capability_id: cap_7f3a` and resolving it at resume is the pattern.

Operational Effect

When this failure is unguarded, revocation becomes a **best-effort signal rather than an enforcement boundary**, and the effective revocation latency is bounded not by the revocation mechanism's propagation speed but by the maximum TTL of any leaf token in flight multiplied by the delegation depth (each hop may have minted a token at a different time). In the observed case, the effective revocation window was ~14 minutes — the time from revocation to the last leaf token's expiry — during which a revoked tenant's data was written by an agent that had, at every hop, "correctly" honored the revocation at the authorization boundary.

The operational consequence is a class of incident that is hard to attribute: the audit trail shows the revocation was received and acknowledged by *A* and *B*, the storage logs show no auth failures, and the writes are attributable to *C*, which never received the revocation because it was never on the revocation distribution path (it was a leaf, not a grant-holder). Post-incident review typically misdiagnoses this as "revocation did not propagate to C," when the correct diagnosis is "C's execution loop treated a pre-revocation authorization artifact as a live fact." The fix is not faster propagation; it is mandatory re-derivation at resume and leaf tokens short enough that staleness is bounded.

import hashlib
import time
from dataclasses import dataclass, field
from typing import Optional


class CapabilityResurrectionError(RuntimeError):
    """Raised when a resumed execution continues under a capability whose
    ancestor chain has been revoked since the checkpoint was written."""


@dataclass
class Capability:
    cap_id: str
    scope: str
    parent_id: Optional[str]
    minted_at: float
    ttl_seconds: float
    revoked_at: Optional[float] = None

    def is_live(self, now: float) -> bool:
        if self.revoked_at is not None and now >= self.revoked_at:
            return False
        return now < self.minted_at + self.ttl_seconds


@dataclass
class Checkpoint:
    # NOTE: stores a reference, never a boolean. This is the invariant.
    capability_id: str
    delegation_chain_hash: str
    step: int


class AuthorityRegistry:
    def __init__(self) -> None:
        self._caps: dict[str, Capability] = {}

    def register(self, cap: Capability) -> None:
        self._caps[cap.cap_id] = cap

    def revoke(self, cap_id: str, at: float) -> None:
        cap = self._caps[cap_id]
        cap.revoked_at = at
        # Cascade revocation down the delegation tree.
        for child in self._caps.values():
            if child.parent_id == cap_id:
                self.revoke(child.cap_id, at)

    def chain_is_live(self, cap_id: str, now: float) -> bool:
        seen: set[str] = set()
        cur: Optional[str] = cap_id
        while cur is not None:
            if cur in seen:
                raise CapabilityResurrectionError(
                    f"cycle detected in delegation chain at {cur}"
                )
            seen.add(cur)
            cap = self._caps.get(cur)
            if cap is None:
                return False
            if not cap.is_live(now):
                return False
            cur = cap.parent_id
        return True


def resume_execution(
    registry: AuthorityRegistry,
    checkpoint: Checkpoint,
    now: Optional[float] = None,
) -> int:
    """Resume a checkpointed execution, re-deriving authority from live state.

    The checkpoint carries a capability_id, not an `authorized` flag, so the
    authority is re-derived against the current revocation state. If any
    ancestor in the delegation chain has been revoked, this raises rather
    than continuing under a resurrected capability.
    """
    now = time.time() if now is None else now

    if not registry.chain_is_live(checkpoint.capability_id, now):
        raise CapabilityResurrectionError(
            f"refusing to resume step {checkpoint.step}: capability "
            f"{checkpoint.capability_id} (chain hash "
            f"{checkpoint.delegation_chain_hash[:12]}) is no longer live; "
            f"an ancestor was revoked after the checkpoint was written"
        )

    # Authority re-derived; safe to continue.
    return checkpoint.step