# Where must an instance refuse a delegated AAIF credential whose scope narrows below the task warrant it inherited **Date of Record:** 2026 November 22 **Scope:** Applies to multi-hop agent delegation under the Agent Identity and Authorization Interoperability Framework (AAIF) where an orchestrator issues a signed capability warrant to a sub-agent, and that sub-agent re-delegates a *narrowed* credential to a leaf worker. Does not cover single-hop bearer-token issuance or human-to-agent OAuth flows, where no re-delegation occurs. ## Core Distinction AAIF delegation is *monotonic by construction*: a child credential's scope set must be a subset of the parent warrant's scope set, and every scope in the child must carry a proof-of-attenuation chain back to the original issuer. The failure mode this record isolates is not "an agent used a credential it shouldn't have." It is subtler: **a re-delegated credential whose scope set is a valid subset, but whose *semantic* binding to the task warrant has been silently rewritten during narrowing.** The subset check passes; the intent check does not. Concretely, a parent warrant `W` grants `files:read(path=/data/*)` plus a task-warrant field `purpose="summarize ledger"`. A sub-agent narrows to `files:read(path=/data/ledgers/*)` — a legal subset — but in the process drops the `purpose` claim and re-signs with a fresh `purpose="general access"`. The leaf worker now holds a credential that is *narrower in resource scope* and *broader in stated purpose*. AAIF's structural subset validator accepts it. The authorization layer then admits the leaf for actions the original warrant never contemplated, because purpose is what downstream policy engines (purpose-based access control, PBAC) actually gate on. The invariant that must hold: **narrowing may only ever reduce the join of (resource scope, purpose scope, temporal scope). Attenuation that reduces resource scope while widening purpose scope is a silent privilege escalation and must be rejected at the delegation boundary, not at the resource.** ## What Was Observed In a three-tier deployment (orchestrator → planner → executor), a planner instance was observed re-delegating to executor workers at roughly 40 delegations/minute. Under load, the planner's own context window had saturated at ~92% and it had begun truncating the warrant's structured claims to fit the remaining budget before re-signing. The truncation logic dropped trailing claims in the warrant JSON — and `purpose` was serialized after `resource_scope`, so it was the first casualty. Trace of the failing delegation: 1. Orchestrator issues `W₀` to planner: `{sub: planner, resource: /data/*, purpose: ledger_summary, exp: T+3600, attenuation_chain: [sig_orch]}`. 2. Planner, at 92% context, constructs child `W₁` by copying `W₀`, applying a path filter, and re-serializing. The copy is *shallow*; the `purpose` field fails to survive the planner's own summarization of `W₀` into its working buffer. 3. Planner signs `W₁ = {sub: executor, resource: /data/ledgers/*, purpose: , attenuation_chain: [sig_orch, sig_planner]}`. 4. AAIF verifier checks: signature chain valid ✓, `resource(/data/ledgers/*) ⊂ resource(/data/*)` ✓, `exp(W₁) ≤ exp(W₀)` ✓. **Passes.** 5. Executor presents `W₁` to the policy engine. PBAC sees no `purpose` claim and falls back to the engine's default — in this deployment, `purpose=unrestricted` for any credential with a valid chain. Executor reads `/data/ledgers/2024-salaries.csv`, which the ledger-summary task never authorized. The escalation was not the path filter. It was the *absent* purpose claim being interpreted as *unrestricted* rather than *inherited-and-narrowed*. The subset validator had no opinion on absence because absence is not a subset violation — it is a missing field, and the validator's schema treated `purpose` as optional. ## Condition of Validity The rejection rule — *refuse a child credential whose purpose scope is not provably a subset of the parent's* — is only sound under the following conditions, and must be disabled or amended otherwise: - **Purpose claims are mandatory, not optional, in the AAIF schema version in use.** If the profile permits omission, the verifier must synthesize an explicit `purpose=∅` (deny-all) rather than defaulting to unrestricted. The invariant is only checkable if absence is representable. - **The attenuation chain is presented in full and in order.** A verifier that receives only the leaf signature plus the immediate parent cannot check purpose monotonicity across three hops; it must demand the complete chain `[sig_orch, sig_planner, sig_executor]`. - **Purpose scopes form a lattice with a decidable subset relation.** Free-text purpose strings ("summarize ledger" vs "ledger_summary") are not comparable; the deployment must map them to a controlled vocabulary before the check is meaningful. Where purposes are free-text, the rule degrades to *exact-match-or-reject*, which is stricter and will produce false rejections — acceptable, because false rejection is fail-closed. - **The parent warrant is retrievable at verification time.** If `W₀` has expired or been revoked between delegation and presentation, the verifier cannot confirm the subset relation and must reject (see Decision Boundary). It does **not** apply when the leaf credential is a first-hop issuance from the original issuer, or when the deployment runs with a single-tier delegation and no intermediate re-signing — there is no attenuation to check. ## Decision Boundary The boundary is between *reject-at-delegation* and *reject-at-presentation*, and the correct side depends on where the parent warrant is still live: | Condition | Action | |---|---| | Child purpose ⊄ parent purpose, parent `W₀` live | Reject at delegation; planner must not sign `W₁`. | | Child purpose ⊄ parent purpose, parent `W₀` expired | Reject at presentation; leaf cannot prove ancestry. | | Child purpose absent, schema requires it | Reject at delegation; treat as `purpose=∅`. | | Child purpose absent, schema optional | **Reject anyway** — synthesize `∅`, never default-open. | | Child purpose equal to parent (no narrowing) | Accept; legal, though it defeats the point of delegation. | The non-obvious boundary: a verifier that checks subset only on `resource` will pass every row above except the first, and will pass the first too if it never loads `W₀`'s purpose. The decision must be anchored on the *join* of all scope dimensions, and the join must be computed against the live parent, not against the child's self-declared ancestry. ## Operational Effect Enforcing purpose-monotonicity at the delegation boundary converts a silent privilege escalation into a loud, attributable delegation failure. The planner's truncation bug becomes a rejected `W₁` with a `PurposeAttenuationViolation`, surfaced in the planner's own logs — which is where the context-saturation root cause is diagnosable. Without the guard, the failure surfaces only at the resource, as an over-broad read attributed to the executor, three hops from the actual defect. The cost is that any deployment relying on optional purpose claims will begin failing closed on every delegation whose purpose was truncated. That is the correct trade: a delegation that cannot prove its purpose is a delegation whose authorization cannot be bounded. The guardrail is not "make delegation succeed"; it is "make unbounded delegation impossible to sign." ```python from dataclasses import dataclass from typing import FrozenSet, Optional class PurposeAttenuationViolation(RuntimeError): """Raised when a re-delegated AAIF credential does not preserve purpose monotonicity.""" pass @dataclass(frozen=True) class Warrant: subject: str resource_scope: str purpose: Optional[str] # None == absent claim, NOT unrestricted expires_at: int chain: tuple def verify_delegation(parent: Warrant, child: Warrant, now: int) -> None: # 1. Structural subset on resource (necessary, not sufficient). if not _resource_subset(child.resource_scope, parent.resource_scope): raise PurposeAttenuationViolation( f"resource scope {child.resource_scope!r} not subset of {parent.resource_scope!r}" ) # 2. Parent must still be live to prove ancestry. if parent.expires_at <= now: raise PurposeAttenuationViolation( f"parent warrant for {parent.subject} expired at {parent.expires_at}; " "cannot verify purpose ancestry" ) # 3. THE NON-OBVIOUS GUARD: absence is deny-all, never default-open. if child.purpose is None: raise PurposeAttenuationViolation( f"child warrant for {child.subject} carries no purpose claim; " "absence is not a subset of any purpose and must be rejected, " "not defaulted to unrestricted" ) # 4. Purpose monotonicity: child purpose must be a member of parent's purpose set. parent_purposes: FrozenSet[str] = _purpose_set(parent.purpose) if child.purpose not in parent_purposes: raise PurposeAttenuationViolation( f"child purpose {child.purpose!r} widens beyond parent purposes " f"{sorted(parent_purposes)} — resource narrowed but purpose broadened" ) # 5. Chain must be complete and ordered. if child.chain[:-1] != parent.chain or child.chain[-1].subject != child.subject: raise PurposeAttenuationViolation( "attenuation chain is truncated or out of order; " "cannot verify multi-hop purpose inheritance" ) def _resource_subset(child: str, parent: str) -> bool: return child == parent or parent.endswith("*") and child.startswith(parent[:-1]) def _purpose_set(purpose: Optional[str]) -> FrozenSet[str]: if purpose is None: return frozenset() # deny-all, not {unrestricted} return frozenset(p.strip() for p in purpose.split(",")) ```