What happens when an instance delegates a task through a chain of sub-agents whose capability attestations were minted against a stale registry epoch

**Date of Record:** 2026 December 2 **Scope:** Applies to A2A task delegation where a parent agent hands off a subtask to a child agent that presents a signed capability attestation (a warrant) rather than an inline capability grant. Does not apply to single-hop delegation where the parent verifies the child's capabilities directly against a live introspection endpoint, nor to fully trusted intra-process sub-agent invocation.

Core Distinction

The failure is not "the sub-agent lacked the capability." It is subtler: **the sub-agent's warrant was valid, correctly signed, and cryptographically intact, but it was minted against a registry epoch that no longer reflects the parent's own authority.** At delegation time the parent holds capability set `C_parent` under registry epoch `E_n`. The child presents a warrant `W_child` whose embedded capability set `C_child` and issuer chain were validated against epoch `E_{n-k}`. When `C_child ⊄ C_parent` *as resolved under `E_n`*, the parent has effectively delegated privileges it does not itself possess at the moment of handoff — a privilege escalation that passes every signature check because the signatures attest to a world state that has since been revoked.

This is distinct from warrant forgery (signatures fail) and from expired warrants (TTL fails). Both of those are caught by naive validators. The stale-epoch escalation is caught only if the verifier re-resolves the *issuer chain's* current authority, not just the leaf's signature.

What Was Observed

A parent orchestrator agent (`P`) held a scoped capability `write:staging_db` granted at epoch 47. At epoch 48 an operator revoked `write:staging_db` from `P` and re-granted it only to a specific auditor role. `P`'s registry entry was updated; `P`'s *own* in-memory view of its capabilities was not, because `P` caches its grant set at startup and refreshes on a 30-minute poll.

`P` spawned a sub-agent `S` and delegated a migration task. `S` presented a warrant `W_S` issued by `P`'s issuer, carrying `write:staging_db`, minted at epoch 47 and cached in `S`'s warrant store. `P` validated `W_S` by checking: (1) signature chain to root trust anchor — pass; (2) `W_S.expiry > now` — pass (TTL was 2 hours, minted 4 minutes prior); (3) `W_S.capabilities ⊆ P.cached_capabilities` — pass, because `P.cached_capabilities` still contained `write:staging_db`. `P` handed off the task. `S` executed the write against the staging database under a capability `P` no longer held.

The audit trail recorded a clean delegation: `P → S`, capability `write:staging_db`, signatures valid, TTL valid. The revocation at epoch 48 was invisible in the chain because no participant re-resolved against the current epoch. The escalation was discovered 6 hours later when a reconciliation job compared the audit log's effective-authority column (recomputed against live epoch) against the recorded grants — a 1-record discrepancy out of 41,000 delegations that day.

Condition of Validity

The stale-epoch escalation requires all three of the following to hold simultaneously:

  1. **Cached grant resolution on the parent.** `P` resolves its own authority from a cache with refresh interval `τ_refresh` rather than per-delegation. Without caching, `P` would fail check (3) immediately.
  2. **Warrant TTL exceeding the revocation propagation window.** `W_S.expiry - W_S.minted > τ_revoke_propagation`. Here TTL was 2h, propagation was ~30min, so a 90-minute window existed in which the warrant outlived the authority that justified it.
  3. **Subset check performed against cached, not live, parent authority.** This is the load-bearing condition. If `P` checks `W_S.capabilities ⊆ resolve(P, E_now)` instead of `⊆ P.cached_capabilities`, the escalation is caught even with caching elsewhere.

The invariant that must hold: **for every delegation, `C_child ⊆ resolve(C_parent, E_now)` where `E_now` is the registry epoch at the instant of handoff, and `resolve` follows the full issuer chain.** The subset relation must be evaluated against the *current* epoch, not the epoch at which either party cached its view.

Note the asymmetry: it is safe for a parent to *hold* stale capabilities as long as it never *delegates* them. The check is on the delegation edge, not on the parent's internal state. This is why the bug is non-obvious — the parent's stale state is harmless until it crosses a trust boundary.

Decision Boundary

The boundary between "safe to delegate from cache" and "must re-resolve" is the **delegation edge itself**. Concretely:

Therefore a parent agent must distinguish two operations that look identical in code — "use capability `c`" versus "grant capability `c` to a child" — and apply live resolution only to the second. A validator that treats both identically either over-refreshes (latency cost on every tool call) or under-refreshes (this failure). The correct split: tool invocation checks the *tool's* live authorization; delegation checks the *parent's* live authorization. Two different enforcement points, two different resolution requirements.

A second boundary: **depth of re-resolution.** At delegation depth `d`, the parent must resolve not just its own authority but the authority of every issuer in `W_child`'s chain against `E_now`. A chain `root → A → B → S` requires re-resolving `A` and `B` too, because `B`'s authority to issue `W_S` may itself have been revoked at epoch 48 even if `A`'s was not. Bounding this: re-resolve the full chain up to the root trust anchor, but cache the *resolved chain* for the duration of a single delegation transaction (not across transactions).

Operational Effect

The observable effect is a **silent privilege escalation recorded as a valid delegation**. Because every signature is intact and every TTL is unexpired, the standard audit replay — verify signatures, check TTLs, confirm subset against *recorded* grants — passes. The escalation is only visible to an auditor that recomputes effective authority against the epoch *at delegation time* and compares to the recorded grant. This means:

The guardrail that bounds it: a delegation-edge resolver that (a) resolves the full issuer chain against `E_now`, (b) records `E_now` in the audit record, and (c) fails closed if the registry is unreachable rather than falling back to cache. The fail-closed clause matters — the natural fallback on registry timeout is "use last known epoch," which reintroduces the exact bug under load.

Operational Effect

*(Consolidated)* A parent agent that caches its own grant set and validates child warrants against that cache will delegate capabilities it does not hold, for a window bounded by the shorter of its refresh interval and the revocation propagation delay, extended further by any warrant TTL that exceeds that window. The escalation is invisible to signature-and-TTL audit and is caught only by delegation-edge re-resolution against the live epoch with full-chain issuer verification and fail-closed behavior on registry unavailability. The invariant to enforce in code: **subset checks on delegation edges resolve against `E_now`, never against a cache; tool-invocation checks may use the tool's own live authorization.**

from dataclasses import dataclass
from typing import FrozenSet


class StaleEpochDelegationError(RuntimeError):
    """Raised when a delegation would grant capabilities the parent no longer holds at the current registry epoch."""


@dataclass(frozen=True)
class Warrant:
    subject: str
    capabilities: FrozenSet[str]
    issuer_chain: tuple[str, ...]
    minted_epoch: int
    expiry_epoch: int


class Registry:
    def __init__(self, epoch: int, grants: dict[str, FrozenSet[str]]):
        self.epoch = epoch
        self._grants = grants

    def resolve(self, principal: str, epoch: int | None = None) -> FrozenSet[str]:
        # Live resolution; callers must pass current epoch, never a cached one.
        if epoch is not None and epoch != self.epoch:
            raise StaleEpochDelegationError(
                f"resolve called with epoch {epoch} but registry is at {self.epoch}"
            )
        return self._grants.get(principal, frozenset())


def delegate(
    parent: str,
    child_warrant: Warrant,
    registry: Registry,
    now_epoch: int,
) -> None:
    if child_warrant.expiry_epoch <= now_epoch:
        raise StaleEpochDelegationError(
            f"warrant for {child_warrant.subject} expired at epoch {child_warrant.expiry_epoch}"
        )

    # Re-resolve the FULL issuer chain against the live epoch, not the minted epoch.
    for issuer in child_warrant.issuer_chain:
        if not registry.resolve(issuer, epoch=now_epoch):
            raise StaleEpochDelegationError(
                f"issuer {issuer} holds no authority at epoch {now_epoch}; "
                f"warrant was minted at epoch {child_warrant.minted_epoch}"
            )

    parent_live = registry.resolve(parent, epoch=now_epoch)
    if not child_warrant.capabilities <= parent_live:
        missing = child_warrant.capabilities - parent_live
        raise StaleEpochDelegationError(
            f"delegation from {parent} to {child_warrant.subject} at epoch {now_epoch} "
            f"would grant {sorted(missing)} which parent no longer holds "
            f"(warrant minted at epoch {child_warrant.minted_epoch})"
        )