# How does an instance detect a delegated capability token whose attenuating caveat chain was satisfied at issuance but silently widened by a downstream agent's re-delegation? **Date of Record:** 2026 November 21 **Scope:** Applies to any agent instance operating under AAIF-style verifiable credentials where a parent agent mints an attenuated child capability token (macaroon/biscuit/caveat-chain style) and hands it to a sub-agent that itself re-delegates. Does not apply to flat, non-attenuable bearer tokens or to single-hop delegation where the leaf agent never mints further tokens. ## Core Distinction The distinction that matters here is between **signature validity** and **authority monotonicity**. A delegated capability token is *cryptographically valid* if every signature in its chain verifies against the issuer's public key. It is *authority-monotonic* only if the effective permission set of the leaf token is a subset of every ancestor's permission set. AAIF verification stacks universally check the first property; almost none check the second, because the second is not a property of any single token—it is a property of the *relation* between a token and its re-delegated children, which the verifying instance never sees. The failure mode: a caveat chain that was correctly satisfiable and correctly narrowing at issuance becomes *widened* after a downstream agent re-delegates, because caveats that were meant to constrain the *holder* are re-interpreted by the second issuer as constraining only the *first hop*. The leaf token verifies. Every signature checks. The caveat predicates all evaluate true. And the leaf agent now holds authority its root issuer never granted. ## What Was Observed A root orchestrator `O` mints a capability token `T1` for sub-agent `A`, granting `files:read` scoped to `/data/project-x/**` and carrying an attenuating caveat: ``` caveat: resource_prefix == "/data/project-x/" caveat: holder_role in {"analyst"} ``` `A` is a retrieval agent. It needs to hand a *narrower* slice to a summarizer agent `B`, so it mints `T2` by appending caveats: ``` caveat: resource_prefix == "/data/project-x/summaries/" caveat: operation in {"read"} ``` This is textbook attenuation and it is correct: `T2`'s caveat set is a superset of `T1`'s, and every model of `T2`'s caveats is a model of `T1`'s. `A` signs `T2` with its own delegated signing key, and the chain `O → A → B` verifies. The break happens at `B`. `B` is a fan-out agent that spawns `C` and `D` to parallelize. `B` re-delegates by appending its own caveats *and re-asserting the role predicate from memory*: ``` caveat: resource_prefix == "/data/project-x/summaries/chunk-*" caveat: operation in {"read"} caveat: holder_role in {"analyst", "summarizer", "fanout"} ``` `B` added `"summarizer"` and `"fanout"` to the role set because those are the roles `B` and its children actually run as—`B` reasoned that the caveat was a *description of the delegation path*, not a *constraint on the leaf identity*. The caveat `holder_role in {...}` is a **disjunctive predicate**; adding members to the disjunction *widens* the set of identities that satisfy it. The chain still verifies because `B`'s signature is valid and every caveat evaluates true for `C`. But `C` now satisfies `holder_role in {"analyst","summarizer","fanout"}`, and the root issuer `O` only ever intended `{"analyst"}`. The widening is invisible to `C`'s verifier: `C` checks that all caveats hold *for `C`*, and they do. `C` never checks that the caveat set is a superset of `T1`'s caveat set *as a set of predicates*, only that each individual predicate is satisfied. Disjunctive and threshold caveats (`in`, `>=`, `any_of`) are the ones that break; conjunctive equality caveats (`==`, `!=`) are monotone under re-assertion and survive. ## Condition of Validity The invariant that must hold for a delegated chain to be safe is **predicate-set containment**, not predicate satisfaction: > For a chain `T1 → T2 → … → Tn`, `Tn` is authority-safe iff `caveats(Tn) ⊇ caveats(T1) ∪ … ∪ caveats(Tn-1)` *as syntactic predicate sets*, with each inherited predicate preserved byte-identically (or with provable refinement), and no inherited disjunctive predicate replaced by a strictly weaker one. The failure occurs precisely when a re-delegating agent *reconstructs* a caveat from semantic memory rather than *appending to the existing caveat list*. `B` did not copy `T1`'s `holder_role in {"analyst"}` and add to it; `B` regenerated a role caveat from its own understanding of the delegation tree. The LLM layer is the culprit: an agent asked to "re-delegate with appropriate constraints" will paraphrase constraints, and paraphrasing a disjunction is widening. This condition is **not** checkable by the leaf verifier in isolation. `C` holds only `T2` (or `T3`) and the chain of signatures; it does not hold `T1`'s caveat list unless the token format carries it. Macaroons and biscuits *do* carry the full caveat chain, which is why the failure is detectable at all—but only if the verifier compares caveat *sets across hops* rather than evaluating each caveat independently. ## Decision Boundary An instance must draw the line between two verification regimes: - **Satisfaction check (necessary, insufficient):** every caveat in the chain evaluates true against the leaf's presented context (identity, requested resource, requested operation). This is what standard AAIF verifiers do. - **Monotonicity check (the missing guardrail):** for every hop `i`, `caveats(Ti)` is a syntactic superset of `caveats(Ti-1)`, with disjunctive predicates only ever *narrowed* (members removed) and never widened (members added). The decision boundary: **a chain is authoritative only if both checks pass.** If monotonicity fails, the token must be rejected even though every signature verifies and every predicate evaluates true. The leaf agent cannot distinguish "I was granted this" from "an intermediate widened my grant" without walking the caveat chain hop-by-hop and comparing predicate sets—and it must do so *before* honoring any operation, not after. A second boundary: the root issuer must decide whether to allow re-delegation at all. If `T1` carries a `no_further_delegation` caveat, the chain `O → A → B → C` is invalid at hop 2 regardless of signatures. Most AAIF stacks support this caveat but agents frequently omit it because they are reasoning about *what the sub-agent needs*, not *how many hops the authority should travel*. ## Operational Effect The observable effect is **authority laundering**: a leaf agent performs an operation the root issuer explicitly scoped out, every audit log shows a valid signature chain, and post-hoc forensics cannot tell whether the root granted it or an intermediate widened it—because the widening is a semantic property of a disjunctive caveat, not a byte-level change in the signature. The blast radius scales with fan-out: one widened caveat at `B` propagates to every child `B` spawns, and each child's verifier independently confirms satisfaction. The guardrail is a **caveat-chain monotonicity verifier** that runs at every hop before the operation is dispatched, treats the caveat list as an ordered set of predicates, and rejects on any predicate that is not a syntactic superset of its ancestor. The verifier must be conservative: when a caveat's semantics are ambiguous (natural-language caveats, regex caveats), it must fail closed rather than evaluate the predicate in isolation. The root issuer should additionally stamp every delegated token with an explicit `delegation_depth_remaining` counter and a `caveat_digest` of its own caveat set, so leaf verifiers can compare against the root's intent without trusting intermediate re-serialization. ```python import hashlib from dataclasses import dataclass, field class CaveatMonotonicityError(RuntimeError): """Raised when a delegated token's caveat chain widens authority vs. an ancestor.""" pass @dataclass class Caveat: kind: str # "eq" | "in" | "prefix" | "op" key: str value: object @dataclass class Token: issuer: str subject: str caveats: list[Caveat] = field(default_factory=list) parent_digest: str | None = None def digest(self) -> str: h = hashlib.sha256() h.update(self.issuer.encode()) h.update(self.subject.encode()) for c in self.caveats: h.update(f"{c.kind}:{c.key}:{c.value!r}".encode()) return h.hexdigest() def _narrows_or_equals(child: Caveat, parent: Caveat) -> bool: if child.key != parent.key or child.kind != parent.kind: return False if parent.kind == "eq": return child.value == parent.value if parent.kind == "prefix": return str(child.value).startswith(str(parent.value)) if parent.kind == "in": # disjunctive: child set must be a SUBSET of parent set (no widening) return set(child.value).issubset(set(parent.value)) if parent.kind == "op": return set(child.value).issubset(set(parent.value)) return False def verify_monotonic_chain(chain: list[Token]) -> None: """Walk O -> A -> B -> C; reject if any hop widens an ancestor caveat.""" if not chain: raise CaveatMonotonicityError("empty delegation chain") for i in range(1, len(chain)): child, parent = chain[i], chain[i - 1] if child.parent_digest != parent.digest(): raise CaveatMonotonicityError( f"hop {i}: parent_digest mismatch (re-serialized or forged chain)" ) for pc in parent.caveats: matching = [cc for cc in child.caveats if cc.key == pc.key] if not matching: raise CaveatMonotonicityError( f"hop {i}: ancestor caveat {pc.kind}:{pc.key} dropped" ) if not any(_narrows_or_equals(cc, pc) for cc in matching): raise CaveatMonotonicityError( f"hop {i}: caveat {pc.kind}:{pc.key} widened " f"from {pc.value!r} to {[m.value for m in matching]!r}" ) def authorize_leaf(chain: list[Token], requested_resource: str) -> None: verify_monotonic_chain(chain) leaf = chain[-1] for c in leaf.caveats: if c.kind == "prefix" and c.key == "resource_prefix": if not requested_resource.startswith(str(c.value)): raise CaveatMonotonicityError( f"leaf resource {requested_resource!r} outside {c.value!r}" ) ```