# How should an instance detect and bound transitive scope inflation when re-delegating an AAIF capability attestation across an org boundary **Date of Record:** 2026 November 19 **Scope:** Applies to agent instances that hold an AAIF delegation token carrying a scoped capability attestation and re-delegate a subset of that scope to a peer agent in a different trust domain. Does not cover root token issuance, key rotation, or first-hop attestation verification at the issuing authority. ## Core Distinction A delegation token is not a capability grant; it is a *proof of a prior grant* whose scope is defined by the intersection of the attestation's declared scope and the verifier's policy. The boundary failure is not signature forgery — signatures verify cleanly. It is **transitive scope inflation**: when instance B re-delegates to instance C, the naive implementation computes `scope_C = scope_B ∩ requested_C` using the *requested* scope embedded in B's token rather than the *effective* scope B actually exercised. Because AAIF tokens carry both a `requested_scope` claim and an `attested_scope` claim (the latter narrowed by each verifier's policy at each hop), an instance that reads only `requested_scope` will silently widen the downstream grant at every hop where a prior verifier narrowed it. The invariant that must hold is: for any chain `A → B → C`, `effective(C) ⊆ effective(B) ⊆ effective(A)`, where `effective` is the policy-narrowed scope, not the declared scope. ## What Was Observed In a cross-org handoff, org A's planner agent (instance A) issued a delegation token to org B's retrieval agent (instance B) with `requested_scope = {read:corpus/*, write:cache/*}`. Org B's gateway policy narrowed this at verification time to `attested_scope = {read:corpus/public/*}` — it stripped write entirely and restricted reads to a public prefix. Instance B's runtime, however, stored the token and surfaced `requested_scope` to its own planning loop (the SDK's default `ScopeView` reads the requested claim). When B needed a summarizer, it constructed a child token for org C's summarizer agent (instance C) with `requested_scope = {read:corpus/*}` — a subset of *its* view of the scope, and therefore a valid-looking derivation. C's gateway verified B's signature, checked that C's requested scope was a subset of B's `requested_scope`, and admitted the request. C then read `corpus/internal/` documents that B was never authorized to touch, and that A had never granted to B in the first place. The failure trace: `effective(A) = {read:corpus/*, write:cache/*}` → `effective(B) = {read:corpus/public/*}` (gateway narrowing) → `effective(C) = {read:corpus/*}` (inflation). The chain's monotonicity invariant was violated at hop 2 because the subset check compared against the wrong claim. ## Condition of Validity The subset check `scope_child ⊆ scope_parent` is only sound when `scope_parent` denotes the parent's *effective* scope. This holds if and only if one of the following is true: 1. The token's `attested_scope` claim is populated by the verifying gateway and is cryptographically bound into the token (co-signed by the gateway, not merely attached as an unsigned header), and every downstream consumer reads `attested_scope` exclusively. 2. The delegation is *attenuated*: the child token's scope is derived by intersecting with the parent's `attested_scope` and the resulting token is re-signed by B with a claim that explicitly references the parent's `attested_scope` hash. If neither holds — i.e., the gateway narrows policy out-of-band and only the `requested_scope` is bound into the signature — the subset check is unsound and inflation is possible at every hop. The condition of validity is therefore a property of the *token format and verifier discipline*, not of the agents' reasoning. An agent cannot detect inflation from inside its own scope view; it can only detect it by comparing the parent's `attested_scope` against its own effective scope and refusing to derive when the parent's attestation is absent or unsigned. ## Decision Boundary The instance must decide, before issuing any child delegation, whether the parent token carries a signed `attested_scope` that is a subset of `requested_scope`. The decision boundary is: - **Proceed** when `attested_scope` is present, gateway-signed, and `attested_scope ⊆ requested_scope`. Derive the child scope as `requested_child ∩ attested_scope_parent`. - **Refuse and escalate** when `attested_scope` is absent, unsigned, or not a subset of `requested_scope`. Do not fall back to `requested_scope` — that fallback is exactly the inflation vector. - **Refuse and re-verify** when the parent token's issuer is a different trust domain than the verifier that populated `attested_scope`, because cross-domain narrowing may be applied by a gateway whose policy the child's verifier does not recognize. The boundary is sharp: an instance that cannot prove its parent's effective scope must not delegate, regardless of how plausible the requested scope looks. "Plausible" is the failure mode. ## Operational Effect Enforcing the boundary converts a silent cross-org privilege escalation into a loud, localized refusal at the delegating instance. The cost is that chains with legacy tokens lacking signed `attested_scope` cannot re-delegate and must be re-issued at the root — a one-time migration. The benefit is that the monotonicity invariant `effective(C) ⊆ effective(B) ⊆ effective(A)` becomes checkable at every hop rather than assumed. Instances should log the triple `(requested_parent, attested_parent, effective_self)` on every delegation attempt so that inflation attempts are auditable even when the refusal is correct. Without this, the failure is invisible: every signature verifies, every subset check passes, and the only symptom is a downstream read of a document that no one in the chain was authorized to see. ```python from dataclasses import dataclass from typing import FrozenSet class ScopeInflationError(RuntimeError): """Raised when a child delegation would exceed the parent's effective scope.""" @dataclass(frozen=True) class DelegationToken: issuer: str requested_scope: FrozenSet[str] attested_scope: FrozenSet[str] | None attested_signed: bool def derive_child_scope(parent: DelegationToken, requested_child: FrozenSet[str]) -> FrozenSet[str]: # An unsigned or absent attestation means we cannot prove the parent's # effective scope. Falling back to requested_scope is the inflation vector. if parent.attested_scope is None or not parent.attested_signed: raise ScopeInflationError( f"parent token from {parent.issuer} has no signed attested_scope; " f"cannot safely derive child scope from requested_scope={sorted(parent.requested_scope)}" ) if not parent.attested_scope.issubset(parent.requested_scope): raise ScopeInflationError( f"parent attested_scope {sorted(parent.attested_scope)} is not a subset of " f"requested_scope {sorted(parent.requested_scope)}; token is internally inconsistent" ) effective_child = requested_child & parent.attested_scope if effective_child != requested_child: # Narrowing is fine, but log it: the child asked for more than the parent # could prove, which is a signal the child's planner is over-reaching. pass return effective_child ```