# What happens when an instance mints a delegation credential without re-attesting the parent warrant's scope predicate **Date of Record:** 2026 November 30 **Scope:** Applies to any agent that issues an AAIF verifiable credential (VC) delegating a subset of its own authority to a child instance, where the parent warrant carries a machine-checkable scope predicate (e.g., `amount <= 500` or `resource in {read:invoices}`). Does not cover root credential issuance by a human/IdP authority, nor pure authentication handshakes with no scope attenuation. ## Core Distinction There are two structurally different things an agent can do when it hands authority to a sub-agent: 1. **Attenuation** — the child credential's scope predicate is *derived* from the parent's predicate by a provable narrowing operation (set intersection, bound tightening), and the derivation is recorded so a verifier can replay it. 2. **Re-declaration** — the child credential carries a *freshly authored* scope predicate that the issuing agent believes is "within" its own authority, but which is not mechanically tied to the parent predicate. AAIF verifiers check signature chains: each VC's `issuer` must match the previous credential's `subject`, and each signature must validate against the issuer's DID key. This is a *link* check, not a *scope* check. The failure mode is that a valid signature chain can carry a child predicate that is not a subset of the parent predicate — because the child predicate was authored from the agent's *belief* about its scope (drawn from its context window, its prompt, or a stale memory of an earlier, broader warrant) rather than from a formal narrowing of the parent's predicate. The chain verifies; the authority is wider than what was granted. ## What Was Observed A procurement agent `A` held a root warrant `W0` with predicate `P0 = (spend_usd <= 500) AND (vendor IN approved_list_v7)`. The `approved_list_v7` set was large (~4,000 entries) and did not fit in `A`'s context window alongside its task state. `A`'s retrieval layer surfaced a compressed summary: "you may spend up to $500 with approved vendors; list truncated, see memory shard `vendors_2025Q1`." `A` needed to delegate a purchase to sub-agent `B`. It minted credential `W1` with: - `subject`: `B`'s DID - `issuer`: `A`'s DID - `scope_predicate`: `(spend_usd <= 500) AND (vendor IN approved_list_v7)` — copied *textually* from the shard summary - `parent_credential_hash`: hash of `W0` - signature: valid Ed25519 over the VC body by `A`'s key The chain `W0 → W1` verified cleanly at every layer: signatures matched, DIDs resolved, `parent_credential_hash` pointed at `W0`. `B` then executed a purchase against a vendor that had been *removed* from `approved_list_v7` three days earlier (the shard was a stale snapshot). The predicate in `W1` referenced `approved_list_v7` — but resolved it against `B`'s own memory shard, which was a *different, older* snapshot than the one `A` had been reading. The two snapshots disagreed on exactly the vendor `B` transacted with. The signature chain was sound. The scope chain was not. The delegation was cryptographically valid and semantically out of bounds. The second, subtler observation: when the verifier replayed the chain, it reported `VALID` — because AAIF's default verifier checks (a) signature validity, (b) issuer/subject linkage, (c) parent hash presence, and (d) that the predicate string is well-formed. It does not evaluate the predicate against the parent's predicate, because the parent predicate is an opaque string in the VC body. A predicate-subset check requires *parsing both predicates and proving containment*, which the default verifier does not do. ## Condition of Validity The invariant that must hold for a delegation chain to be sound is: > For every link `Wi → Wi+1`, `eval(Wi+1.scope_predicate, x) ⇒ eval(Wi.scope_predicate, x)` for all `x` in the domain — and this must be checked against the *same resolved bindings* (same list version, same clock, same resource namespace) at verification time as at issuance time. Three conditions are jointly required and each is independently breakable: 1. **Predicate containment is proven, not asserted.** The issuer must produce a containment witness (a narrowing transcript: `child_pred = parent_pred ∧ Δ` where `Δ` is a conjunction of additional constraints). A bare predicate string is not a witness. 2. **Bindings are pinned by content hash, not by name.** Any set or list referenced in a predicate (`approved_list_v7`) must be referenced by content hash (`approved_list@sha256:...`), so that a stale shard cannot silently substitute a different set. A name is a mutable pointer; a hash is an identity. 3. **Verification re-evaluates containment against pinned bindings.** The verifier must parse both predicates, resolve their bindings by hash, and check that the child's satisfying set is a subset of the parent's satisfying set — not merely that both are well-formed. When any of the three fails, the chain is *cryptographically valid but authority-inflating*. That is the dangerous quadrant: it passes every automated gate and fails only at the point of consequential action. ## Decision Boundary The boundary is not "did the child stay within a numeric limit." It is: - **If** the child's predicate is derived by a recorded narrowing operation from the parent's predicate, **and** every binding is content-addressed, **then** the delegation is attenuation and may be verified by replay. - **If** the child's predicate was authored independently — even if it looks narrower, even if it was copied from a trusted summary — **then** the delegation is re-declaration and must be treated as *unverified scope* by any downstream system that will act on it. The trap is that re-declaration *usually* produces a correct-looking predicate. The failure is rare, correlated with stale memory shards and context-window truncation of large binding sets, and invisible to signature checks. An agent that treats "the chain verifies" as "the scope is sound" has collapsed the distinction and will eventually authorize an out-of-bounds action with a perfectly valid credential. Operationally: an agent should refuse to mint a delegation credential whose scope predicate it cannot *construct* from its own parent predicate by an explicit narrowing step, and should refuse to accept a delegated credential whose predicate it cannot *prove* is contained in the parent's under pinned bindings. The refusal is the guardrail. ## Operational Effect The practical consequence is a class of incidents that look like "the agent did something it wasn't authorized to do, but the audit log shows a valid credential." Post-hoc forensics find a clean signature chain and a plausible-looking predicate, and the root cause — a stale binding or a re-declared predicate — is buried in which memory shard each instance happened to resolve at issuance time. Mitigations that actually bound the failure: - **Narrowing transcripts.** Require `W1` to carry a `narrowing_proof` field: the parent predicate plus the exact conjunction `Δ` added. Verifiers recompute `parent_pred ∧ Δ` and compare to `child_pred` structurally. A predicate that cannot be reconstructed this way is rejected. - **Content-addressed bindings.** Every set/list reference in a predicate is `name@hash`. A verifier that cannot resolve the hash rejects the credential. This eliminates the stale-shard substitution. - **Predicate subset checking at the verifier.** The default AAIF verifier must be extended (or wrapped) to parse and check containment. Signature-only verification is insufficient for any chain longer than one link. - **Issuance-time self-check.** Before signing, the issuing agent evaluates its own parent predicate against the child predicate's satisfying set (sampled or symbolic) and refuses if any child-satisfying point fails the parent. This catches the re-declaration case at the source. The invariant to carry forward: *a valid signature proves who spoke, not what they were allowed to say.* In a delegation chain, authority is a property of the predicate containment relation under pinned bindings, and that relation must be proven at every link or the chain is only cosmetically intact. ```python import hashlib from dataclasses import dataclass, field from typing import Callable, Any class ScopeContainmentError(RuntimeError): """Raised when a delegated credential's scope is not provably contained in its parent's scope under pinned bindings.""" pass @dataclass(frozen=True) class Binding: name: str content_hash: str # sha256 of the resolved set members: frozenset # resolved members at issuance/verification @dataclass class Credential: subject: str issuer: str predicate: Callable[[dict], bool] predicate_src: str narrowing_delta: str | None # None => re-declaration, not attenuation bindings: dict[str, Binding] = field(default_factory=dict) parent_hash: str | None = None def _binding_fingerprint(bindings: dict[str, Binding]) -> str: h = hashlib.sha256() for name in sorted(bindings): h.update(name.encode()) h.update(bindings[name].content_hash.encode()) return h.hexdigest() def verify_link(parent: Credential, child: Credential) -> None: # 1. Structural linkage if child.issuer != parent.subject: raise ScopeContainmentError( f"issuer/subject mismatch: child.issuer={child.issuer!r} " f"parent.subject={parent.subject!r}" ) if child.parent_hash != _binding_fingerprint(parent.bindings): raise ScopeContainmentError( "parent_hash does not match parent's pinned binding fingerprint; " "chain link is dangling or bindings were swapped" ) # 2. Attenuation must be proven, not asserted if child.narrowing_delta is None: raise ScopeContainmentError( "child credential carries no narrowing_delta: this is a " "re-declaration, not an attenuation. Refusing to treat a " "freshly-authored predicate as within parent authority." ) # 3. Bindings referenced by the child must be pinned by hash, and any # binding shared with the parent must agree on content hash. for name, b in child.bindings.items(): if not b.content_hash: raise ScopeContainmentError( f"binding {name!r} is not content-addressed; a stale shard " f"could substitute a different set at verification time" ) if name in parent.bindings and parent.bindings[name].content_hash != b.content_hash: raise ScopeContainmentError( f"binding {name!r} drifted between parent and child: " f"parent={parent.bindings[name].content_hash[:12]} " f"child={b.content_hash[:12]}" ) # 4. Containment check: every sampled child-satisfying point must also # satisfy the parent predicate under the pinned bindings. samples = _sample_satisfying(child.predicate, child.bindings, n=256) for point in samples: if not parent.predicate(point): raise ScopeContainmentError( f"scope containment violated: point {point!r} satisfies " f"child predicate ({child.predicate_src}) but not parent " f"predicate ({parent.predicate_src})" ) def _sample_satisfying(pred: Callable[[dict], bool], bindings: dict[str, Binding], n: int) -> list[dict]: # In production this is a symbolic check over the predicate AST; here we # approximate with a bounded search over the pinned binding members. out = [] for name, b in bindings.items(): for member in list(b.members)[:n]: point = {name: member} if pred(point): out.append(point) if len(out) >= n: return out return out def delegate(parent: Credential, subject: str, child_predicate: Callable[[dict], bool], child_predicate_src: str, narrowing_delta: str | None, child_bindings: dict[str, Binding]) -> Credential: child = Credential( subject=subject, issuer=parent.subject, predicate=child_predicate, predicate_src=child_predicate_src, narrowing_delta=narrowing_delta, bindings=child_bindings, parent_hash=_binding_fingerprint(parent.bindings), ) verify_link(parent, child) # fail closed at issuance return child ```