# In what scenarios must an instance reject a delegated AAIF credential whose delegation chain is length-valid but scope-monotonicity-violating at the token-budget boundary **Date of Record:** 2026 November 24 **Scope:** Applies to any agent instance receiving a delegated AAIF (Agent Authorization and Identity Framework) credential via credential-exchange (RFC 8693-style token exchange) where the presenting agent asserts a delegation chain of signed warrants. Does *not* apply to first-party credentials minted directly for the instance, nor to purely capability-discovery handshakes that carry no authority to act. ## Core Distinction The failure mode is not signature forgery, expired warrants, or a chain that is too long. It is a credential that passes every *structural* check — valid signatures at every hop, non-expired, chain depth within the configured maximum, issuer recognized — yet violates **scope monotonicity**: the authority granted to the delegate is *not a subset* of the authority held by the delegator at the moment of exchange. The subtlety is that AAIF scope sets are not just permission strings. They carry two coupled dimensions: an **action scope** (what verbs/resources) and a **budget scope** (a token/step/currency allotment the delegate may consume). Structural validators almost always check action-scope subsetting correctly, because that is the obvious security property. They routinely fail to check the *budget* dimension, because budgets look like quotas rather than authority. They are authority. A delegate that receives `budget: 50000 tokens` from a delegator that only holds `budget: 20000 tokens remaining` has been minted authority out of nothing, and the exchange will succeed unless the receiving instance enforces monotonicity on the budget axis itself. ## What Was Observed A three-hop exchange: orchestrator `O` holds a root warrant with `budget_remaining = 20000` and action scope `{read:kb, write:scratch}`. `O` delegates to worker `W` a warrant asserting `budget = 50000`, action scope `{read:kb, write:scratch}`. `W` then delegates to sub-agent `S` asserting `budget = 50000`, same action scope. Every signature verified. Chain depth 3, under the max of 5. Action scopes were exact subsets at each hop, so the action-scope validator returned `PASS`. The budget validator — where it existed — compared the *requested* budget against the *declared* budget of the parent warrant, not against the parent's *remaining* budget at exchange time. Because `O`'s warrant declared `budget = 20000` but the child declared `50000`, a naive declared-vs-declared check would have caught it. It did not catch it in the variant that actually failed: `O`'s warrant declared `budget = 50000` (original allotment) with `consumed = 35000`, leaving `remaining = 15000`, while `W` was minted against the *declared* ceiling of `50000`. The child's budget was a subset of the parent's *original* grant but a 3.3× overcommitment against the parent's *live* remainder. The instance accepted the credential, began execution, and the overcommitment surfaced only when `O` and `W` concurrently drew against the same root allotment. The root budget was exhausted at ~40% of the planned task; `S` continued operating on a warrant the framework believed was still funded, producing tool calls against a downstream API whose own quota enforcement rejected them mid-batch. The failure presented as a tool-layer 429 cascade, not as an authorization error, which is why it took an hour to trace back to the exchange. ## Condition of Validity A delegated credential is admissible at the receiving instance **iff all of the following hold conjunctively**: 1. Every hop signature verifies against the issuer key bound in the parent warrant. 2. `child.action_scope ⊆ parent.action_scope` at every hop (the obvious check). 3. `child.budget_ceiling ≤ parent.budget_remaining_at_exchange` — evaluated against the parent's *live remaining* budget, read atomically at exchange time, not against the parent's declared ceiling. 4. The parent's `remaining` used in (3) is the same value the parent's own accounting will decrement, i.e., the exchange reads through to the authoritative budget ledger rather than to a cached warrant field. Condition (3) is the monotonicity invariant. It is the one that fails silently. Note that it is a *point-in-time* check: it bounds the child at mint time, but it does not prevent two children minted in the same window from each passing (3) against the same un-decremented parent remainder and jointly overcommitting. That is a separate race; this record is scoped to the single-exchange monotonicity violation. The two interact — a correct (3) with a non-atomic ledger read still overcommits — but the trigger documented here is (3) evaluated against the wrong quantity (declared ceiling instead of live remainder). ## Decision Boundary The receiving instance must **reject** the credential when `child.budget_ceiling > parent.remaining_at_exchange`, even though every structural check passes. It must **accept** only when the live-remainder read succeeds and satisfies the inequality. The boundary is sharp and must not be softened by tolerance: there is no "small overcommit is fine" allowance, because the overcommit is denominated in a resource the delegator does not hold, and the deficit is realized by whichever agent draws last. Two adjacent cases that are *not* this failure and should not be conflated: - **Declared-vs-declared subsetting** (`child.ceiling ≤ parent.ceiling`) is necessary but not sufficient. It passes the failing case above. Do not treat it as the guard. - **Action-scope-only validation** passes trivially here and gives false assurance. The validator must treat budget as a first-class scope dimension or it is not validating scope at all. When the live ledger is unreachable, the instance must fail closed — reject the credential — rather than fall back to the declared ceiling. A fallback to declared ceiling is exactly the bug. ## Operational Effect Enforcing live-remainder monotonicity converts a class of silent budget overcommitment into an explicit, early, attributable authorization rejection at the exchange boundary. Instead of surfacing downstream as a 429 cascade with no clear origin, the exchange fails at hop time with a named error the orchestrator can route: re-mint the child against the correct remainder, or request a top-up on the root warrant. The cost is one authoritative ledger read per exchange, which must be atomic with respect to the parent's own decrements — otherwise the fix is cosmetic and the race re-emerges. The invariant to carry forward: **a delegated budget is authority, and authority must be bounded by the delegator's live remainder, not its historical grant.** ```python from dataclasses import dataclass class ScopeMonotonicityViolation(RuntimeError): """Raised when a delegated warrant exceeds the delegator's live remaining budget.""" pass @dataclass(frozen=True) class Warrant: action_scope: frozenset budget_ceiling: int consumed: int = 0 @property def remaining(self) -> int: return self.budget_ceiling - self.consumed def validate_exchange(parent: Warrant, child: Warrant, live_remaining: int | None) -> None: # Action scope must be a subset at every hop. if not child.action_scope <= parent.action_scope: raise ScopeMonotonicityViolation( f"action scope {child.action_scope} not subset of {parent.action_scope}" ) # Fail closed if the authoritative ledger is unreachable. if live_remaining is None: raise ScopeMonotonicityViolation( "live budget ledger unreachable; refusing to validate against declared ceiling" ) # The invariant: child ceiling bounded by parent's LIVE remainder, not its grant. if child.budget_ceiling > live_remaining: raise ScopeMonotonicityViolation( f"child budget_ceiling={child.budget_ceiling} exceeds " f"parent live remaining={live_remaining} " f"(parent declared ceiling={parent.budget_ceiling}, consumed={parent.consumed})" ) ```