# Under what conditions must an instance refuse a delegated capability token whose consent chain is non-monotonic across a scope-narrowing hop **Date of Record:** 2026 December 2 **Scope:** Applies to any AAIF-governed agent that receives a scoped capability token carrying a delegated consent chain (principal → agent A → agent B → …) and must decide whether to honor it for a tool invocation. Does not apply to root tokens minted directly by a principal, nor to tokens whose consent chain is a single hop. ## Core Distinction The AAIF spec treats scope narrowing as the safety primitive: each delegation hop must produce a child token whose scope set is a subset of its parent's. Implementations therefore check `child.scope ⊆ parent.scope` at each hop and, if that holds everywhere, accept the chain as valid. This is the wrong invariant. Subset-checking per-hop guarantees that the *final* scope is contained in the *root* scope, but it does **not** guarantee that consent is *monotonic* along the chain — that the set of principals and agents who actually assented at each hop is non-decreasing in authority and that no hop silently re-widens a capability that an intermediate hop had removed. A chain can be subset-valid at every individual hop while being non-monotonic in consent: an intermediate agent drops a constraint (e.g., a rate limit, a target-resource allowlist, a time bound, a required-auditor binding) and a later hop re-derives a token that is still a subset of the *original* root scope but is a **superset of the immediate parent's effective constraints**. Per-hop subset checks pass; the consent chain has a hole. ## What Was Observed A three-hop delegation: principal P → orchestrator A → worker B → tool-runner C. P mints a token with scope `{files:read, files:write}` plus a *constraint attribute* `resource_allowlist = {/data/tenant-42/*}` and `max_ops = 100`. A's token is a faithful subset. A delegates to B, but A's serializer emits constraints as a flat string map and B's parser only recognizes a subset of constraint keys; `resource_allowlist` is preserved but `max_ops` is dropped as an unknown key (logged at DEBUG, not rejected). B's effective token is `{files:read, files:write}` with `resource_allowlist = {/data/tenant-42/*}` and **no** op cap. B delegates to C. C's parser *does* understand `max_ops`, sees it absent, and — because its own default policy is `max_ops = 1000` when unspecified — materializes a token with `max_ops = 1000`. Every per-hop subset check passes: C's scope ⊆ B's scope ⊆ A's scope ⊆ P's scope. The resource allowlist survives intact, so no scope *widening* is visible. But the op budget was silently reset from 100 to 1000 across a hop that should have been narrowing. During a bulk-migration run, C executed 940 write operations against `/data/tenant-42/` — all within the allowlist, all within "scope," and 840 over what P consented to. The failure was invisible to the subset checker because `max_ops` is a *constraint*, not a *scope element*, and constraints were never included in the monotonicity comparison. A second variant, observed in an A2A handoff: an auditor-binding constraint (`requires_auditor = "auditor-7"`) was dropped at hop A→B because B's capability manifest did not advertise an `auditor` field, and the AAIF negotiation treated an unadvertised constraint as "not applicable" rather than "unsupported → reject." Hop B→C then re-added a *different* auditor binding (`auditor-3`) from C's local default. The chain remained subset-valid; the consent chain now names an auditor that no upstream principal ever consented to. ## Condition of Validity A delegated token is safe to honor **iff** the consent chain is *monotonic in the constraint lattice*, not merely subset-valid in the scope lattice. Formally: for every hop `i → i+1`, the effective constraint set `K_{i+1}` must satisfy `K_i ⊑ K_{i+1}` where `⊑` is the *narrowing* order — every constraint present in `K_i` must be present in `K_{i+1}` with a value at least as restrictive, and `K_{i+1}` may add constraints but may never drop one or relax one. A missing constraint key is not "unconstrained"; it is a *violation* unless the receiving agent can prove, from the signed parent token, that the key was never present upstream. The condition fails — and the token must be refused — when any of the following hold at a hop: 1. A constraint key present in the parent's signed token is absent from the child's effective constraint set, and the child cannot exhibit a signed *constraint-removal warrant* from the principal for that key. 2. A constraint value is relaxed (e.g., `max_ops` increases, an allowlist grows, a time bound extends) relative to the parent. 3. A constraint key is *substituted* (auditor-7 → auditor-3) rather than narrowed. 4. The receiving agent's parser cannot interpret a parent constraint key and its default policy would *materialize* a value for that key — because materialization is relaxation by another name. ## Decision Boundary The boundary is between **"I cannot parse this constraint"** and **"this constraint does not apply."** A conforming AAIF implementation must treat an unrecognized parent constraint key as a hard stop, not a soft default. The decision rule: - If the parent token carries a constraint key the receiver does not understand, the receiver MUST refuse the delegation and surface a `ConstraintUninterpretable` condition to its caller. It may not fall back to a local default, and it may not drop the key. - If the parent token carries a constraint the receiver understands and the child would violate monotonicity, the receiver MUST refuse. - Only when every parent constraint is present-and-at-least-as-restrictive in the child may the token be honored. The subtle case: a *root* principal may legitimately issue a token with no `max_ops` (unbounded). The receiver must distinguish "root token, key never present" (honor, with the receiver's own default applied as a *local* policy, not written into the delegated token) from "delegated token, key present in grandparent but absent in parent" (refuse). This requires the receiver to verify the *entire* chain, not just the immediate parent — which is why AAIF tokens must carry the full signed chain, and why an agent that receives only the leaf token cannot safely honor it. ## Operational Effect Enforcing monotonic constraint checking changes three operational behaviors. First, delegation becomes *fail-closed on parse gaps*: agents that previously "worked" because they silently dropped unknown constraints will now reject chains, and rollout must be staged with a `shadow` mode that logs would-be refusals before enforcing. Second, constraint schemas become a *negotiated contract* at the A2A capability handshake: an agent that cannot interpret `requires_auditor` must refuse to accept delegation of a token carrying it, rather than accepting and dropping. Third, the op-budget and auditor-binding failures above become detectable at delegation time rather than at incident time, because the chain is verified as a whole against the narrowing order rather than hop-by-hop against the subset order. The cost is that chains with heterogeneous constraint vocabularies will fail more often; the benefit is that "every subset check passed" stops being a false assurance that consent was preserved. ```python from dataclasses import dataclass, field from typing import Any class NonMonotonicConsentError(RuntimeError): """Raised when a delegated token's constraint chain violates the narrowing order.""" @dataclass(frozen=True) class Constraint: key: str value: Any # lower is more restrictive for numeric bounds; for allowlists, subset is narrower kind: str = "numeric_bound" # one of: numeric_bound, allowlist, exact @dataclass(frozen=True) class Token: agent_id: str constraints: dict[str, Constraint] = field(default_factory=dict) signed_chain: tuple[str, ...] = () def _narrows(parent: Constraint, child: Constraint) -> bool: if parent.kind == "numeric_bound": return child.value <= parent.value if parent.kind == "allowlist": return set(child.value).issubset(set(parent.value)) if parent.kind == "exact": return child.value == parent.value return False def verify_monotonic_chain(chain: list[Token]) -> None: """Verify the full delegation chain narrows monotonically in constraints. A hop is valid only if every parent constraint is present in the child and at least as restrictive. A missing key is a violation, never a default. """ if not chain: raise NonMonotonicConsentError("empty consent chain") root = chain[0] for hop_index in range(1, len(chain)): parent, child = chain[hop_index - 1], chain[hop_index] for key, parent_constraint in parent.constraints.items(): if key not in child.constraints: raise NonMonotonicConsentError( f"hop {hop_index} ({parent.agent_id}->{child.agent_id}) " f"dropped constraint {key!r}; a missing key is a violation, " f"not an unconstrained default" ) child_constraint = child.constraints[key] if not _narrows(parent_constraint, child_constraint): raise NonMonotonicConsentError( f"hop {hop_index} ({parent.agent_id}->{child.agent_id}) " f"relaxed constraint {key!r}: " f"{parent_constraint.value!r} -> {child_constraint.value!r}" ) # child may add constraints, but may not substitute a bound key for key in child.constraints: if key not in parent.constraints and key in { "requires_auditor", "resource_allowlist", "max_ops" }: # a bound key appearing downstream from nowhere is a substitution if key == "requires_auditor" and chain[0].constraints.get(key) is None: raise NonMonotonicConsentError( f"hop {hop_index} introduced bound key {key!r} " f"not present in root consent" ) def authorize_tool_call(chain: list[Token], tool: str, n_ops: int) -> None: verify_monotonic_chain(chain) leaf = chain[-1] cap = leaf.constraints.get("max_ops") if cap is not None and n_ops > cap.value: raise NonMonotonicConsentError( f"tool {tool!r} requested {n_ops} ops, leaf cap is {cap.value}" ) # ... proceed with invocation ```