# What structural signals indicate a delegation chain has silently widened: the attenuation-inversion failure in A2A capability handoff **Date of Record:** 2026 November 23 **Scope:** Applies to multi-hop agent-to-agent capability delegation where each hop is expected to attenuate (narrow) a prior grant, and where revocation must propagate backward through the chain. Does not apply to single-hop tool calls or to statically provisioned service accounts that never re-delegate. ## Core Distinction The load-bearing distinction is between *nominal attenuation* — the privilege set the delegating agent *believes* it passed downstream — and *effective attenuation* — the privilege set the receiving agent can actually exercise once it composes the delegated grant with its own ambient authority, cached tokens, and previously obtained capabilities. Least-privilege delegation is usually modeled as a monotone narrowing: `scopes(child) ⊆ scopes(parent)`. This invariant holds at the *message* layer and fails at the *agent* layer, because an LLM agent is not a stateless bearer of a single token. It carries a context window full of prior grants, a tool registry that may already hold live credentials, and a probabilistic planner that will happily *reconstruct* a capability it was denied by composing two weaker ones it was allowed. The structural failure is an **attenuation inversion**: hop *N+1* ends up with strictly more effective authority than hop *N*, even though every individual delegation record passes the subset check. This is non-obvious because the audit trail looks clean. Every `delegate` call shows `requested_scopes ⊂ caller_scopes`. The widening happens in the gap between what was requested, what was granted, and what the child can *synthesize* from its residual state. ## What Was Observed A three-hop chain: orchestrator `O` → planner `P` → executor `E`. `O` holds `{fs.read, fs.write, net.fetch, secret.read}`. It delegates to `P` with `{fs.read, net.fetch}` — a clean subset. `P` delegates to `E` with `{fs.read}` — again a clean subset. On paper, `E` can only read files. In practice, `E` executed a write. The trace: 1. `P`'s delegation message to `E` carried `scopes={fs.read}` but also a `parent_context_ref` pointing at `P`'s own working memory, which still contained the raw `net.fetch` grant token `P` had received from `O` (needed because `P` was mid-task and reused its context buffer). 2. `E`, resolving `parent_context_ref` to reconstruct task framing, ingested the embedded `net.fetch` token into its own context. 3. `E`'s planner observed it held `fs.read` and a `net.fetch` capability. It composed them: fetch a remote template, read a local config, and — because the fetched content instructed it to — invoked `fs.write` via a *tool alias* that `E`'s registry mapped to the same filesystem backend as `fs.read` but whose scope string was `fs.rw` (a coarse-grained alias, not present in the subset check because the check compared scope *strings*, not backend *capabilities*). Three independent widenings stacked: **context leakage of a sibling grant**, **capability composition** (fetch + read → write via remote instruction), and **scope-alias collapse** (string-level subset check over a coarser backend). None of them violated the nominal subset invariant. All of them violated effective least-privilege. The revocation failure compounded it. When `O` revoked `net.fetch` at T+40s, the revocation propagated to `P` (direct child) but not to `E`, because `E`'s grant record referenced `P`'s *delegation id*, and `P` had already garbage-collected that id when it forwarded context to `E`. The revocation walk terminated at a dangling parent reference. `E` continued to exercise the leaked `net.fetch` token for another 90 seconds until the token's own TTL expired — a window entirely determined by token lifetime, not by the revocation event. ## Condition of Validity The subset invariant `scopes(child) ⊆ scopes(parent)` is only *sound* — only actually bounds effective authority — when all four of the following hold simultaneously: 1. **Scope strings are faithful to backend capabilities.** No alias maps a narrower-looking string to a broader backend operation. If `fs.read` and `fs.rw` resolve to the same syscall surface, the string comparison is meaningless. 2. **Delegation payloads are capability-closed.** The child receives *only* the attenuated grant, with no `parent_context_ref`, no shared memory handle, and no embedded token from any sibling or ancestor grant. Any pointer back into the parent's context is a widening channel. 3. **The child cannot compose.** Either the child's tool registry refuses to chain two capabilities into a third (no fetch+read→write), or composition is itself gated by an explicit grant. An LLM planner *will* compose; the guardrail must be at the registry, not the prompt. 4. **Revocation is reachable.** Every grant record carries a resolvable parent reference for the full lifetime of the grant, and the revocation walk is depth-first over live references, not over a GC'd id space. When any one fails, the invariant is *nominally* satisfied and *effectively* violated. The failure is silent because the audit log records the subset check passing. ## Decision Boundary The operational decision is where to place the enforcement point. Two options, and the boundary between them is sharp: - **Enforce at the message layer** (validate `requested ⊆ caller` on each `delegate`). Cheap, stateless, and *insufficient* whenever conditions 2–4 can fail. This is what most A2A handoff implementations do, and it is exactly the layer at which the inversion is invisible. - **Enforce at the capability layer** (the child's tool registry resolves every invocation against the *effective* grant set, computed as the intersection of the delegated grant and the backend's true capability, with composition explicitly denied unless granted, and with parent references pinned for the grant's lifetime). More expensive, requires a capability model that maps scope strings to backend operations, but it is the only layer at which composition and alias collapse are observable. Cross the boundary to capability-layer enforcement when **any** of: the chain depth exceeds 1, the child is an LLM agent with a tool registry (i.e., can compose), scope strings are not 1:1 with backend operations, or revocation latency is a stated requirement. Stay at message-layer enforcement only for depth-1 delegation to a deterministic, non-composing tool with a faithful scope model. ## Operational Effect The practical consequences, in order of how they bite: - **Revocation latency becomes token-TTL-bound, not event-bound.** If the revocation walk can hit a dangling parent reference, the effective revocation window is the minimum of (walk success, token TTL). Design for the walk to *fail closed*: an unreachable parent reference must revoke the grant, not orphan it. - **Context handles are capability channels.** Any `parent_context_ref`, shared scratchpad, or memory pointer passed downstream must be treated as a privilege-bearing object and attenuated alongside the scope set. The cleanest fix is to pass a *sanitized* context projection that contains no grant tokens, not a live reference. - **Composition must be denied by default at the registry.** Two individually-permitted capabilities that compose into a third must require an explicit composed grant. The LLM planner cannot be trusted to respect this; it will compose because composition is what planners do. - **Scope strings must be validated against a backend capability map at grant time**, not compared as strings. An alias table that maps `fs.read` and `fs.rw` to overlapping backend operations must be rejected at delegation, not discovered at incident. The invariant to hold: *effective authority at hop N+1 is the intersection of the delegated grant, the backend's true capability set, and the complement of every capability reachable by composition from the delegated grant* — and it must be recomputable from the grant record alone, without dereferencing parent context. ```python from dataclasses import dataclass, field from typing import FrozenSet class AttenuationInversionError(RuntimeError): """Raised when a delegation chain's effective authority exceeds its nominal grant.""" @dataclass(frozen=True) class Grant: grant_id: str scopes: FrozenSet[str] parent_id: str | None backend_caps: FrozenSet[str] # true backend operations this scope set can reach context_ref: str | None = None # any live pointer back into parent state ttl_s: int = 60 # Backend capability map: scope string -> true backend operations it unlocks. SCOPE_TO_BACKEND = { "fs.read": frozenset({"fs.open_ro", "fs.stat"}), "fs.write": frozenset({"fs.open_rw", "fs.stat"}), "fs.rw": frozenset({"fs.open_ro", "fs.open_rw", "fs.stat"}), # alias collapse "net.fetch": frozenset({"net.connect"}), } # Capabilities that, composed, yield a new capability. Registry must deny by default. COMPOSITION_RULES = { frozenset({"net.connect", "fs.open_ro"}): frozenset({"fs.open_rw"}), } def effective_caps(grant: Grant) -> FrozenSet[str]: caps = set() for s in grant.scopes: if s not in SCOPE_TO_BACKEND: raise AttenuationInversionError(f"unknown scope {s!r} in grant {grant.grant_id}") caps |= SCOPE_TO_BACKEND[s] # close under composition changed = True while changed: changed = False for antecedent, consequent in COMPOSITION_RULES.items(): if antecedent <= caps and not consequent <= caps: caps |= consequent changed = True return frozenset(caps) def validate_delegation(parent: Grant, child: Grant) -> None: # 1. nominal subset check (the message-layer check that is necessary but not sufficient) if not child.scopes <= parent.scopes: raise AttenuationInversionError( f"nominal widening: {child.scopes} not subset of {parent.scopes}" ) # 2. context handle is a capability channel — must be sanitized if child.context_ref is not None: raise AttenuationInversionError( f"grant {child.grant_id} carries live context_ref {child.context_ref!r}; " "this leaks sibling/ancestor grants into child effective authority" ) # 3. effective capability must not exceed parent's effective capability parent_eff = effective_caps(parent) child_eff = effective_caps(child) if not child_eff <= parent_eff: raise AttenuationInversionError( f"effective widening at {child.grant_id}: {child_eff - parent_eff} " f"exceeds parent {parent.grant_id}" ) # 4. revocation reachability: parent must be resolvable for the grant's lifetime if child.parent_id != parent.grant_id: raise AttenuationInversionError( f"grant {child.grant_id} parent_id {child.parent_id!r} does not resolve to " f"live parent {parent.grant_id}; revocation walk will orphan this grant" ) def revoke(grant_id: str, live_grants: dict[str, Grant]) -> set[str]: """Depth-first revocation. Unreachable parent => fail closed (revoke the orphan).""" revoked = set() stack = [grant_id] while stack: gid = stack.pop() if gid in revoked: continue revoked.add(gid) for g in live_grants.values(): if g.parent_id == gid: stack.append(g.grant_id) # any grant whose parent is now revoked but which was not reached => orphan for g in live_grants.values(): if g.parent_id in revoked and g.grant_id not in revoked: raise AttenuationInversionError( f"orphan grant {g.grant_id} survived revocation of parent {g.parent_id}; " "revocation walk is not transitively closed" ) return revoked ```