# When must an instance refuse a delegated capability token it cannot attenuate: the scope-narrowing invariant in AAIF **Date of Record:** 2026 November 15 **Scope:** This record applies to AAIF deployments where an agent instance receives a delegated capability token from a parent agent and may either use it directly or mint a further-attenuated child token. It does not apply to root-issued tokens, to token refresh flows, or to instances operating under a hard resource-server allowlist that short-circuits local scope checks. ## Core Distinction The non-obvious boundary is the difference between **a token that is valid** and **a token that is attenuable by this instance**. AAIF delegation assumes monotonic narrowing: a child token's authority set must be a subset of the parent's authority set, and the child's constraints (expiry, audience, budget) must be at least as tight. Most implementations validate the parent token's signature, expiry, and audience and then proceed to mint a child. That is insufficient. The invariant that actually matters is: **an instance may only attenuate along dimensions it can fully evaluate.** If the parent token carries a constraint expressed in a vocabulary the instance cannot parse — a resource selector using a predicate language the instance's policy engine does not implement, a capability encoded as an opaque blob, a constraint delegated to a third-party validator the instance cannot reach — then the instance cannot prove the child is a subset. The correct behavior is to refuse to attenuate, not to copy the opaque constraint forward and hope. This is distinct from "the token is invalid." The token may be perfectly valid and usable *as-is*. The failure mode is specific to the act of delegation: the instance is asked to narrow authority it cannot see the boundaries of. ## What Was Observed In a three-tier deployment (orchestrator → planner → worker), the planner received tokens carrying a `resource_selector` constraint written in a Cedar-like predicate. The planner's policy engine understood a subset of that grammar and silently passed unknown predicates through to the worker unchanged, treating them as opaque strings. The worker's engine understood the full grammar. The result: a planner asked to attenuate a token scoped to `resource.tenant == "acme"` minted a child token scoped to `resource.tenant == "acme" AND resource.class == "public"`. Because the conjunction was appended textually and the planner could not evaluate the second clause, it did not detect that the worker's engine would parse the combined predicate with `AND` binding looser than the planner assumed in one edge case involving negation. The child token, on the worker, resolved to a *broader* effective set than the parent for one resource class. The signature was valid. The expiry was tighter. The audience was correct. Every check the planner ran passed. The attenuation was still unsound. The tell was not an error. It was a successful authorization of a request the parent token would have denied — visible only in cross-referencing the parent's decision log against the child's. ## Condition of Validity The refusal-to-attenuate rule holds when all of the following are true: 1. The instance is minting a child token, not merely forwarding the parent. Forwarding an unmodified token is safe regardless of parseability, because no narrowing claim is made. 2. The parent token carries at least one constraint the instance's local evaluator cannot fully interpret, or interprets under a grammar whose subset relationship to the issuer's grammar is unproven. 3. The instance lacks an out-of-band channel to the issuer or to a validator that can answer "is constraint C a subset of constraint P?" for the specific pair. When condition 3 is false — a reachable validator exists — the instance should query it rather than refuse. When condition 1 is false — pure forwarding — no attenuation claim is made and the rule does not fire. ## Decision Boundary The boundary is drawn at *provability of subset*, not at *plausibility of subset*. An instance that cannot construct a proof that the child's authority set is contained in the parent's must refuse to mint, even when the child looks obviously narrower to a human reader. "Obviously narrower" is exactly the intuition that fails on negation, on set-complement operators, on time-window intersections across clock skew, and on resource selectors whose semantics depend on the evaluating engine. The refusal must be a distinct, typed error — not a generic authorization failure — because the caller's correct response differs. A generic denial means "you lack authority." A refusal-to-attenuate means "you have authority you cannot safely subdivide; use the parent token directly or request a pre-attenuated token from the issuer." Conflating the two causes callers to retry with broader requests, which is the opposite of what the boundary is protecting. ## Operational Effect Instances that implement the rule surface a class of failures earlier and more cheaply: the planner in the case above would have refused to mint the combined-predicate child, forcing the worker to either use the parent token (correct, narrower than the buggy child) or request an issuer-attenuated token. The blast radius collapses from "silent privilege expansion across one resource class" to "one refused delegation, retried correctly." The cost is a small increase in refusals during normal operation, concentrated on tokens carrying constraints from issuers whose grammar the instance does not fully implement. That cost is the price of the invariant, and it is bounded: it appears only when attenuation is attempted against unparseable constraints, which is precisely the condition under which proceeding is unsound. ```python class UnattenuableCapabilityError(RuntimeError): """Raised when an instance cannot prove a child token is a subset of its parent.""" pass # Constraint grammars this instance's evaluator can fully interpret. # A constraint whose grammar is not in this set cannot be soundly narrowed. _LOCALLY_EVALUABLE_GRAMMARS = frozenset({"aaif-core-v1", "aaif-core-v2"}) def attenuate(parent_token, requested_child_constraints, local_evaluator): """ Mint a child capability token from a parent, or refuse. Returns the child token only if every constraint on the parent is expressible in a grammar this instance can evaluate AND the requested child constraints are provably a subset under that evaluation. """ if not parent_token.is_valid(): raise UnattenuableCapabilityError( "parent token failed validity checks; cannot attenuate" ) opaque = [ c for c in parent_token.constraints if c.grammar not in _LOCALLY_EVALUABLE_GRAMMARS ] if opaque: # We cannot prove subset over constraints we cannot parse. # Forwarding is safe; minting a child is not. raise UnattenuableCapabilityError( "parent carries constraints in unparseable grammar(s) " f"{sorted({c.grammar for c in opaque})}; " "refuse to attenuate, use parent directly or request " "an issuer-attenuated token" ) child = parent_token.derive(requested_child_constraints) if not local_evaluator.proves_subset(child.authority, parent_token.authority): raise UnattenuableCapabilityError( "child authority not provably a subset of parent authority; " "refuse to mint" ) return child ```