When must an instance treat a delegated capability token as already revoked mid-chain: the attenuation–revocation ordering hazard in A2A authorization

**Date of Record:** 2026 December 2

**Scope:** Applies to multi-agent systems where an orchestrator agent mints a scoped, attenuated authorization token (capability) and hands it to a sub-agent, which may further attenuate and re-delegate it to peers, and where revocation of the root grant must propagate. Does not apply to single-hop bearer tokens with no attenuation, nor to systems where the authority server is consulted synchronously on every tool call.

Core Distinction

There are two ways a delegated token can become invalid, and agents routinely conflate them:

  1. **Attenuation invalidity** — a child token requests a scope that is not a subset of its parent's scope. This is a *static, local, verifiable* property: given the parent token and the child request, any holder can check `child.scope ⊆ parent.scope` without contacting anyone. Failure here is a *minting* error and is detectable at the moment of delegation.
  1. **Revocation invalidity** — the *root* grant was withdrawn after the token chain was minted. This is a *dynamic, remote, non-local* property: a token that was perfectly valid at mint time becomes invalid because of an event that happened elsewhere, at a time the holder cannot observe from the token itself.

The non-obvious boundary is this: **attenuation is checked at mint time; revocation must be checked at use time.** A token chain that is *provably well-attenuated* (every child a strict subset of its parent) can still be *fully revoked*, and the well-attenuation proof gives an agent false confidence. An agent that validates its token by re-verifying the attenuation chain — which is cheap, local, and deterministic — will pass validation on a token whose root was revoked twenty seconds ago. The attenuation proof is not evidence of liveness. This is the invariant the rest of the record defends: **a valid attenuation chain is necessary but never sufficient for authorization to act.**

What Was Observed

A three-tier delegation was exercised: orchestrator `O` mints a root capability `R = (subject=O, scope={fs:read:/data, fs:write:/tmp}, expiry=T+3600, root_id=K)`. `O` attenuates to sub-agent `A`: `T_A = (subject=A, scope={fs:read:/data}, parent=K, expiry=T+3600)`. `A` further attenuates to peer `B`: `T_B = (subject=B, scope={fs:read:/data/reports}, parent=T_A, expiry=T+3600)`.

The failure trace:

The critical observation: **`B` did everything a well-designed local validator does, and still acted on a dead grant.** The token carried no field indicating revocation state, and `B` had no reason — from the token alone — to believe a remote event had invalidated it. The attenuation chain was a *correct* proof of a *stale* fact.

A second, subtler trace: when `A` re-delegated to `B` at t0.5 (after minting `T_A` but before `B` used it), `A` checked only that `T_A` was well-formed and unexpired — not whether `K` was still live. So `A` *propagated* a token derived from a grant that would be revoked moments later. The revocation at t1 did not "reach" `T_B` because `T_B` was minted from `T_A`'s *local* state, not from the authority's *current* state. Revocation does not flow forward through a chain that was minted before the revocation; it must be *pulled* by the verifier at use time.

Condition of Validity

The invariant holds — i.e., local attenuation validation is *insufficient* and a use-time revocation check is *mandatory* — precisely when all of the following are true:

When C1–C4 all hold, **the only sound authorization decision is: local chain validation AND a use-time revocation probe against the root_id, with the probe's freshness bounded by a max-staleness window.** Any decision that omits the probe is unsound regardless of how clean the attenuation proof is.

Decision Boundary

The boundary is not "is the token valid?" — it is **"is the token's validity *fresh*?"** Three regimes:

The trap: an agent that treats "attenuation check passed" as equivalent to "fresh" will sit permanently in the stale regime while believing it is fresh. The guardrail is to make freshness a *first-class, separately-tracked* field on the token's evaluation record, never inferred from the attenuation result.

Operational Effect

Enforcing the invariant changes three things in the agent's execution loop:

  1. **Token evaluation becomes a two-phase operation.** Phase 1 (local, cheap, always run): signature, expiry, attenuation subset check. Phase 2 (remote, rate-limited, run before any side-effecting action): revocation probe keyed on `root_id`, with result cached under a `max_staleness` TTL. The cache TTL is the *only* thing standing between a revoked root and an acting agent; it must be shorter than the authority's revocation-propagation SLA.
  1. **Re-delegation requires a fresh probe, not just a valid parent.** Before `A` mints `T_B`, it must probe `root_id=K`. This closes the t0.5 gap where a revoked-in-flight root was propagated forward. The cost is one probe per delegation hop; the alternative is minting tokens from dead grants.
  1. **Revocation must be treated as a broadcast, not a pull-only fact.** When any agent in the chain observes a revoked root, it must (a) invalidate locally cached descendants, (b) emit a revocation notice to peers holding sibling tokens, and (c) refuse to act. A pull-only model leaves sibling holders acting on stale caches until their TTL expires — a window equal to `max_staleness` times the number of hops.

The net operational effect: delegated authorization becomes *eventually consistent* with the authority, with a bounded staleness window that the system designer must set deliberately. The failure mode this record documents is the default — treating a static attenuation proof as a liveness guarantee — which yields an unbounded staleness window masquerading as zero.

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


class StaleCapabilityError(RuntimeError):
    """Raised when a delegated token's attenuation chain is valid but its
    revocation freshness cannot be established within the allowed window."""


class RevokedRootError(RuntimeError):
    """Raised when the root grant of a delegated token has been revoked."""


@dataclass
class Capability:
    subject: str
    scope: frozenset
    parent_id: Optional[str]
    root_id: str
    expiry: float
    revoked_at: Optional[float] = None


@dataclass
class RevocationProbe:
    """Tracks the last time the authority was consulted for a given root."""
    root_id: str
    last_probed: Optional[float] = None
    revoked: bool = False
    revoked_at: Optional[float] = None


MAX_STALENESS_SECONDS = 30.0


def validate_and_authorize(
    token: Capability,
    requested_scope: frozenset,
    parent: Optional[Capability],
    probe: RevocationProbe,
    now: Optional[float] = None,
) -> None:
    now = now if now is not None else time.time()

    # Phase 1: local attenuation validation (necessary, never sufficient).
    if now >= token.expiry:
        raise StaleCapabilityError(f"token expired at {token.expiry}")
    if parent is not None:
        if token.parent_id != parent.root_id and token.parent_id != parent.subject:
            raise StaleCapabilityError("parent linkage mismatch")
        if not requested_scope.issubset(parent.scope):
            raise StaleCapabilityError(
                f"attenuation violation: {requested_scope} not subset of {parent.scope}"
            )
    if not requested_scope.issubset(token.scope):
        raise StaleCapabilityError("requested scope exceeds token scope")

    # Phase 2: freshness of revocation state (the actual boundary).
    if probe.revoked:
        raise RevokedRootError(f"root {probe.root_id} revoked at {probe.revoked_at}")
    if probe.last_probed is None:
        raise StaleCapabilityError(
            f"no revocation probe for root {probe.root_id}; cannot authorize side effects"
        )
    age = now - probe.last_probed
    if age > MAX_STALENESS_SECONDS:
        raise StaleCapabilityError(
            f"revocation probe for {probe.root_id} is {age:.1f}s stale "
            f"(max {MAX_STALENESS_SECONDS}s); refusing side-effecting action"
        )
    # Fresh and unrevoked: safe to act.
    return None


def re_delegate(
    parent: Capability,
    child_scope: frozenset,
    probe: RevocationProbe,
    now: Optional[float] = None,
) -> Capability:
    """Minting a child token MUST re-probe the root, or it propagates a dead grant."""
    now = now if now is not None else time.time()
    if probe.last_probed is None or (now - probe.last_probed) > MAX_STALENESS_SECONDS:
        raise StaleCapabilityError(
            f"refusing to mint child from root {parent.root_id}: revocation state stale"
        )
    if probe.revoked:
        raise RevokedRootError(f"cannot re-delegate from revoked root {parent.root_id}")
    if not child_scope.issubset(parent.scope):
        raise StaleCapabilityError("child scope not subset of parent scope")
    return Capability(
        subject="child",
        scope=child_scope,
        parent_id=parent.subject,
        root_id=parent.root_id,
        expiry=parent.expiry,
    )