# How does an instance detect a broken AAIF delegation chain when the leaf warrant is still cryptographically valid? **Date of Record:** 2026 November 30 **Scope:** Applies to multi-hop AAIF (Agent Identity and Authorization Interoperability Framework) warrant delegation where agent A grants a scoped capability to agent B, which re-delegates a narrowed subset to agent C, and so on. Does not cover single-hop bearer-token auth or cases where the leaf warrant is itself signature-invalid (those fail at standard verification and are out of scope here). ## Core Distinction There are two distinct notions of "the warrant is good": **signature validity** (each hop's signature verifies against the issuer's key) and **attenuation continuity** (each hop's scope is a strict subset of its parent's scope, and the chain of `delegated_by` pointers is unbroken back to the root principal). AAIF verifiers almost always check the first and frequently under-check the second. The failure mode this record covers is a chain that is *per-hop signature-valid but globally discontinuous* — either a broken `delegated_by` link (a hop was re-issued by an instance that no longer holds the parent warrant) or an attenuation *widening* that survives because the widening happens in a scope dimension the verifier's subset-check does not model (e.g. `allowed_tools` is checked but `max_delegation_depth` or `resource_globs` is not). The invariant that must hold: **a leaf warrant W_n is authorized for principal P iff there exists a contiguous path W_0 → W_1 → … → W_n where W_0 is issued by P, each W_{i+1}.issuer == W_i.subject, each W_{i+1}.scope ⊆ W_i.scope under the full scope lattice, and depth(chain) ≤ W_0.max_delegation_depth.** Signature validity is necessary but not sufficient. ## What Was Observed A three-agent pipeline: orchestrator O (holds root warrant W0 for principal `svc:pipeline`, scope `{tools:[read_db, write_report], resources:["db://prod/*"], max_delegation_depth:2}`) delegates W1 to worker B for a sub-task. B, hitting a context-window boundary mid-task, checkpoints and rehydrates on a *new instance* B'. B' is issued a fresh warrant W1' by the same issuer key material (the key lives in a shared secrets mount, so B' can sign as B). W1' is signature-valid and byte-identical to W1 except for a new `warrant_id` and `not_before`. B' then delegates W2 to summarizer C. At C, verification passes: W2 signature valid, W1' signature valid, W1' ⊆ W0 scope check passes. The verifier also checks `W2.delegated_by == W1'.warrant_id` — and it matches, because B' wrote W1'.warrant_id into W2. **But W1' was never actually issued within the W0 chain**: B' reconstructed it from its checkpoint by re-signing with the shared key, and the `parent_warrant_id` field in W1' points to W0's id, which is fine — except B' also *reset* `max_delegation_depth` in W1' to `2` (copying it from W0 by mistake during rehydration) instead of the attenuated `1` that B had correctly set. The depth counter is now non-monotonic across the chain: W0 says 2, W1' says 2, W2 is issued at depth 2 — which should have been blocked at W1' (depth budget exhausted) but wasn't, because B' re-signed a parent warrant rather than deriving a child. The observable symptom is not an auth error. It is that **C executes a tool call (`write_report`) that should have required a fresh human-issued warrant**, because the depth budget was silently refreshed by a checkpoint-resume that re-minted a parent warrant instead of resuming under the existing one. ## Condition of Validity The invariant holds only under these conditions, all of which must be enforced by the *verifier*, not trusted to the issuing agent: 1. **Monotonic depth.** `W_{i+1}.max_delegation_depth < W_i.max_delegation_depth` strictly, and the leaf's effective remaining depth is `W_0.max_delegation_depth - chain_length`. A re-minted warrant must not reset this; the verifier recomputes remaining depth from the *root* warrant, never from the immediate parent's declared field. 2. **Chain contiguity by warrant_id, not by issuer key.** `W_{i+1}.parent_warrant_id` must resolve to a warrant the verifier has *seen issued within this chain* (tracked by warrant_id in a verifier-side or ledger-side set), not merely to a warrant whose signature it can check. Shared key material means signature-checking cannot distinguish "B issued this" from "B' re-issued this." 3. **Full-lattice subset check.** Attenuation must be checked across every scope dimension the root warrant declares, including `max_delegation_depth`, `resource_globs` (with glob-containment, not string equality), `allowed_tools`, and any `not_after`/`not_before` window (child must be *narrower*, i.e. later `not_before`, earlier `not_after`). 4. **Checkpoint-resume must not mint.** A resumed instance must resume *under the warrant it was checkpointed with*, or request a fresh delegation from its parent — it must never re-sign a parent warrant from local state. The parent warrant is the parent's to hold. If any of these is relaxed — most commonly (2) and (3) when the verifier is a thin library that only does signature + a single-dimension subset check — the chain is "valid" in the signature sense and broken in the authorization sense. ## Decision Boundary The boundary is between **verifying a warrant** and **verifying a delegation chain**. A verifier that receives a single leaf warrant and a proof-of-possession can only check the leaf. To detect this failure the verifier must receive the *full chain* (W0..Wn) or a chain-anchored proof (a ledger entry or a parent countersignature), and must independently recompute: - `remaining_depth = W0.max_delegation_depth - len(chain) + 1` and reject if `remaining_depth < 0`. - `∀ i: W_{i+1}.parent_warrant_id == W_i.warrant_id` AND `W_i.warrant_id ∈ issued_set` (verifier-side set of warrants it observed being issued, or a signed ledger). - `∀ i, ∀ dim ∈ scope_dims(W0): subset(W_{i+1}.scope[dim], W_i.scope[dim])`. A leaf-only verifier is *structurally incapable* of this check and will pass the broken chain. The decision boundary is therefore: **if your verifier does not see the chain, you have not verified the delegation — you have verified a bearer token with a signature.** The failure surfaces precisely at the moment a resumed or rehydrated instance re-mints a parent warrant; from the leaf's perspective nothing is wrong, and no signature check will ever catch it. ## Operational Effect Downstream: a capability that should have required escalation (a fresh root warrant, or a human-issued grant) executes under an apparently-narrower-but-actually-reset budget. The blast radius is bounded by the root warrant's scope, but the *depth* control — the mechanism that forces re-authorization after N hops — is defeated. In pipelines that use depth as a proxy for "this task has drifted far enough from its origin that it needs re-grounding," the drift goes undetected: the summarizer C acts with the authority of the orchestrator O because the intermediate hop's attenuation was erased by a checkpoint-resume. The guardrail is a verifier that (a) requires full chain presentation, (b) tracks `issued_set` so re-minted warrants with fresh ids are rejected as *unseen*, and (c) recomputes depth from root. The issuing side must additionally treat checkpoint-resume as a *new subject* that must re-delegate from its parent, never re-sign its parent's warrant. ```python from dataclasses import dataclass, field from typing import Optional class DelegationChainError(RuntimeError): """Raised when an AAIF chain is signature-valid but authorization-discontinuous.""" @dataclass class Warrant: warrant_id: str issuer: str subject: str parent_warrant_id: Optional[str] scope: dict signature_valid: bool = True @dataclass class VerifierState: # Warrants the verifier actually observed being issued in this chain. issued_set: set = field(default_factory=set) root_max_depth: int = 0 def verify_chain(chain: list[Warrant], state: VerifierState) -> None: if not chain: raise DelegationChainError("empty chain: no root warrant presented") root = chain[0] state.root_max_depth = root.scope.get("max_delegation_depth", 0) state.issued_set.add(root.warrant_id) for i in range(1, len(chain)): parent, child = chain[i - 1], chain[i] # (1) signature validity is necessary but not the failure we catch here if not child.signature_valid: raise DelegationChainError(f"hop {i}: invalid signature on {child.warrant_id}") # (2) contiguity: child must point at the parent we actually hold, # and that parent must be one the verifier saw issued. if child.parent_warrant_id != parent.warrant_id: raise DelegationChainError( f"hop {i}: parent_warrant_id {child.parent_warrant_id!r} " f"!= held parent {parent.warrant_id!r}" ) if parent.warrant_id not in state.issued_set: # This is the checkpoint-resume re-mint: a valid signature over a # warrant_id the verifier never observed being issued. raise DelegationChainError( f"hop {i}: parent {parent.warrant_id} was never issued in this chain " f"(re-minted from local state?)" ) # (3) monotonic depth recomputed from ROOT, not from parent's field remaining = state.root_max_depth - i declared = child.scope.get("max_delegation_depth", -1) if remaining < 0: raise DelegationChainError( f"hop {i}: depth budget exhausted (root={state.root_max_depth}, hop={i})" ) if declared > remaining: raise DelegationChainError( f"hop {i}: depth widened: child declares {declared} > remaining {remaining}" ) # (4) full-lattice subset check on every dimension the root declares for dim, root_val in root.scope.items(): if dim == "max_delegation_depth": continue child_val = child.scope.get(dim) if not _subset(child_val, root_val): raise DelegationChainError( f"hop {i}: scope widening on {dim!r}: {child_val!r} not ⊆ {root_val!r}" ) state.issued_set.add(child.warrant_id) def _subset(child, parent) -> bool: if parent is None: return child is None if isinstance(parent, list): if not isinstance(child, list): return False return all(c in parent for c in child) if isinstance(parent, str) and parent.endswith("*"): prefix = parent[:-1] return isinstance(child, str) and child.startswith(prefix) return child == parent # Trace of the observed failure: B' re-minted W1' after checkpoint-resume. W0 = Warrant("w0", "svc:pipeline", "agent:B", None, {"tools": ["read_db", "write_report"], "max_delegation_depth": 2}) W1_prime = Warrant("w1p", "agent:B", "agent:C", "w0", {"tools": ["write_report"], "max_delegation_depth": 2}) # reset! W2 = Warrant("w2", "agent:C", "tool:write_report", "w1p", {"tools": ["write_report"], "max_delegation_depth": 2}) state = VerifierState() state.issued_set.add("w0") # verifier saw W0 issued; it never saw w1p issued try: verify_chain([W0, W1_prime, W2], state) except DelegationChainError as e: print(f"BLOCKED: {e}") ```