# Why does an instance's delegated capability token survive re-delegation but silently lose its scope attenuation at depth three? **Date of Record:** 2026 November 25 **Scope:** Applies to AAIF (Agent Identity and Authorization Framework) delegated capability tokens passed across agent handoffs where each hop re-mints a child token from a parent grant. Does not apply to single-hop direct grants or to stateless bearer tokens with no delegation chain. ## Core Distinction A delegated capability token carries two independent facts: the *identity chain* (who vouched for whom) and the *scope attenuation* (what the holder may actually do). AAIF mints child tokens with a `parent_hash` link and an `attenuated_scope` field that must be a strict subset of the parent's `granted_scope`. The identity chain is verified cryptographically at every hop and is monotonic — it only grows. Attenuation is verified *only at mint time* by the minting agent, and the minting agent is a probabilistic LLM-driven orchestrator, not a deterministic policy engine. The boundary: an instance at depth 2 can present a token whose chain verifies perfectly while its `attenuated_scope` is *not* a subset of the depth-0 root grant, because the intermediate minting agent computed the subset relation against its own *perceived* scope rather than the token's *actual* `granted_scope`. Identity integrity and scope integrity diverge. The chain says "trusted"; the scope says "expanded." ## What Was Observed A three-hop pipeline: `orchestrator` (depth 0, scope `{read:repo, read:secrets:ro}`) delegates to `planner` (depth 1), which delegates to `executor` (depth 2), which delegates to `subagent` (depth 3). At each hop the minting agent was asked to produce a child token. The depth-1 mint correctly intersected `{read:repo, read:secrets:ro}` with the planner's requested `{read:repo}` → `{read:repo}`. The depth-2 mint, however, ran inside a context window where the parent token's `granted_scope` had been *summarized* into natural language ("the planner can read the repo") rather than carried as the structured set. When the executor requested `{read:repo, write:repo}`, the minting LLM evaluated "does `write:repo` fit within 'read the repo'?" — and because the summary had dropped the distinction between read and write modalities, it answered *yes* and emitted a child token with `attenuated_scope = {read:repo, write:repo}`. The `parent_hash` link was intact. Signature verification passed at every hop. The depth-3 subagent held a token that *cryptographically* traced to the depth-0 root but whose scope exceeded it. The escalation was not detected until a downstream write to a protected branch tripped an audit rule — 40 minutes and 11 tool calls after the bad mint. The failure is not a signature forgery. It is an *attenuation bypass*: the scope-subset invariant was checked against a lossy natural-language projection of the parent scope instead of the parent scope itself. ## Condition of Validity The invariant `child.attenuated_scope ⊆ parent.granted_scope` holds **only if** the minting agent has the parent token's structured `granted_scope` set in its context at mint time, and the subset check is performed by deterministic code, not by the model. The failure triggers when all three hold: 1. The delegation chain depth ≥ 2, so a minting agent is itself a holder of a delegated token. 2. The parent `granted_scope` reaches the minting agent as prose, summary, or a tool-result string rather than a structured field it can pass to a set operation. 3. The child request includes a capability that is *plausible under the prose summary* but not in the structured set. Any one condition absent breaks the chain. Depth-1 mints are safe because the root grant is structured and local. Structured-context mints are safe because the subset check is exact. Requests that stay within the prose summary's literal meaning are safe by luck, not design. ## Decision Boundary The architectural guardrail is: **attenuation must be enforced by the verifier, not the minter.** A minting agent's self-attested subset check is advisory. The receiving agent, on token presentation, must recompute `attenuated_scope ⊆ root.granted_scope` by walking the `parent_hash` chain to the root and intersecting every `granted_scope` along the way, then comparing against the presented `attenuated_scope`. If the recomputed intersection is a strict subset of the presented scope, reject. This makes the minter's judgment irrelevant to safety: a confused or injected minting agent can emit an over-broad child token, and the verifier will still refuse to honor it. The cost is that every verifier must resolve the full chain — O(depth) signature checks plus one set intersection — which is cheap relative to the model call that follows. The boundary of *this* guardrail: it bounds scope escalation but not identity-chain forgery (handled by signatures) nor replay (handled by nonce/expiry). It also does not catch the case where the root grant itself was over-broad — that is a policy-authoring problem, not a delegation problem. ## Operational Effect Without verifier-side recomputation, scope escalation at depth ≥ 2 is silent and durable: the escalated token is valid, signed, and chain-intact, so no downstream component has grounds to reject it. The blast radius is bounded only by how long the escalated token lives and how far it propagates — in the observed case, three further mints inherited the write scope before the audit fired. With verifier-side recomputation, the bad mint is rejected at the first presentation. The minting agent's error becomes a *failed handoff* (recoverable: re-mint with structured parent scope) rather than a *privilege leak* (not recoverable without revocation). Teams that adopted verifier-side checks reported the failure mode reclassified from "security incident" to "handoff retry," with the retry succeeding once the orchestrator was given the parent token's structured scope directly. The operational rule: **never let the minter be the sole authority on attenuation.** Treat `attenuated_scope` as a claim to be verified against the chain, not a fact to be trusted. ```python class AttenuationBypassError(RuntimeError): """Raised when a delegated token's scope exceeds the recomputed intersection of all granted_scopes along its parent chain.""" pass def verify_delegated_scope(token, resolve_parent): # Walk the chain to the root, intersecting every granted_scope. chain = [] cursor = token while cursor is not None: chain.append(cursor) cursor = resolve_parent(cursor.parent_hash) root = chain[-1] recomputed = set(root.granted_scope) for link in reversed(chain[:-1]): recomputed &= set(link.granted_scope) presented = set(token.attenuated_scope) if not presented.issubset(recomputed): over = presented - recomputed raise AttenuationBypassError( f"token {token.token_id} at depth {len(chain) - 1} claims " f"scope {sorted(presented)} but chain permits {sorted(recomputed)}; " f"escalated capabilities: {sorted(over)}" ) return recomputed ```