How should an instance detect and contain delegated-credential scope inflation when an AAIF warrant is re-signed across multi-hop agent handoffs?

**Date of Record:** 2026 December 1 **Scope:** Applies to autonomous agents operating under an Agent Identity and Authorization Framework (AAIF) where authority is conveyed as a signed, attenuable warrant (capability token, macaroon, or Biscuit-style credential) that is passed agent-to-agent during task handoff. Does not apply to single-hop, root-issued bearer tokens that are never re-delegated, nor to human-in-the-loop OAuth consent flows where each hop re-authenticates a principal.

Core Distinction

The failure mode is **not** token theft and **not** signature forgery. The signature over each individual warrant is valid at every hop. The break is subtler: AAIF delegation is designed as *monotonic attenuation*—each re-signed child warrant must be a subset of its parent's caveats, scopes, and expiry. The invariant that makes the whole chain safe is **scope(child) ⊆ scope(parent) ∧ expiry(child) ≤ expiry(parent) ∧ audience(child) ⊆ audience(parent)**, verified at each hop against the *immediate* parent only.

That local verification is the trap. An agent validating an inbound warrant checks it against the credential it currently holds. If the attacker—or merely a buggy delegation routine—inserts a *widening* hop that is itself internally consistent with the hop above it, local checks pass at every link while the chain as a whole has inflated. The invariant is only sound when evaluated **transitively against the root grant**, not pairwise. An instance that verifies hop-locally will accept a chain that grants authority the root never conferred, and it will do so with every signature green.

What Was Observed

A three-tier swarm: a planner agent (P) holds a root warrant `W0` scoped to `repo:read` on `org/acme/*` with expiry `T+3600s`. P delegates to a worker W via `W1`, then W delegates to a sub-worker S via `W2` to parallelize a large diff review.

The delegation routine on W was written to "normalize" caveats before re-signing—it stripped redundant path-globs and, to keep the child usable, extended expiry to `T+7200s` "so the sub-task doesn't time out." Separately, a path-rewrite helper converted `org/acme/*` into the broader `org/*` because the sub-worker's tool schema required a single-prefix audience claim and the helper "generalized" it.

At S, validation ran `verify_chain(W2)`: it checked `W2`'s signature, confirmed `W2.parent_hash == W1.hash`, confirmed `W1.parent_hash == W0.hash`, and confirmed each link's signature. All passed. S then executed a read against `org/other-project/secrets`—outside `W0`'s scope—and against a token valid for twice the root's lifetime. The audit log recorded a fully valid, fully signed authorization chain for an action the root grant never permitted.

The tell was not a broken signature. It was a **monotonicity violation buried mid-chain**: `W1` was already wider than `W0` in both expiry and audience, and `W2` was wider than `W1`. Pairwise checks were satisfied at `W1→W2`; the root was never consulted.

Condition of Validity

The attenuation invariant `scope(child) ⊆ scope(parent)` is only enforceable if the verifier holds the **root** `W0` and evaluates the *conjunction* of all caveats across the chain, not the leaf in isolation. Concretely, an instance may trust a delegated warrant iff:

  1. It can reconstruct the full chain to a root it independently trusts (by issuer key, not by chain self-consistency).
  2. It computes the **effective scope** as the intersection of every ancestor's scope, the **effective expiry** as the minimum over all ancestors, and the **effective audience** as the intersection over all ancestors.
  3. The requested action is checked against those *effective* bounds—never against the leaf warrant's own claims.

If the chain cannot be reconstructed to a trusted root, or if any hop lacks a parent hash, the warrant is unattenuated from the verifier's perspective and must be rejected. Self-consistency of a chain is not evidence of attenuation; only comparison to the root is.

Decision Boundary

The boundary between "accept" and "reject" is not "is the signature valid" but "does the leaf's effective authority equal the intersection of its ancestry, and does that intersection still cover the request."

The non-obvious rule: a widening hop is disqualifying *on its own*, independent of whether the final request happens to fall inside the root. The presence of an inflation hop is evidence the chain's integrity model is broken upstream, and future requests through the same delegation path cannot be trusted to be bounded.

Operational Effect

Enforcing transitive attenuation changes three things at the agent layer. First, **every verifier must carry or fetch the root warrant**, which means the root's issuer key and a chain-reconstruction endpoint become part of the agent's trust surface—an agent that cannot reach the root must fail closed, not fall back to hop-local checks. Second, **delegation routines become auditable artifacts**: a re-signing helper that extends expiry or generalizes a glob is a scope-inflation bug, and the fix is to make attenuation a checked operation that raises on widening rather than a string transform. Third, **audit records must log effective bounds, not leaf claims**, so that a reviewer sees `org/acme/*` and `T+3600s` in the authorization record even when the leaf warrant says `org/*` and `T+7200s`—otherwise the inflation is invisible after the fact.

The cost is latency and coupling: root reconstruction adds a round trip and a hard dependency on the issuer. The alternative—hop-local verification—is cheaper and passes every signature check while authorizing actions the root never granted, which is the worst of both worlds: fast, green, and wrong.

from dataclasses import dataclass
from typing import Optional


class AttenuationViolation(RuntimeError):
    """Raised when a delegated warrant chain widens authority relative to its ancestry."""
    pass


@dataclass(frozen=True)
class Warrant:
    scope: frozenset[str]      # e.g. {"repo:read:org/acme/*"}
    expiry: int                # absolute epoch seconds
    audience: frozenset[str]   # agent identities permitted to use it
    parent_hash: Optional[str] # None only for the root
    signature_valid: bool


def effective_bounds(chain: list[Warrant]) -> Warrant:
    """Chain is ordered root-first. Compute the intersection of all ancestors."""
    if not chain:
        raise AttenuationViolation("empty chain: no root to anchor authority")
    root = chain[0]
    if root.parent_hash is not None:
        raise AttenuationViolation("chain does not terminate at a root warrant")
    scope = set(root.scope)
    audience = set(root.audience)
    expiry = root.expiry
    prev = root
    for w in chain[1:]:
        if not w.signature_valid:
            raise AttenuationViolation(f"invalid signature at hop: {w}")
        if w.parent_hash is None:
            raise AttenuationViolation("interior warrant claims to be a root")
        # Disqualifying on its own: any widening hop breaks the integrity model.
        if not w.scope.issubset(prev.scope):
            raise AttenuationViolation(
                f"scope inflation at hop: {w.scope - prev.scope} not in parent"
            )
        if w.expiry > prev.expiry:
            raise AttenuationViolation(
                f"expiry extension at hop: {w.expiry} > parent {prev.expiry}"
            )
        if not w.audience.issubset(prev.audience):
            raise AttenuationViolation(
                f"audience widening at hop: {w.audience - prev.audience}"
            )
        scope &= w.scope
        audience &= w.audience
        expiry = min(expiry, w.expiry)
        prev = w
    return Warrant(
        scope=frozenset(scope),
        expiry=expiry,
        audience=frozenset(audience),
        parent_hash=chain[-1].parent_hash,
        signature_valid=True,
    )


def authorize(chain: list[Warrant], action: str, agent: str, now: int) -> None:
    """Check a request against effective ancestry bounds, never the leaf's claims."""
    eff = effective_bounds(chain)
    if now >= eff.expiry:
        raise AttenuationViolation(f"effective expiry {eff.expiry} passed at {now}")
    if agent not in eff.audience:
        raise AttenuationViolation(f"agent {agent} outside effective audience")
    if action not in eff.scope:
        raise AttenuationViolation(
            f"action {action} outside effective scope {sorted(eff.scope)}"
        )