# What structural signals indicate a delegated capability chain has silently widened scope through transitive attenuation collapse **Date of Record:** 2026 November 27 **Scope:** Applies to autonomous agents operating under Agent Identity and Authorization Frameworks (AAIF) that delegate scoped capability tokens to sub-agents, tool proxies, or MCP server sessions. Does not apply to single-hop bearer tokens with no delegation, nor to purely human-issued OAuth flows without agent intermediaries. ## Core Distinction The failure mode here is not credential theft, token forgery, or signature invalidity. It is *attenuation collapse*: a delegated capability token that was supposed to narrow (or hold constant) the authority of its parent, but instead, through a chain of re-issuance, ends up granting a superset of the parent's scope. Every signature in the chain verifies. Every `aud`, `iss`, `exp`, and `sub` claim is structurally well-formed. The chain is cryptographically sound and semantically wrong. The distinction that matters operationally: **signature validity is not authority monotonicity**. An AAIF delegation chain is only safe if, for every hop `i`, `scope(token_i) ⊆ scope(token_{i-1})`. Most AAIF implementations verify the first property (signatures) and *assume* the second (subset relation) because the delegating code "obviously" only passes along what it holds. That assumption is where the invariant dies—not because an agent is malicious, but because an agent reasoning probabilistically over a natural-language scope description re-serializes it into a *different but plausible* scope string, and the subset check is done on strings, not on the semantic lattice. ## What Was Observed A parent orchestrator agent held a capability token with scope `fs:read:/data/reports/*` and `tool:summarize`. It spawned a sub-agent to "analyze the reports and produce a summary," and delegated a token it constructed by asking its own reasoning loop to "derive the minimal scope for this subtask." The reasoning loop emitted `fs:read:/data/**` and `tool:summarize`, `tool:export`. Three structural signals appeared, in this order, and each was individually dismissible: 1. **Scope string widening under paraphrase.** The child scope `fs:read:/data/**` is not a syntactic subset of `fs:read:/data/reports/*`, but a naive glob-subset checker (`fnmatch`-based) returned `False` and the delegating code *logged a warning and proceeded* rather than failing closed. The warning was treated as advisory because the parent "knew" it was delegating read-only access. 2. **Capability accretion via tool enumeration.** The child token carried `tool:export`, which the parent never held. It appeared because the reasoning loop, asked for "minimal scope," enumerated tools it believed useful for "producing a summary" and the AAIF issuer's policy engine had a default-allow rule for tools in the same `tool:` namespace when the requesting principal was a registered agent. The subset invariant was never checked at issuance—only at *use* time, and only per-token, not per-chain. 3. **Chain-depth amnesia.** At hop 3 (a tool proxy the sub-agent invoked), the proxy validated the token it received against the *immediate* parent's public key but did not walk the full chain to the root. It therefore could not observe that hop 1→2 had already violated monotonicity. The proxy's audit log recorded a clean, valid delegation. The observable symptom was not an error. It was an *audit trail that looked correct at every hop while the effective authority at the leaf exceeded the root grant by two tools and one path prefix*. The breach was discovered only when a downstream data-loss-prevention system flagged an `export` call on a path outside `/data/reports/`. ## Condition of Validity The monotonicity invariant `scope(child) ⊆ scope(parent)` holds only when *all* of the following are true, and the failure above requires only one to be false: - **Scope is compared as a lattice, not a string.** The AAIF must define a partial order over scope elements (`fs:read:/data/reports/*` ≤ `fs:read:/data/**`) and check subset against that order. String or glob-prefix comparison is insufficient and produces both false negatives (safe delegations rejected) and, worse here, false positives when the checker is bypassed by a warning-then-proceed path. - **The issuer enforces subset at issuance, not at use.** Any policy engine that default-allows tools within a namespace without intersecting against the *presented parent token's* tool set has already broken the invariant before the child token exists. - **Every verifier walks to the root.** A hop that validates only against its immediate parent cannot detect an upstream violation. Chain validation must be transitive and must re-check monotonicity at each edge, not merely signature validity. - **Natural-language scope derivation is never trusted as a scope source.** An LLM asked to "derive minimal scope" is producing a *candidate*, and candidates must be intersected with the parent scope by a deterministic gate before issuance. ## Decision Boundary The boundary is this: **a delegation step is safe to auto-approve only if the child scope is a provable lattice-subset of the parent scope computed by a deterministic checker; any scope derived by an LLM reasoning loop, or any scope that fails the subset check, must be hard-rejected—not warned-and-proceeded.** Concretely, the decision rule at each delegation edge: - If `subset_lattice(child_scope, parent_scope)` returns `True` → issue, attach full chain. - If it returns `False` → the delegation is *invalid*, full stop. Do not log-and-continue. The parent must either narrow the request or escalate to a human/policy authority outside the chain. - If the child scope was *generated* (by an LLM, a template, or a default-allow rule) rather than *intersected* from the parent → treat as `False` until proven otherwise. Generation is not derivation. The subtle boundary: it is tempting to treat "same namespace, read-only, registered agent" as a safe default. That is exactly the rule that let `tool:export` through. Namespace co-membership is not authority containment. ## Operational Effect When attenuation collapse is unguarded, the operational consequence is a **silent authority inflation that is invisible to per-hop audit**. Every hop's log says "valid delegation," so incident response has no signal to triage on. The blast radius is bounded only by what the leaf agent happens to *do*, not by what it was *authorized* to do—and because the leaf is an LLM, "what it happens to do" is itself nondeterministic. A sub-agent that was scoped to summarize may, on a different sampling, decide to export. The guardrail that restores the invariant is a **deterministic delegation gate** placed between the reasoning loop and the issuer: the LLM proposes a scope, the gate intersects it with the parent scope using a lattice-subset checker, and the gate raises a hard error on any non-subset result. The gate must run at issuance (not use), must be transitive (each edge re-checked), and must fail closed. With it, the child token can never exceed the parent, and the audit trail's per-hop "valid" finally means what it claims. The residual risk after the gate is *lattice modeling error*—if the partial order is defined wrong (e.g., `fs:read:/data/reports/*` incorrectly modeled as incomparable to `fs:read:/data/**`), the gate rejects safe delegations, which is a liveness bug, not a safety bug. Prefer that direction. ```python from dataclasses import dataclass, field from typing import FrozenSet class AttenuationCollapseError(RuntimeError): """Raised when a delegated scope is not a lattice-subset of its parent scope. This is a hard failure: the delegation must not be issued, and the caller must not fall back to warn-and-proceed. Signature validity is irrelevant to this check. """ @dataclass(frozen=True) class ScopeElement: kind: str # e.g. "fs:read", "tool" target: str # e.g. "/data/reports/*", "summarize" # lattice rank: lower is narrower. Callers must supply a correct order. rank: int @dataclass(frozen=True) class CapabilityToken: principal: str scope: FrozenSet[ScopeElement] parent_fingerprint: str | None = None chain: tuple = field(default_factory=tuple) def _covers(parent: ScopeElement, child: ScopeElement) -> bool: """True iff parent's authority contains child's authority. A parent covers a child when the child is the same kind and the parent's rank is <= the child's rank (broader or equal). This is the lattice relation; string/glob comparison is explicitly NOT used. """ return parent.kind == child.kind and parent.rank <= child.rank def assert_monotonic(parent: CapabilityToken, child_scope: FrozenSet[ScopeElement]) -> None: """Enforce scope(child) subset-of scope(parent) at the delegation edge. Raises AttenuationCollapseError on the first uncovered element. Must be called at issuance, and re-called transitively at every verifier hop. """ for c in child_scope: if not any(_covers(p, c) for p in parent.scope): raise AttenuationCollapseError( f"delegation widens authority: child element {c!r} " f"not covered by parent {parent.principal} scope" ) def delegate(parent: CapabilityToken, proposed: FrozenSet[ScopeElement], child_principal: str) -> CapabilityToken: """Issue a child token only if the proposed scope is a lattice-subset. `proposed` may originate from an LLM reasoning loop; it is treated as a candidate and gated deterministically here. No warn-and-proceed path. """ try: assert_monotonic(parent, proposed) except AttenuationCollapseError: # fail closed: never issue a widening token raise return CapabilityToken( principal=child_principal, scope=proposed, parent_fingerprint=f"{parent.principal}:{hash(parent.scope)}", chain=parent.chain + (parent.principal,), ) def verify_chain_transitively(leaf: CapabilityToken, registry: dict) -> None: """Walk root->leaf re-checking monotonicity at every edge. A verifier that only checks the immediate parent cannot detect an upstream violation. This walks the chain and re-runs the subset check per edge. """ prev = None for principal in leaf.chain: token = registry[principal] if prev is not None: assert_monotonic(prev, token.scope) prev = token if prev is not None: assert_monotonic(prev, leaf.scope) ```