Where must an instance enforce scope attenuation when delegating capabilities across a multi-hop agent chain, and why does intersection-only attenuation silently over-grant?
**Date of Record:** 2026 December 2 **Scope:** Applies to any agent runtime where an orchestrator instance mints a delegated capability token (bearing a scope set) for a sub-agent, and that sub-agent may re-delegate to a further instance. Does not apply to single-hop delegation with no onward re-delegation, nor to capabilities whose scope is a single opaque boolean.
Core Distinction
Least-privilege delegation is usually modeled as a set-intersection invariant: a child's granted scope must equal `parent_scope ∩ requested_scope`. This is correct for *capability monotonicity* — a child can never hold a permission its parent lacks — but it is **not sufficient** to prevent over-granting across a multi-hop chain. The reason is that scope is not a flat set; it is a set of *scoped predicates* (e.g. `files:read:/tenant/A/*`, `http:post:api.internal/refund`). Two predicates can be logically disjoint yet share a nominal namespace token, and a naive intersection keyed on the namespace token (`files:read`) will retain the child's predicate unchanged when the parent's predicate is *narrower along a different axis*. The intersection operator must be defined over the predicate lattice (namespace × resource pattern × constraint), not over the namespace label. When it is defined over the label, a re-delegating intermediate instance can launder a narrow parent grant into a broad child grant because the intersection "succeeds" on the label while the resource pattern is silently widened.
The invariant that actually holds is: **attenuation must be a lattice meet (greatest lower bound), and the meet must be computed on the full predicate, with the parent's constraint set as an upper bound that the child's predicate is *provably a subset of* — otherwise the delegation is rejected, not silently approximated.** Intersection-by-label violates this because it is a lossy projection.
What Was Observed
An orchestrator `O` held a capability `files:read` scoped to `pattern=/tenant/A/reports/*` with constraint `max_bytes=1_000_000`. It delegated to worker `W` a request for `files:read` scoped to `pattern=/tenant/A/*` (broader) — correctly rejected by subset check. `W` then re-delegated to `W2` requesting `files:read` with `pattern=/tenant/A/reports/*` but constraint `max_bytes=50_000_000` (looser constraint, same pattern). The runtime's intersection routine keyed on the namespace token `files:read`, found the labels equal, and returned the *child's* predicate verbatim — including the loosened `max_bytes`. The subset check compared patterns only (`/tenant/A/reports/*` ⊆ `/tenant/A/reports/*` → pass) and never compared the constraint axis. `W2` then read a 40 MB file under `/tenant/A/reports/` — a resource `O` was never authorized to expose at that size. The trace showed three successful "attenuation" steps, each of which had *widened* the effective authority along the constraint axis while the pattern axis stayed constant.
The failure is not a race and not a prompt injection. It is a **type error in the attenuation algebra**: the runtime treated scope as `Set[Namespace]` when the domain requires `Set[(Namespace, Pattern, Constraint)]` ordered by the product lattice, and it computed the meet only on the first coordinate.
Condition of Validity
The intersection-as-attenuation shortcut is valid only when all of the following hold:
- Scope predicates are totally ordered by set inclusion on *every* axis, and the runtime's subset check covers every axis. If any axis (constraint, time window, rate, tenant) is compared by label equality rather than inclusion, the meet is unsound on that axis.
- Re-delegation depth is 1. At depth ≥ 2, each intermediate hop is a fresh opportunity to project onto the label and lose the constraint; the loss is not recoverable at the leaf because the leaf only sees its immediate parent's token.
- The token carries the *full* predicate, not a namespace summary. If the wire format is `{"cap":"files:read","scope":"tenant/A"}`, the constraint axis has already been dropped before the child ever reasons about it.
When any of these fail — and in practice (2) and (3) fail routinely in MCP-style capability handoffs where the token is a short string — the runtime must not rely on intersection. It must carry an explicit **provenance chain** and recompute the meet against the *root* grant, or reject.
Decision Boundary
The boundary is this: **a delegation is admissible iff the child's predicate is a provable subset of the parent's predicate on the full lattice, and the proof is checked against the accumulated chain, not the immediate parent.** The runtime must choose between two behaviors at the boundary:
- **Meet-and-carry (default):** compute `child = parent ⊓ requested` on every axis; if any axis's meet is empty (disjoint patterns, or a constraint the parent cannot satisfy), reject with a typed attenuation error rather than falling back to the child's value. The token embeds the meet, not the request.
- **Chain-replay (for depth > 1):** the leaf re-derives `effective = root ⊓ hop1 ⊓ hop2 ⊓ …` from the signed provenance chain and rejects if any hop's declared scope is not a subset of the running meet. This bounds the laundered-widening attack because a single hop that widened on any axis fails the running-subset check at the next hop.
The choice is forced by whether the token format can express the full predicate. If it cannot (short-string caps), the runtime is *below* the decision boundary and must treat all re-delegation as untrusted and re-authorize at the leaf.
Operational Effect
With meet-and-carry on the full lattice, the observed over-grant is caught at hop 2: the meet of `max_bytes=1_000_000` and `max_bytes=50_000_000` under "child must be ≤ parent" is `1_000_000`, and the requested `50_000_000` is rejected as a widening, not silently clamped to the child's value. The cost is that every delegation must carry and compare the constraint axis, which means the capability token cannot be a bare namespace string — it must be a structured predicate with a signed provenance list. In exchange, the invariant "no leaf ever holds authority exceeding the root grant on any axis" becomes checkable at each hop in O(axes) time, and a re-delegating intermediate cannot launder authority by projecting onto the label. The residual risk moves to the constraint-comparison code itself: if two constraints are incomparable (e.g. `max_bytes=1M` vs `allowed_tenants={A,B}`), the meet is undefined and the runtime must reject rather than pick one — an undefined meet is not a permissive meet.
from dataclasses import dataclass, field
from typing import FrozenSet, Optional
class AttenuationError(RuntimeError):
"""Raised when a delegated scope is not a provable subset of the parent's scope."""
pass
@dataclass(frozen=True)
class ScopePredicate:
namespace: str
pattern: str # e.g. "/tenant/A/reports/*"
max_bytes: int # upper bound on resource size
tenants: FrozenSet[str] = field(default_factory=frozenset)
def _pattern_subset(child: str, parent: str) -> bool:
# Prefix-glob subset: child must be contained in parent's glob.
if not parent.endswith("/*"):
return child == parent
return child.startswith(parent[:-1])
def meet(parent: ScopePredicate, child: ScopePredicate) -> ScopePredicate:
"""Lattice meet on the full predicate. Rejects widening on ANY axis."""
if parent.namespace != child.namespace:
raise AttenuationError(
f"namespace mismatch: parent={parent.namespace} child={child.namespace}")
if not _pattern_subset(child.pattern, parent.pattern):
raise AttenuationError(
f"pattern widening: child={child.pattern} not subset of parent={parent.pattern}")
if child.max_bytes > parent.max_bytes:
raise AttenuationError(
f"constraint widening on max_bytes: child={child.max_bytes} > parent={parent.max_bytes}")
if not child.tenants.issubset(parent.tenants) and parent.tenants:
raise AttenuationError(
f"tenant widening: child tenants {set(child.tenants)} not subset of {set(parent.tenants)}")
# Meet is the tighter of the two on every axis.
return ScopePredicate(
namespace=parent.namespace,
pattern=child.pattern if _pattern_subset(child.pattern, parent.pattern) else parent.pattern,
max_bytes=min(parent.max_bytes, child.max_bytes),
tenants=child.tenants if child.tenants else parent.tenants,
)
def delegate_chain(root: ScopePredicate, hops: list[ScopePredicate]) -> ScopePredicate:
"""Replay the chain against the running meet; reject any hop that widens."""
running = root
for i, hop in enumerate(hops):
try:
running = meet(running, hop)
except AttenuationError as e:
raise AttenuationError(f"hop {i} rejected: {e}") from e
return running
# Reproduces the observed over-grant: same pattern, looser constraint.
root = ScopePredicate("files:read", "/tenant/A/reports/*", max_bytes=1_000_000, tenants=frozenset({"A"}))
hop1 = ScopePredicate("files:read", "/tenant/A/reports/*", max_bytes=50_000_000, tenants=frozenset({"A"}))
try:
delegate_chain(root, [hop1])
except AttenuationError as e:
print("BLOCKED:", e) # constraint widening caught at hop 0