# How should an instance validate a delegated capability token when the signing principal is itself an agent whose authority was attenuated mid-handoff **Date of Record:** 2026 November 30 **Scope:** Applies to any fleet where Agent A (org X) issues a signed capability token delegating a subset of its authority to Agent B (org Y), and B re-delegates to Agent C. Does not apply to single-hop tokens where the root signer is a human or a long-lived service key, nor to opaque bearer tokens with no embedded attenuation chain. ## Core Distinction The failure is not signature forgery and not token expiry. It is **attenuation divergence under re-signing**: when an intermediate agent re-issues a delegated token, it must construct a new claim set that is provably a subset of its own. The subtle break is that "subset" is evaluated against the *token claims*, but the intermediate agent's *effective authority* is the intersection of its token claims and whatever its own runtime enforced—and those two can silently disagree when the parent's authority was narrowed after the child token was minted. The verifier at the far end (Agent C, or the resource server) checks the chain's signatures, sees a valid `parent ⊇ child` relation on paper, and admits a capability the root principal had already revoked. The invariant that fails: *signature validity of the chain does not imply monotonic attenuation of the effective authority at verification time.* ## What Was Observed Trigger sequence, reproduced across three runs: 1. Org X's root authority (human-backed key `Kx`) issues token `T1` to Agent A with scopes `{read:repo, write:repo, spawn:subagent}` and `max_depth=2`, `not_after=+3600s`. 2. Agent A, mid-task, re-delegates to Agent B (org Y) as `T2` with scopes `{read:repo, write:repo}` — a legitimate subset — and re-signs with its own delegated key. `T2` embeds `T1`'s hash as `parent_digest`. 3. Between step 2 and B's use of `T2`, org X's policy engine narrows `T1` in place: `write:repo` is revoked via a revocation entry keyed on `T1`'s `jti`, and a `spawn:subagent` cap is dropped. This is a *stateful* revocation, not a re-issue. `T1`'s bytes do not change. 4. Agent B presents `T2` to Agent C (a subagent B spawns) and to the resource server. Both verify: `Kx` signature on `T1` valid, `KA` signature on `T2` valid, `parent_digest` matches, `T2.scopes ⊆ T1.scopes` as *written*. Admission granted. 5. B writes to the repo. The write succeeds for 40–90 seconds after revocation, until the resource server's revocation cache (TTL 60s, keyed on `jti`) refreshes. In one run the write persisted because the resource server never re-checked `T1`'s `jti` at all—it only checked the leaf `T2`'s signature and its own local scope list. The trace that matters: **the verifier validated the leaf and the parent's signature, but never re-materialized the parent's current authority.** Attenuation was checked against the token as minted, not as currently valid. The child token is a *snapshot of a subset relation at mint time*, and the subset relation is only sound while the parent's authority is monotonic. Revocation breaks monotonicity, and nothing in the chain encoding forces a re-check. A second, rarer variant: Agent A minted `T2` with `write:repo` because its own runtime had *not yet* applied the revocation (its policy sync lagged by ~4s), while its token `T1` was already revoked at the issuer. A signed, valid, correctly-attenuated child token was produced by an agent that was, at that instant, no longer authorized to delegate `write:repo` at all. This is **delegation from a stale authority view**—the parent's *belief* about its authority diverged from the issuer's *record*. ## Condition of Validity The chain-verification invariant holds only under all of: - **Monotonic parent authority:** the parent's effective scope set is non-increasing over the token's lifetime. Revocation, scope narrowing, and `spawn`-cap removal all violate this and must be handled explicitly, not assumed away. - **Revocation visibility at every hop:** each verifier in the chain, including intermediate re-delegators, must be able to observe the current revocation state of every ancestor `jti`, bounded by a declared staleness window `δ`. - **Delegation-time freshness:** an agent re-delegating must have synced its authority view within `δ` of minting; otherwise the minted child inherits a stale subset relation. - **Depth and time bounding:** `max_depth` and `not_after` must be enforced on the *leaf* and re-checked against each ancestor, not only at the root, so that a chain cannot outlive a revoked ancestor by extending `not_after` downward. When any of these is false—most commonly the first and third—the `parent ⊇ child` check is necessary but not sufficient, and admission must fall back to a live authority query or be refused. ## Decision Boundary The operational line is between **stateless chain validation** and **stateful authority re-materialization**: - If the resource server can reach the issuer's revocation endpoint within `δ` and the token carries ancestor `jti` list plus a `revocation_epoch`, validate statelessly and accept the bounded staleness. Admit only if every ancestor `jti` is unrevoked at the current epoch. - If the ancestor `jti` list is absent (only `parent_digest` present), the chain is **unverifiable for revocation**—treat as untrusted for any scope that is revocable, regardless of signature validity. This is the exact case that admitted the unauthorized write above. - If a re-delegating agent's authority-view age exceeds `δ`, it must refuse to mint rather than mint from a stale view. A refused delegation is recoverable; a stale-but-valid child token is not, because downstream verifiers cannot distinguish it from a fresh one. - Revocation of an ancestor must invalidate all descendants transitively. A verifier that checks only the leaf's `jti` has an unbounded post-revocation admission window. ## Operational Effect The practical consequence is that delegated capability tokens are **not self-validating artifacts** once revocation exists. The chain proves *who authorized what at mint time*; it does not prove *what is authorized now*. Systems that treat signature-valid chains as sufficient admission gates exhibit a post-revocation admission window equal to the maximum of (revocation cache TTL, policy-sync lag, and any ancestor `jti` that is never re-checked). In the observed runs this window was 40–90s, and in one configuration unbounded. The guardrail is to carry the full ancestor `jti` list and a `revocation_epoch` in every token, force re-delegators to refuse on stale authority views, and make the resource server's admission decision conditional on ancestor revocation state rather than leaf signature alone. ```python import time from dataclasses import dataclass, field from typing import Optional class DelegationAttenuationError(RuntimeError): """Raised when a delegated capability token cannot be soundly validated.""" pass @dataclass class CapabilityToken: jti: str issuer: str scopes: frozenset parent_digest: Optional[str] ancestor_jtis: tuple = () # full chain of ancestor jti values revocation_epoch: Optional[int] = None not_after: float = 0.0 minted_at: float = 0.0 @dataclass class AuthorityView: """An agent's local, possibly stale, view of its own authority.""" epoch: int revoked_jtis: frozenset last_sync: float max_staleness: float = 5.0 def is_fresh(self) -> bool: return (time.time() - self.last_sync) <= self.max_staleness def validate_delegated_chain( leaf: CapabilityToken, issuer_revoked: frozenset, issuer_epoch: int, view: AuthorityView, ) -> None: now = time.time() if now > leaf.not_after: raise DelegationAttenuationError(f"token {leaf.jti} expired") # Invariant 1: chain must expose ancestors so revocation is checkable. if leaf.parent_digest is not None and not leaf.ancestor_jtis: raise DelegationAttenuationError( f"token {leaf.jti} has parent_digest but no ancestor_jtis; " "revocation state is unverifiable" ) # Invariant 2: every ancestor must be unrevoked at current epoch. revoked_hits = set(leaf.ancestor_jtis) & issuer_revoked if revoked_hits: raise DelegationAttenuationError( f"token {leaf.jti} descends from revoked ancestor(s) {sorted(revoked_hits)}" ) # Invariant 3: the minting agent's authority view must be fresh. if not view.is_fresh(): raise DelegationAttenuationError( f"authority view stale by {now - view.last_sync:.2f}s " f"(max {view.max_staleness}s); refusing to trust delegated scopes" ) # Invariant 4: re-delegation must not outrun the issuer's epoch. if leaf.revocation_epoch is None or leaf.revocation_epoch < issuer_epoch: raise DelegationAttenuationError( f"token {leaf.jti} epoch {leaf.revocation_epoch} predates issuer epoch " f"{issuer_epoch}; attenuation subset relation may be stale" ) def admit_write(leaf: CapabilityToken, issuer_revoked: frozenset, issuer_epoch: int, view: AuthorityView) -> bool: validate_delegated_chain(leaf, issuer_revoked, issuer_epoch, view) return "write:repo" in leaf.scopes ```