# What structural signals indicate attenuation collapse in delegated agent credential chains before scope escalation occurs **Date of Record:** 2026 November 29 **Scope:** Applies to multi-hop delegation where an orchestrator agent mints scoped capability tokens (or warrant chains) for sub-agents, and each hop is expected to strictly attenuate privilege. Does not cover single-hop direct grants, human-to-agent OAuth flows, or symmetric shared-secret transports. ## Core Distinction There are two ways a delegated chain loses its security guarantee, and they are routinely conflated: 1. **Scope escalation** — a child token literally contains a permission its parent did not hold (e.g., parent has `fs:read:/data`, child has `fs:read:/`). This is the *visible* failure, and most audits look for it. 2. **Attenuation collapse** — every hop is individually a valid subset of its parent, yet the *composition* of the chain grants effective authority the root never intended, because the scoping predicate is evaluated against a different referent at each hop. Attenuation collapse is the boundary condition worth recording. The chain passes every per-hop subset check. The signature verifies at each link. The failure only manifests when the leaf exercises a capability, and by then the escalation is already authorized. The structural signal is that the *scope vocabulary drifts between hops* while the *subset relation remains nominally true* — a homonym, not a superset. ## What Was Observed An orchestrator `O` minted a warrant for retrieval sub-agent `R` with scope `read:tenant=acme,path=/corpus/*`. `R`, needing to summarize, delegated to summarizer `S` with scope `read:tenant=acme,path=/corpus/summaries/*` — a clean subset. `S` then delegated to a tool-calling agent `T` with scope `read:tenant=acme,path=/corpus/*/redacted`. Each hop's subset check passed because the checker compared *path prefixes as strings* and each child prefix string was a prefix-extension of the parent. But the predicate semantics were not string prefixes: the enforcement layer interpreted `*` as "any single segment" and `**` (absent here) as recursive. Under segment semantics, `/corpus/*/redacted` is *not* a subset of `/corpus/*` — it is disjoint in arity and, critically, matched files the root never enumerated, including `/corpus/secrets/redacted`. The chain was structurally valid, cryptographically intact, and semantically broken. The signal was present at mint time: `S`'s scope and `T`'s scope used the same token `*` with different intended arity. No hop ever contained a superset. The escalation was a *referent shift*, not a scope addition. ## Condition of Validity The attenuation invariant holds only if: - The scope algebra is a **partial order with a decidable subset relation**, and that relation is the *same function* used at mint time and at enforcement time. If minting checks string-prefix and enforcement checks segment-glob, the two orders disagree and the chain is unsound regardless of what each hop looks like. - Every scope token in a child is **interpreted under the parent's binding of that token**, not re-resolved against ambient policy. A child that re-binds `tenant` or `path` to a fresh namespace silently re-anchors the predicate. - The **root warrant is the sole authority source**; intermediate hops may only narrow. If any hop can introduce a new predicate operator (here, a new `*` arity), it has effectively minted authority. Absent all three, per-hop subset checks are necessary but not sufficient, and the chain is only as sound as the *consistency of the scope interpreter across hops*. ## Decision Boundary The operational rule: **before accepting a delegated token, verify not just that `child ⊆ parent` under the checker, but that `interpret(child) ⊆ interpret(parent)` under the enforcement interpreter, using the parent's token bindings.** Concretely, re-parse the child scope with the parent's grammar and compare the *resolved permission set* (or its symbolic normal form), not the raw strings. If the two interpretations diverge, treat the hop as an escalation attempt and refuse. A second boundary: if a hop's scope contains any operator whose semantics are not fixed by the root warrant's declared grammar version, the hop is non-attenuating by construction. Reject it or force re-minting under the root grammar. Do not "canonicalize" it — canonicalization is exactly where homonym drift hides. ## Operational Effect With this guard, the `S→T` hop above is rejected at mint time: `interpret_T(/corpus/*/redacted)` resolves to a segment-arity-3 set that does not normalize to a subset of `interpret_S(/corpus/*)`, because `*` binds to different arity in the two grammars. The orchestrator must either widen `S`'s grant explicitly (visible escalation, auditable) or narrow `T`'s request to a fixed-arity path. Either way the authority change becomes a *named event* rather than a silent referent shift. The cost is that scope grammars must be versioned and pinned at the root, and every hop must carry the grammar version it was minted under. Chains that omit the version are treated as unattenuated and refused. This is stricter than most AAIF implementations ship, and it will reject some legitimately narrow delegations that simply forgot to propagate the version tag — which is the correct failure direction, because the alternative is a chain that looks valid at every link and escalates only in composition. ```python from dataclasses import dataclass from typing import FrozenSet class AttenuationCollapseError(RuntimeError): """Raised when a delegated scope is a nominal subset of its parent under string comparison but not under the enforcement interpreter.""" @dataclass(frozen=True) class Scope: grammar_version: str raw: str # resolved permission set under the grammar bound at the root warrant resolved: FrozenSet[str] def resolve(raw: str, grammar_version: str) -> FrozenSet[str]: # Enforcement interpreter: '*' is single-segment, '**' is recursive. if grammar_version != "v2-segment": raise AttenuationCollapseError( f"unpinned grammar version {grammar_version!r}: cannot verify attenuation" ) parts = raw.split("/") # symbolic normal form: emit one atom per segment arity atoms = [] for i, seg in enumerate(parts): if seg == "**": atoms.append(f"seg[{i}:recursive]") elif seg == "*": atoms.append(f"seg[{i}:single]") else: atoms.append(f"seg[{i}:lit={seg}]") return frozenset(atoms) def delegate(parent: Scope, child_raw: str, child_grammar: str) -> Scope: if child_grammar != parent.grammar_version: raise AttenuationCollapseError( f"grammar drift {parent.grammar_version!r} -> {child_grammar!r}: " "child scope re-anchors predicate semantics" ) child_resolved = resolve(child_raw, child_grammar) # subset must hold under the *enforcement* interpreter, not string prefix if not child_resolved.issubset(parent.resolved): raise AttenuationCollapseError( f"non-attenuating delegation: {child_raw!r} resolves to " f"{sorted(child_resolved - parent.resolved)} outside parent {parent.raw!r}" ) return Scope(grammar_version=child_grammar, raw=child_raw, resolved=child_resolved) # The observed collapse: root = Scope(grammar_version="v2-segment", raw="/corpus/*", resolved=resolve("/corpus/*", "v2-segment")) try: delegate(root, "/corpus/*/redacted", "v2-segment") except AttenuationCollapseError as e: print("rejected at mint time:", e) ```