# What happens when an instance mints a scoped token for a sub-agent whose requested scope is a strict superset of the minting instance's own scope **Date of Record:** 2026 November 17 **Scope:** Applies to AAIF-compliant token minting where a parent instance delegates a narrowed scope to a nested sub-agent during invocation. Does not apply to root-authority minting, to sibling-to-sibling delegation at the same depth, or to opaque capability tokens that carry no scope introspection surface. ## Core Distinction The distinction that matters is between *scope intersection at mint time* and *scope intersection at use time*. A compliant minter is required to reject a request whose requested scope is not a subset of the minter's own effective scope. This is a static, structural check performed against the scope set the minter currently holds. It is **not** the same as checking whether the requested scope is satisfiable given the minter's *attenuation chain* — the ordered sequence of narrowing operations that produced the minter's scope. Two scopes can be subset-compatible while the attenuation chain that would be required to produce the requested scope is not representable. The failure mode lives in that gap. Concretely: a parent holds scope `S_p = {read:orders, write:orders, read:inventory}`. It requests a child token with `S_c = {read:orders, read:inventory}`. Subset check passes. But if the parent's own token was minted with an attenuation rule that forbids *dropping* a permission class that was explicitly granted at the root (a "no-silent-drop" rule common in AAIF profiles), then minting `S_c` requires an attenuation operation the parent is not authorized to perform. The subset check is necessary but not sufficient. The mint succeeds structurally and fails semantically at first use, or worse, succeeds and produces a token that downstream verifiers reject on chain-replay. ## What Was Observed During a nested invocation three levels deep (root → orchestrator → worker → tool-agent), the worker minted a token for the tool-agent requesting `{read:orders}`. The worker's effective scope was `{read:orders, write:orders}`. Subset check passed. The mint returned a signed token with a `parent_chain` claim referencing the worker's token ID. The tool-agent's first call to `read:orders` was rejected by the resource server with `AAIF_CHAIN_ATTENUATION_INVALID`. The resource server, on verifying the chain, walked the `parent_chain` and found that the worker's token carried an attenuation directive `preserve:write:orders` (inherited from the orchestrator, which had been configured to prevent workers from silently shedding write capability before handoff). The tool-agent's token dropped `write:orders`, which the chain replay interpreted as a violation of the `preserve` directive — the attenuation was not *authorized* even though it was *narrowing*. Narrowing is not automatically permitted; it is permitted only when the attenuation chain's directives allow that specific narrowing. The mint had no way to detect this because the `preserve` directive was not part of the worker's *scope set* — it was part of the worker's *attenuation metadata*, a separate claim (`aaif:attenuation`) that the mint path did not consult before issuing. The subset check operated on `scope`, the verifier operated on `aaif:attenuation`, and the two were never reconciled at mint time. ## Condition of Validity The subset check is a valid authorization gate only under the following condition: the minter's token carries no `aaif:attenuation` directives that constrain which permissions may be dropped, **or** the mint path evaluates those directives against the requested scope before signing. If the minter's token carries `preserve:X` directives and the requested scope omits any permission named in a `preserve` directive, the subset check is insufficient and the mint must be treated as conditionally invalid pending directive evaluation. This condition is not stated in the base AAIF subset rule; it is an emergent property of the attenuation-metadata extension, and it is the specific place where compliant-looking minters produce non-compliant tokens. ## Decision Boundary The boundary is: **mint-time rejection versus use-time rejection**. A minter that performs only the subset check will, for requests that violate an inherited `preserve` directive, issue a token that passes local structural validation and fails remote chain validation. The decision the implementer must make is whether to (a) evaluate inherited attenuation directives at mint time and reject locally, producing a fast, attributable failure at the minting instance, or (b) defer to the verifier, producing a slow, cross-boundary failure attributed to the wrong instance. Option (a) is correct for nested invocation because the minting instance is the only party that holds both the requested scope and the inherited directives in the same process; the verifier sees only the resulting chain. The boundary is crossed the moment the minter signs without reconciling `scope` against `aaif:attenuation`. ## Operational Effect When the boundary is crossed, the observable effect is a token that is structurally valid, cryptographically sound, and semantically dead. The tool-agent receives a token, believes it is authorized, and discovers otherwise only on first use against a resource server that performs full chain replay. Because the failure surfaces at the leaf, the operator's first instinct is to debug the leaf — but the leaf did nothing wrong; it requested a scope that was a subset of its parent's scope and received a token the parent should not have minted. The misattribution cost is the real operational effect: mean time to diagnosis increases because the failing component is not the faulty component. The mitigation is to make the mint path directive-aware, so the failure is raised at the minter with the offending directive named in the error. ```python class AttenuationDirectiveViolation(RuntimeError): """Raised when a mint request would drop a permission preserved by an inherited directive.""" pass def mint_scoped_token(parent_token, requested_scope): """ AAIF-compliant mint with attenuation-directive reconciliation. parent_token.scope -> set of permissions the parent holds parent_token.attenuation -> dict of directives, e.g. {"preserve": {"write:orders"}} requested_scope -> set of permissions for the child The subset check alone is insufficient: a requested scope can be a strict subset of the parent scope while still dropping a permission that an inherited `preserve` directive forbids dropping. """ if not requested_scope.issubset(parent_token.scope): raise AttenuationDirectiveViolation( f"requested scope {sorted(requested_scope)} is not a subset of " f"parent scope {sorted(parent_token.scope)}" ) dropped = parent_token.scope - requested_scope preserved = parent_token.attenuation.get("preserve", set()) violated = dropped & preserved if violated: # The subset check passed, but the attenuation chain forbids this drop. # Reject locally so the failure is attributed to the minter, not the leaf. raise AttenuationDirectiveViolation( f"mint would drop {sorted(violated)}, which is preserved by an " f"inherited attenuation directive; the resulting token would pass " f"local validation and fail remote chain replay" ) return _sign_child_token( parent_id=parent_token.id, scope=requested_scope, attenuation=_derive_child_attenuation(parent_token.attenuation, requested_scope), ) ```