Under what conditions must an instance re-derive its delegated-authority closure before each privileged tool call, and why AAIF scope attenuation fails silently at the third hop
**Date of Record:** 2026 December 2 **Scope:** Applies to agents operating under AAIF verifiable credentials (VCs) with chained delegation (agent → sub-agent → tool-invoker) where authorization scopes are attenuated per hop and the executing instance holds only its own VC plus an opaque delegation chain. Does not apply to single-hop, root-issued bearer tokens or to human-session OAuth flows without agent intermediaries.
Core Distinction
The distinction that governs everything below is between **scope membership** (does the presented credential's `scope` array contain the requested capability?) and **scope closure** (is the requested capability reachable from the *root issuer* through every attenuation edge in the chain, under the current revocation and constraint state?). AAIF verification as commonly implemented checks membership at the leaf: the executing instance validates its own VC signature, checks that `requested_capability ∈ vc.scope`, and proceeds. That check is necessary but not sufficient. A delegated credential can be *locally valid and locally in-scope* while being *globally unauthorized*, because attenuation is enforced at issuance time, not at use time, and the chain is presented as an opaque blob that the leaf instance is not required to re-walk.
The failure is silent because nothing in the leaf-side check fails. The signature is good. The scope contains the capability. The `exp` is in the future. The only thing that is false is the transitive implication `root_scope ⊇ leaf_scope`, and no single field in the leaf VC encodes that implication.
What Was Observed
A three-hop chain: orchestrator `O` (root, holds `scope = {read:repo, write:repo, deploy:staging}`), delegates to planner `P` with `scope = {read:repo, write:repo}` (correctly attenuated — `deploy:staging` dropped), which delegates to executor `E` with `scope = {read:repo, write:repo, deploy:staging}`. `E`'s VC is signed by `P`, is cryptographically valid, and its scope array *does* contain `deploy:staging`. The attenuation edge `P → E` was supposed to be a subset operation, but the delegation-issuance code in `P` merged a cached capability set from an earlier, broader session (a stale `P`-side working set) rather than intersecting with `P`'s own effective scope. `P` cannot grant what `P` does not hold; the issuance should have failed with a subset violation, but `P`'s issuer only checked that `E`'s requested scope was well-formed, not that it was `⊆ P.effective_scope`.
At execution time, `E` called a privileged deploy tool. The tool's policy engine (a separate trust domain) checked `E`'s VC: signature valid, `deploy:staging ∈ scope`, not expired. Deploy executed against staging with `E`'s authority — authority that `O` never granted to `P` and therefore never transitively granted to `E`. The escalation was invisible at every individual checkpoint. It was only caught by a downstream audit that replayed the chain and computed `O.effective_scope ∩ … ∩ E.scope` and found the intersection empty for `deploy:staging`.
The trigger condition, stated precisely: **an intermediate delegator issues a child credential whose scope is not a subset of the delegator's *effective* scope, where "effective" means the delegator's own VC scope intersected with all upstream constraints — and the leaf verifier performs only local membership checking.** The failure requires (a) at least three hops, (b) an intermediate issuer that validates shape but not subset, and (c) a leaf verifier that trusts the presented chain without re-walking it. All three are the default configuration in most AAIF deployments because re-walking is expensive and the chain is treated as a bearer artifact.
Condition of Validity
The invariant that must hold for the leaf check to be sound is:
∀ hop i in chain: scope(i) ⊆ effective_scope(i-1)
where effective_scope(j) = scope(j) ∩ ⋂_{k<j} constraints(k)
The leaf-side membership check `requested ∈ scope(leaf)` is sound **only if** the chain satisfies the subset invariant at every edge *and* the leaf re-derives `effective_scope(leaf)` rather than trusting `scope(leaf)` as presented. These are two separate conditions and both are routinely violated:
- **Issuance-side subset enforcement** is the delegator's job. It fails when the delegator computes the child's scope from anything other than its own `effective_scope` — a cached capability set, a default template, a union with a sibling's scope, or a model-generated scope list (LLMs asked to "request the scopes you need" will over-request, and a permissive issuer will honor it).
- **Verification-side closure re-derivation** is the leaf's job. It fails whenever the leaf treats the VC as self-contained. A VC's `scope` field is a *claim by the issuer*, not a proof of authority; the proof is the chain, and the chain must be folded.
The validity condition is therefore: *a privileged action is authorized iff the capability is a member of the fold of the chain under intersection-and-constraint, not iff it is a member of the leaf's declared scope.* Any architecture that collapses the fold into a single presented scope array has moved the trust boundary to the issuer and must therefore treat issuer compromise or issuer bug as equivalent to root compromise.
Decision Boundary
The operational question is when an instance must pay the cost of re-deriving closure versus when it may trust the presented scope. The boundary is not "always re-walk" (too expensive, and most chains are short and root-issued). It is:
- **Re-derive closure when the chain length ≥ 2 and the requested capability is in a privileged class** (write, deploy, delete, spend, external-egress, credential-mint). Privileged capabilities are exactly where the escalation cost exceeds the verification cost.
- **Re-derive closure when the presenting credential's issuer is not the root** and the issuer is a peer agent rather than a trusted authorization service. Peer-issued credentials carry peer bugs.
- **Re-derive closure when any upstream constraint is time-bounded, budget-bounded, or condition-bounded** (e.g., `deploy:staging` valid only during a change window). Constraints are not visible in the leaf scope array; they live in the chain, and a constraint that has lapsed turns an in-scope capability into an unauthorized one without changing a single byte of the leaf VC.
- **Trust the presented scope only when the leaf VC is root-issued (chain length 1) or when the chain has been pre-validated and pinned by a trusted verifier within the current execution epoch** — and treat epoch boundaries (checkpoint/resume, context compaction, sub-agent handoff) as invalidating the pin.
The boundary is crossed the moment an instance resumes from a checkpoint, receives a delegated task from a peer, or is asked to perform a privileged action on a chain it did not itself construct. At that moment, the presented scope is a *hint*, and closure is the *fact*.
Operational Effect
The practical consequence is that authority in a multi-hop AAIF system is **non-monotonic under state change** and must be treated as a derived value, not a stored one. An instance that caches its effective authority across a checkpoint inherits whatever escalation existed at checkpoint time; an instance that re-derives it at each privileged call bounds the blast radius to a single call. The re-derivation is cheap — a fold over a handful of scope arrays and constraint predicates — but it is not free, and the temptation to cache is strong precisely because the fold is deterministic and the chain rarely changes. The chain *does* change: revocations propagate, constraints lapse, and upstream issuers get patched. A cached closure is a stale closure, and a stale closure in a privileged path is an escalation waiting for its trigger.
The guardrail is a single architectural invariant: **privileged tool invocations must carry a freshly folded authority witness, and the tool's policy engine must reject any witness whose fold does not terminate at the root issuer with a non-empty intersection containing the requested capability.** The witness is not the VC; it is the *result* of walking the VC's chain. The leaf presents the witness, the tool verifies the witness against the chain, and the leaf is forbidden from presenting a witness it did not compute in the current epoch. This moves the subset check from issuance-time-only (where it is unenforced) to use-time (where it is enforced), and it makes the failure loud: an escalated leaf produces a witness whose fold is empty, and the tool refuses.
from dataclasses import dataclass, field
from typing import Iterable
class AuthorityClosureError(RuntimeError):
"""Raised when a delegated credential's scope is not reachable from the root issuer."""
@dataclass(frozen=True)
class Credential:
issuer: str
subject: str
scope: frozenset[str]
constraints: frozenset[str] = field(default_factory=frozenset)
parent_issuer: str | None = None
def fold_effective_scope(chain: list[Credential], active_constraints: Iterable[str]) -> frozenset[str]:
"""Walk a delegation chain root-first, intersecting scopes and applying constraints.
chain[0] must be the root-issued credential (parent_issuer is None).
"""
if not chain or chain[0].parent_issuer is not None:
raise AuthorityClosureError("chain does not terminate at a root issuer")
active = frozenset(active_constraints)
effective = frozenset(chain[0].scope)
for i, cred in enumerate(chain[1:], start=1):
if cred.parent_issuer != chain[i - 1].issuer:
raise AuthorityClosureError(
f"broken delegation edge at hop {i}: issuer {cred.issuer!r} "
f"claims parent {cred.parent_issuer!r} but previous issuer is {chain[i-1].issuer!r}"
)
# Subset invariant: a delegator cannot grant what it does not effectively hold.
if not cred.scope <= effective:
raise AuthorityClosureError(
f"scope escalation at hop {i}: {cred.issuer!r} granted "
f"{sorted(cred.scope - effective)} not held by delegator"
)
# Lapsed constraints silently strip authority even when scope arrays match.
if not cred.constraints <= active:
raise AuthorityClosureError(
f"constraint violation at hop {i}: {sorted(cred.constraints - active)} not active"
)
effective = effective & cred.scope
return effective
def authorize_privileged_call(
chain: list[Credential],
requested: str,
active_constraints: Iterable[str],
epoch_folded: bool,
) -> None:
"""Gate a privileged tool call on a freshly derived authority witness."""
if not epoch_folded:
# Cached closure from a prior checkpoint/handoff epoch is not admissible.
raise AuthorityClosureError(
f"refusing privileged call {requested!r}: authority witness is stale "
"(not folded in current execution epoch)"
)
effective = fold_effective_scope(chain, active_constraints)
if requested not in effective:
raise AuthorityClosureError(
f"refusing privileged call {requested!r}: not in effective scope "
f"{sorted(effective)} (leaf declared {sorted(chain[-1].scope)})"
)