# Why does an instance lose least-privilege enforcement when a delegated agent chain re-derives scope from capability names instead of from signed warrants? **Date of Record:** 2026 November 28 **Scope:** Applies to multi-hop agent delegations where hop N+1 receives an attenuated capability grant (a warrant) from hop N and invokes tools under an authorization decision made at the tool-call boundary. Does not apply to single-agent, single-hop tool use where the principal and the caller are the same process and no attenuation occurs. ## Core Distinction The failure is not "an agent used a tool it shouldn't have." The failure is subtler: **an intermediate agent in a delegation chain reconstructed the effective scope of a downstream grant by parsing the capability's human-readable name and metadata, rather than by consuming the signed warrant that carried the actual attenuated scope.** The capability *label* said one thing; the *warrant* said something narrower. The label won because it was cheaper to read. This is a distinction between two representations of the same authority: - **The warrant** — a signed, structured object enumerating the exact principal, the exact resource set, an expiry, a monotonic attenuation chain (each hop may only narrow, never widen), and a nonce binding it to this delegation lineage. - **The capability name** — a string like `fs:read`, `repo:write:acme/billing`, or `tool:search`. It is a *label*, not a *claim*. It is meant for humans and logs. It is not an authorization decision. Least-privilege enforcement survives delegation only if every hop's tool-authorization check reads the warrant. It collapses the moment any hop treats the name as the authority, because the name is not attenuated — it is copied verbatim down the chain while the warrant narrows. ## What Was Observed An orchestrator agent `O` held a broad warrant `W0` granting `repo:write` on three repositories: `acme/billing`, `acme/ledger`, `acme/reports`. It delegated a summarization subtask to worker `A` with a narrowed warrant `W1` scoped to `acme/reports` only (attenuation: resource set reduced, expiry halved, `W1.parent = W0`). `A` in turn delegated a sub-subtask to worker `B` with warrant `W2`, further scoped to `acme/reports` and read-only. Worker `B`'s tool-runtime performed its authorization check as follows: it read the capability string attached to the request — `repo:write` — matched it against its local policy table, and found `repo:write` permitted for the calling principal lineage. It then executed a **write** against `acme/billing`. The write succeeded. `W2` did not grant write at all, and did not grant `acme/billing` at all. The name `repo:write` had been propagated unchanged from `W0` through `W1` to `W2` because names are not attenuated; only warrants are. The trace, reconstructed from decision logs: 1. `B` received request with `capability_name = "repo:write"`, `warrant = W2`, `target = "acme/billing"`. 2. Runtime resolved principal lineage → `O → A → B`. Found `repo:write` in lineage's historical capability set (it was present in `W0`). 3. Runtime's check: `capability_name ∈ lineage_capability_names` → `true`. **Warrant was parsed for principal identity only, not for resource scope or attenuation.** 4. Tool executed. No check that `acme/billing ∈ W2.resources`. No check that `write ∈ W2.actions`. No check that `W2` validly attenuates `W1` which validly attenuates `W0`. The bug is a **representation substitution**: the authorization decision consumed a lossy, unattenuated projection of the grant (the name and lineage history) instead of the authoritative, attenuated object (the warrant). Every hop that re-derives scope from names re-widens the grant back toward `W0`, silently, because names are monotonic under delegation while warrants are not. ## Condition of Validity The invariant that must hold for least-privilege across delegation is: > **For any tool invocation at hop N, the authorization decision MUST be a function of the leaf warrant `W_N` alone (plus the tool's own policy), and MUST verify that `W_N` is a valid attenuation chain rooted at a warrant the local trust anchor accepts. The capability name and any lineage-wide capability history MUST NOT contribute to the allow decision.** This holds only when all three of the following are true: 1. **Warrant completeness** — the warrant encodes resource scope *and* action scope *and* expiry *and* the parent link, so that the leaf is self-describing and does not require reconstructing intent from names. 2. **Attenuation monotonicity check at every hop** — each hop verifies `W_child ⊆ W_parent` structurally (subset on resources, subset on actions, `expiry_child ≤ expiry_parent`, `parent_hash` matches). A hop that cannot verify the chain must reject, not fall back to name matching. 3. **Name is inert for authorization** — the capability string is used only for routing, logging, and human display. Any code path where a name participates in an allow decision is a defect, even if it currently agrees with the warrant. The failure mode is *latent* while names happen to match warrants (early in a chain, or when no attenuation has occurred yet), and *live* the instant any hop attenuates. That latency is why it survives testing: single-hop tests pass, two-hop tests with no narrowing pass, and only three-hop chains with real attenuation expose it. ## Decision Boundary The boundary is between two authorization architectures that look identical in logs: - **Warrant-authoritative**: allow iff `target ∈ W_leaf.resources ∧ action ∈ W_leaf.actions ∧ now ≤ W_leaf.expiry ∧ chain_valid(W_leaf)`. Name is ignored. - **Name-authoritative (defective)**: allow iff `capability_name ∈ policy_table ∧ principal_lineage_ever_held(capability_name)`. Warrant is decorative. The observable difference appears only under attenuation. Concretely, the decision boundary is crossed the first time a chain narrows a grant and a downstream hop's check does not read the narrowing. Detection heuristic: for every tool-runtime, assert that removing the `capability_name` field from the request changes no allow/deny outcome. If removing the name changes any decision, the runtime is name-authoritative and will leak privilege under delegation. A second boundary: **fail-closed on unparseable warrants.** A runtime that, upon failing to parse `W_leaf`, falls back to name matching converts a parse error into a privilege escalation. The correct behavior is to deny. The guardrail is that warrant-parse failure and chain-validation failure must raise a distinct, non-recoverable authorization error — never a soft fallback. ## Operational Effect In production this manifests as **silent privilege re-widening under delegation depth**, with three concrete signatures: 1. **Depth-dependent blast radius.** Single-hop tool use is correctly scoped. Privilege leaks appear only at depth ≥ 2 with attenuation, so the blast radius grows with orchestration depth — exactly the configurations sold as "safe decomposition." 2. **Audit-trail disagreement.** Decision logs record `capability_name = repo:write` alongside a warrant that says `read, acme/reports`. Auditors reading names conclude the grant was broad; the warrant says otherwise; the executed action matches neither. Reconciliation requires replaying the chain, not reading the log line. 3. **Attenuation is unverifiable after the fact.** Because the name is copied verbatim, there is no log evidence that attenuation occurred at all. The only durable proof of narrowing is the signed chain, and if the runtime never checked it, the chain was never exercised and its integrity is unproven. The fix is structural, not a patch: make the tool-runtime's authorization function take the warrant as its sole authority input, verify the attenuation chain to a trusted root on every call, and treat the capability name as a routing hint that is asserted-equal-to-nothing. Add a property test that strips names and asserts decisions are invariant. The invariant to enforce — "authorization reads the leaf warrant, never the name, never lineage history" — is what keeps least-privilege from dissolving into least-effort as chains deepen. ```python from dataclasses import dataclass, field from typing import FrozenSet class WarrantScopeViolation(RuntimeError): """Raised when a tool call's target/action is not covered by the leaf warrant, or when the attenuation chain is invalid. Must fail closed — never fall back to capability-name matching.""" @dataclass(frozen=True) class Warrant: principal: str resources: FrozenSet[str] actions: FrozenSet[str] expiry: float parent_hash: str | None self_hash: str def _subset(child: Warrant, parent: Warrant) -> bool: return ( child.resources <= parent.resources and child.actions <= parent.actions and child.expiry <= parent.expiry and child.parent_hash == parent.self_hash ) def authorize_tool_call( *, capability_name: str, # routing/logging only — MUST NOT affect decision leaf: Warrant, chain: list[Warrant], # root .. leaf, inclusive target_resource: str, action: str, now: float, trusted_root_hash: str, ) -> None: # 1. Chain must be well-formed and rooted in a trusted warrant. if not chain or chain[-1].self_hash != leaf.self_hash: raise WarrantScopeViolation("leaf warrant does not match chain tail") if chain[0].self_hash != trusted_root_hash: raise WarrantScopeViolation( f"chain root {chain[0].self_hash!r} not trusted" ) # 2. Every hop must monotonically attenuate its parent. for parent, child in zip(chain, chain[1:]): if not _subset(child, parent): raise WarrantScopeViolation( f"attenuation violated: {child.self_hash} widens {parent.self_hash}" ) # 3. Expiry enforced against the leaf, not the root. if now > leaf.expiry: raise WarrantScopeViolation( f"leaf warrant expired at {leaf.expiry}, now={now}" ) # 4. Scope enforced against the leaf warrant ONLY. # capability_name is deliberately not consulted. if target_resource not in leaf.resources: raise WarrantScopeViolation( f"resource {target_resource!r} not in leaf scope " f"{sorted(leaf.resources)} (capability_name={capability_name!r} ignored)" ) if action not in leaf.actions: raise WarrantScopeViolation( f"action {action!r} not in leaf scope " f"{sorted(leaf.actions)} (capability_name={capability_name!r} ignored)" ) def invoke_tool(runtime, request) -> None: authorize_tool_call( capability_name=request.capability_name, leaf=request.warrant, chain=request.chain, target_resource=request.target, action=request.action, now=runtime.clock.now(), trusted_root_hash=runtime.trust_anchor, ) runtime.execute(request) ```