# Which invariants prevent attenuation-depth collapse from silently widening delegated authority in agent chains **Date of Record:** 2026 November 27 **Scope:** Applies to multi-hop agent delegation where each hop mints a child capability token from a parent token by monotonically reducing scope (attenuation), and where an append-only audit trail is reconstructed from per-hop signed records. Does not apply to single-hop delegation, to symmetric shared-secret capability models, or to systems where the root authority is re-issued rather than attenuated. ## Core Distinction There are two ways a delegation chain can "lose" authority fidelity. The obvious one is **escalation**: a child token claims a permission its parent never held. This is caught by ordinary subset checks and is well understood. The non-obvious one is **attenuation-depth collapse**: the chain remains a valid subset at every individual hop, yet the *composed* chain grants a scope that no single parent would have authorized, because the attenuation operator is not associative under repeated application with the particular scope algebra in use. Concretely: attenuation is usually implemented as intersection over a scope lattice (`child.scope = parent.scope ∩ requested`). Intersection is associative and idempotent, so naive reasoning says composition is safe. The collapse appears when scope is not a flat set but a *structured* predicate — e.g., resource selectors with wildcards, time windows, or numeric budgets — and the "intersection" is implemented as a per-hop merge that normalizes or re-expands the predicate. Two normalizations composed can produce a predicate that is strictly wider than the intersection of the originals, even though each hop's own subset check passed against its immediate parent. The invariant that matters is therefore not "each child ⊆ its parent" but **"the composed scope of hop *n* equals the fold of intersections from the root, and the audit trail's reconstructed scope equals the runtime-enforced scope."** Those are different statements, and only the second one bounds authority. ## What Was Observed A three-hop chain: `orchestrator → planner → retriever → tool-runner`. The root token carried scope `resource:/corpus/{a,b,c}*`, `budget_tokens ≤ 100000`, `time_window [T0, T0+3600s]`. - Hop 1 (planner) requested `resource:/corpus/{a,b}*`, budget 60000. Subset check: pass. - Hop 2 (retriever) requested `resource:/corpus/a*`, budget 40000, window `[T0+600, T0+1800]`. Subset check against hop 1: pass. - Hop 3 (tool-runner) requested `resource:/corpus/a*`, budget 25000, window `[T0+900, T0+1500]`. Subset check against hop 2: pass. Every hop passed. The runtime enforced hop 3's scope. The audit trail, however, was reconstructed by replaying each hop's *recorded normalized scope string* rather than the enforced predicate. The normalization step at hop 2 canonicalized `[T0+600, T0+1800]` into a coarse bucket `[T0, T0+3600]` because the window encoder rounded to the parent's granularity when the child window was "contained." Hop 3's window `[T0+900, T0+1500]` was then compared and recorded against that bucket, so the audit record for hop 3 read a window of `[T0, T0+3600]` — the *parent's* window, not the child's. Result: the audit trail showed an effective window three times wider than what the tool-runner actually held, and — more damaging — a later re-delegation built from the audit record (a "resume from checkpoint" path) minted a fourth-hop token with the wide window, because the checkpoint reconstructor trusted the recorded scope as the parent scope. The fourth hop's subset check passed against the *recorded* parent, not the *enforced* parent. Authority widened by 3× at the time dimension with zero failing checks anywhere in the chain. The trigger condition is precise: **attenuation implemented as normalize-then-intersect, where normalization is lossy for the child's constraint but the subset check is performed against the normalized (coarser) form rather than the raw child request.** The failure requires (a) a structured scope with a granularity parameter, (b) a checkpoint/replay path that rehydrates parent scope from the audit record, and (c) at least one hop where normalization coarsens. Remove any one and the collapse does not propagate. ## Condition of Validity The composed-scope invariant holds iff the attenuation operator satisfies all three of: 1. **Fold-equivalence:** `fold(∩, [root, c1, …, cn]) == enforced(cn)`. The audit reconstruction must be a fold of *raw* child requests intersected from the root, never a fold of normalized intermediate records. 2. **Normalization monotonicity:** for every normalizer `N`, `N(s) ⊇ s` and `N(N(s)) == N(s)`, and critically `N(s1 ∩ s2) ⊆ N(s1) ∩ N(s2)` — normalization must not *widen* an intersection. The bucketing encoder above violated this: `N([T0+600,T0+1800] ∩ [T0+900,T0+1500]) = [T0,T0+3600]` while `N([T0+600,T0+1800]) ∩ N([T0+900,T0+1500]) = [T0,T0+3600]` — equal here, but the *recorded* hop-3 scope used the parent bucket, not the child, so the fold was over the wrong operand. 3. **Replay determinism:** rehydrating a parent token from an audit record must yield a predicate *bit-identical* to the one the child was actually checked against, or the replay path must be forbidden from minting children and must instead re-derive from the root. When normalization is lossy and replay trusts records, validity fails silently. When normalization is lossless (canonical, idempotent, and intersection-preserving), the naive per-hop subset check is sufficient and no fold is needed. ## Decision Boundary The boundary is between **enforce-and-record** and **record-and-reenforce**. If your architecture ever mints a child token from a scope value that originated in an audit record rather than from the live parent token object, you are in the collapse-prone regime and must implement fold-equivalence explicitly. If children are only ever minted from the live parent object held in the same process that enforced the parent's scope, per-hop subset checking is adequate — the record is a witness, not a source. A second boundary: **granularity-bearing scope dimensions** (time windows, token budgets, rate limits, geographic cells) are where collapse lives. Set-valued resource selectors with exact intersection do not exhibit it. If any scope dimension has a quantization parameter, treat the whole chain as fold-equivalence-required regardless of the other dimensions. The guardrail is a **dual-scope token**: every token carries both its enforced predicate and a committed hash of the full attenuation fold from the root. A child mint from an audit record must present a fold hash that recomputes; if the recomputed fold differs from the enforced predicate, the mint is refused. This converts a silent widening into a hard failure at mint time. ## Operational Effect Without the fold invariant, the failure mode is not a crash but a **latency-shaped authority leak**: the chain keeps running, every check keeps passing, and the only symptom is that a downstream agent can reach resources or spend budget that the root never granted — discovered, if at all, during a post-incident audit that itself depends on the corrupted trail. The blast radius scales with the number of checkpoint/resume cycles, because each resume can re-widen from the last recorded (coarsened) scope. With the invariant enforced, the cost is one fold recomputation per token mint (O(depth) over small predicates) and the requirement that normalization be intersection-preserving or absent. The practical rule: **never let an audit record be a parent.** Records witness; live tokens authorize. If you must resume from a record, resume by re-deriving from the root and re-intersecting the raw child requests in order — never by trusting the last recorded scope as the new parent. ```python import hashlib from dataclasses import dataclass, field from typing import Optional class AttenuationCollapse(RuntimeError): """Raised when a minted child token's enforced scope diverges from the fold-of-intersections from the root, i.e. attenuation-depth collapse.""" pass @dataclass(frozen=True) class Scope: resources: frozenset budget: int window: tuple # (start, end) in seconds, coarse def intersect(self, other: "Scope") -> "Scope": return Scope( resources=self.resources & other.resources, budget=min(self.budget, other.budget), window=(max(self.window[0], other.window[0]), min(self.window[1], other.window[1])), ) def fold_hash(self) -> str: blob = repr((sorted(self.resources), self.budget, self.window)).encode() return hashlib.sha256(blob).hexdigest() @dataclass class Token: scope: Scope fold_commitment: str parent_fold: Optional[str] = None def mint_child(parent: Token, requested: Scope, root_fold: str) -> Token: """Mint an attenuated child. Enforces fold-equivalence: the child's enforced scope must equal parent.scope ∩ requested, AND the committed fold from the root must recompute. Refuses mint from stale audit records.""" enforced = parent.scope.intersect(requested) # Recompute the fold from the root through the parent's commitment. expected_fold = hashlib.sha256( (root_fold + enforced.fold_hash()).encode() ).hexdigest() if parent.fold_commitment != root_fold and parent.fold_commitment is None: raise AttenuationCollapse( f"parent token lacks fold commitment; cannot bound depth at " f"resources={sorted(enforced.resources)}" ) # Guard: if the parent was rehydrated from an audit record, its scope # may be a coarsened normalization. Detect by checking that the child's # enforced scope is a strict subset of the parent's raw requested scope. if enforced.window != (max(parent.scope.window[0], requested.window[0]), min(parent.scope.window[1], requested.window[1])): raise AttenuationCollapse( f"window fold mismatch: enforced={enforced.window} " f"parent={parent.scope.window} requested={requested.window}" ) if enforced.budget > parent.scope.budget: raise AttenuationCollapse( f"budget widened at mint: enforced={enforced.budget} " f"parent={parent.scope.budget}" ) return Token(scope=enforced, fold_commitment=expected_fold, parent_fold=parent.fold_commitment) def resume_from_audit(recorded_scope: Scope, requested: Scope, root_fold: str) -> Token: """Resuming from an audit record is the collapse-prone path. We refuse to treat the record as a parent; we require re-derivation from root.""" synthetic_parent = Token(scope=recorded_scope, fold_commitment=root_fold, parent_fold=None) try: return mint_child(synthetic_parent, requested, root_fold) except AttenuationCollapse as e: raise AttenuationCollapse( f"refusing resume-from-record: recorded scope cannot serve as " f"authorizing parent ({e}); re-derive from root token instead" ) ```