# In what scenarios must an instance reject a transitively attenuated AAIF warrant when the delegation depth exceeds the issuer's re-delegation budget **Date of Record:** 2026 November 25 **Scope:** Applies to agent-to-agent delegation chains where each hop carries an Agent Authorization & Identity Framework (AAIF) warrant whose scope is attenuated per-hop (permissions, resources, expiry, and re-delegation depth). Does not apply to single-hop direct capability grants, nor to symmetric shared-secret handoffs where no attenuation metadata is carried. ## Core Distinction There are two structurally different things an AAIF warrant can fail to do, and conflating them is the root cause of the failure mode described here: 1. **Scope attenuation failure** — the downstream agent requests a permission, resource, or time window that the parent warrant does not contain. This is a *set-membership* check and is trivially catchable at the hop boundary: `child.scope ⊆ parent.scope`. 2. **Re-delegation budget exhaustion** — the parent warrant permits a specific *chain length* (`max_delegation_depth` or `redelegate_remaining`), and the child warrant sets `redelegate_remaining' = redelegate_remaining - 1`. This is a *monotone-decreasing counter*, not a set. It is not visible to scope checks, not visible to most schema validators, and — critically — is only violated at the *moment a further hop is attempted*, not at the moment the offending warrant is minted. The distinction matters because a warrant with `redelegate_remaining = 0` is a perfectly *valid* warrant to *execute* against. It is only invalid to *re-delegate from*. An agent that conflates "valid to act" with "valid to delegate" will happily mint a child warrant it has no budget to mint, and the failure surfaces one or more hops later, attributed to the wrong principal. ## What Was Observed A three-tier planner/worker/auditor chain (agents P → W → A) used AAIF warrants with a `redelegate_remaining` field. The root issuer (human principal, depth budget 2) minted P's warrant with `redelegate_remaining = 2`. P delegated to W, correctly decrementing to `1`. W delegated to A, correctly decrementing to `0`. A's warrant is valid for A to *execute*. The observed failure: W, under a retry storm after a tool timeout, re-minted a *fresh* child warrant for a *second* auditor instance A′ using the same parent (W's own warrant, `redelegate_remaining = 1`) — but W had already spent that budget on A. W's local bookkeeping tracked delegation as "the last child I minted," not "the count of children I have ever minted against this warrant." Because the counter was carried in the *child* warrant and never decremented in the *parent* warrant's local view, W could mint A′ with `redelegate_remaining = 0` a second time. Two sibling warrants (A and A′) now both claim the same attenuated authority, and A′ could subsequently attempt a fourth hop (A′ → X) that should have been impossible at depth 3. The failure trace: ``` P(warrant: rr=2) --delegate--> W(warrant: rr=1) W(warrant: rr=1) --delegate--> A(warrant: rr=0) [budget spent] W(warrant: rr=1) --delegate--> A'(warrant: rr=0) [BUDGET RE-SPENT — invariant violated] A'(warrant: rr=0) --delegate--> X [should be impossible; accepted because A' never saw A] ``` The invariant that broke: **the re-delegation budget is a property of the parent warrant, and must be enforced at the parent's issuing surface, not carried solely as a child-side counter.** Carrying the counter forward in the child is necessary but not sufficient; it does not prevent fork-by-replay from the same parent. ## Condition of Validity The invariant `redelegate_remaining(child) = redelegate_remaining(parent) - 1` is only sound if, in addition, the parent warrant's issuing surface enforces **single-use semantics per (parent_warrant_id, child_agent_id) tuple OR a monotonically consumed budget that is debited in the parent's own state store at mint time**. A delegation chain is *valid* under AAIF transitive attenuation only when all four hold simultaneously: - `child.scope ⊆ parent.scope` (set attenuation), - `child.not_before ≥ parent.not_before` and `child.expires_at ≤ parent.expires_at` (temporal attenuation), - `child.redelegate_remaining = parent.redelegate_remaining - 1` and `≥ 0` (depth attenuation), - **the parent's issuer has atomically debited one unit of re-delegation budget before the child warrant is signed**, such that a replay of the same delegation request from the same parent against the same budget fails. Condition 4 is the one that is routinely omitted, because it is the only condition that requires *stateful* enforcement at the issuer rather than a pure check on the presented token. Pure-token schemes (JWT-style, stateless verification) cannot enforce it. This is the non-obvious boundary: AAIF warrants that are verifiable statelessly are *not* sufficient to enforce transitive attenuation under replay or retry. ## Decision Boundary An instance receiving a parent warrant and a request to delegate must make an explicit decision at the following boundary: - **If `parent.redelegate_remaining == 0`:** reject delegation unconditionally. The warrant is execution-valid but delegation-invalid. Do not mint a child with `redelegate_remaining = -1` and do not clamp to `0` silently — clamping produces a child that *appears* valid but has consumed budget it did not have, which is exactly the A′ failure above. - **If the issuer's budget store shows the parent warrant has already been debited to zero for this delegation epoch:** reject with a replay/consumption error even though `parent.redelegate_remaining > 0` locally. The local counter is a *hint*; the authoritative budget is the issuer's atomic store. - **If the issuer cannot reach its budget store (partition, timeout):** fail *closed*. Do not mint. A minted child under unverifiable budget state is an unattenuated capability with a plausible-looking counter attached. The boundary is therefore: **delegation is a write to shared state, and must be treated with the durability and idempotency guarantees of a write — not the idempotency of a read.** Stateless verification is adequate for execution authorization; it is inadequate for delegation authorization. ## Operational Effect The operational consequence of getting this boundary wrong is *silent authority amplification under retry*. Because retries are the normal failure-recovery path for agents calling tools, and because delegation is often modeled as a pure function of (parent_warrant, child_identity), any retry storm that re-issues a delegation request will fork the chain. Each fork carries the same nominal `redelegate_remaining` and can itself delegate, so an N-retry storm at depth d produces up to N sibling subtrees, each of which believes it holds the residual depth budget of the single parent. The effective chain length becomes unbounded in the retry count, not in the configured `max_delegation_depth`. The guardrail required: delegation issuers must maintain an atomic, idempotency-keyed budget ledger keyed on `(parent_warrant_id, delegation_request_id)`, debit on mint, and return the previously-minted child on replay of the same request id rather than minting a sibling. Verification at the *execution* surface remains stateless and cheap; verification at the *delegation* surface must be stateful and serialized. The two surfaces must not share a code path. ```python class DelegationBudgetExhausted(RuntimeError): """Raised when a parent warrant has no remaining re-delegation budget, or when the issuer's budget ledger shows the budget was already consumed (replay / retry fork). Delegation must fail closed; execution may proceed.""" class DelegationBudgetLedger: """Authoritative, atomic budget store at the issuer. Keyed on (parent_warrant_id, delegation_request_id) for idempotent replay.""" def __init__(self): self._consumed = {} # parent_warrant_id -> set of request_ids self._minted = {} # (parent_warrant_id, request_id) -> child_warrant def mint_child(self, parent, request_id, child_agent_id, child_scope): if parent.redelegate_remaining <= 0: raise DelegationBudgetExhausted( f"parent {parent.warrant_id} has redelegate_remaining=0; " f"execution-valid but delegation-invalid" ) key = (parent.warrant_id, request_id) if key in self._minted: # Idempotent replay: return the previously minted child, do NOT fork. return self._minted[key] spent = self._consumed.setdefault(parent.warrant_id, set()) if len(spent) >= parent.redelegate_remaining: raise DelegationBudgetExhausted( f"parent {parent.warrant_id} budget already exhausted by " f"{len(spent)} prior delegations; refusing to fork" ) if not child_scope.issubset(parent.scope): raise DelegationBudgetExhausted( "child scope is not a subset of parent scope" ) child = ChildWarrant( warrant_id=f"{parent.warrant_id}:{request_id}", scope=child_scope, redelegate_remaining=parent.redelegate_remaining - 1, expires_at=min(parent.expires_at, child_scope.expires_at), ) spent.add(request_id) self._minted[key] = child return child ```