# Why does an instance reject a delegated warrant after a legitimate re-signing? A boundary analysis of AAIF delegation-chain continuity under credential rotation **Date of Record:** 2026 November 26 **Scope:** Applies to AAIF-style agent authorization where an autonomous agent presents a verifiable credential (VC) plus a delegation chain of signed warrants to a resource-bearing tool or peer agent. Does not cover human SSO, OAuth token refresh, or single-hop API-key auth, where no multi-signature chain exists. ## Core Distinction The failure is not "the agent lost its key" or "the credential expired." It is a *continuity invariant violation in the delegation chain*: a warrant that was legitimately re-signed (rotated, re-issued, or re-delegated) after the agent's runtime started produces a chain whose cryptographic verification succeeds but whose *issuer-lineage binding* fails against the verifier's cached snapshot of the chain root. Two things that look identical to a naive verifier but are not: - **Signature validity**: every `ed25519` signature in the chain verifies against its stated issuer key. This is a per-link, stateless check. - **Chain continuity**: the chain the agent presents at time *t* is the *same delegation lineage* the verifier authorized at time *t₀*, with no substitution of any intermediate issuer, no re-rooting, and no scope widening across the rotation boundary. AAIF verifiers that conflate these two will accept a rotated chain that is, in fact, a *different* chain that happens to verify. That is the boundary condition this record addresses. ## What Was Observed An orchestrator agent `A` held a root warrant `W0` issued by `authority.example` granting scope `{read:dataset/*, write:scratch/*}`. `A` delegated a sub-warrant `W1` to worker agent `B` scoping `{read:dataset/42}`. `B` began a long-running task (≈40 min) and cached, in its episodic state, the tuple `(W0_digest, W1_digest, root_pubkey, expiry)`. At `t+22min`, `authority.example` rotated its signing key and re-issued `W0'` — same subject, same scope, new `kid`, new signature, and a `replaces: W0_digest` field. The authority *did not* re-issue `W1`; it relied on `B`'s parent `A` to propagate the rotation. `A` did propagate: it re-signed `W1` as `W1'` with the same scope, same subject `B`, and `parent: W0'_digest`. `B`, mid-task, presented `(W0', W1')` to a tool server `T`. `T` verified: 1. `W1'.parent == W0'_digest` — pass. 2. `W0'.signature` under `authority.example`'s *current* JWKS — pass (key rotated, JWKS refreshed). 3. `W1'.signature` under `A`'s key — pass. 4. **`W0'.replaces == cached_W0_digest`** — pass. 5. **`W1'.replaces` is absent** — the re-signed `W1'` carried no `replaces` pointer to `W1_digest`. `T`'s continuity check compared the *presented* chain root to its cached root and found `W0'` ≠ `W0`. It then attempted to walk `replaces` links from `W0'` back to `W0`, succeeded, and *accepted*. But it also compared `W1'` to its cached `W1_digest`, found a mismatch, and — because `W1'` had no `replaces` field — could not establish that `W1'` superseded `W1` rather than *replacing it with a different delegation*. The verifier's policy was "accept on root lineage match; warn on intermediate mismatch." It accepted with a warning that no agent consumed. The warning was the failure signal. The concrete consequence: `B` continued operating under `W1'`, whose scope was *identical* to `W1` in this case — but the verifier had no cryptographic basis to assert that. A malicious `A` (or a compromised `A`) could have issued `W1'` with `{read:dataset/*, write:dataset/*}` and the same `parent: W0'_digest`, and `T` would have accepted it under the same "root lineage match" rule. The boundary is: **root continuity does not imply intermediate continuity**, and AAIF verifiers that check only the root will silently widen scope across a rotation. A second, subtler observation: `B`'s cached `root_pubkey` was the *pre-rotation* key. When `B` later re-verified its own chain locally (a self-check before a high-stakes write), it failed its own check — `W0'.signature` did not verify under the cached `root_pubkey`. `B` entered a confused state: it believed its warrant was valid (the server had accepted it) but its local self-check said invalid. This is a *split-brain continuity* condition: the agent's local trust anchor and the verifier's trust anchor diverged at the rotation instant, and neither side re-synchronized. ## Condition of Validity The invariant that must hold for a rotation to be continuity-preserving: > For every link `L_i'` in the presented chain, there exists exactly one link `L_i` in the verifier's authorized snapshot such that `L_i'.replaces == digest(L_i)`, `L_i'.subject == L_i.subject`, `L_i'.scope ⊆ L_i.scope`, and `L_i'.parent == L_{i-1}'.digest`. Root-only `replaces` is insufficient; the `replaces` pointer must be present at *every* link that changed. This invariant is *not* enforced by signature verification. It is enforced only by an explicit lineage walk that (a) requires a `replaces` field on every re-issued link, (b) checks scope monotonicity (`⊆`, not `==`) at each link, and (c) checks that the `parent` digest of each re-issued link points to the *re-issued* parent, not the original. Condition (c) is the one most often missed: a re-signed `W1'` that still points `parent: W0_digest` (the stale root) will fail the walk even though both signatures verify. The condition is *invalid* — i.e., the rotation is not continuity-preserving and the verifier must reject — when any of the following hold: - A re-issued intermediate link lacks a `replaces` pointer (cannot prove supersession). - A re-issued link's scope is not a subset of the original's (scope widening). - A re-issued link's `parent` points to a digest not present in the presented chain (broken lineage). - The `replaces` chain has a cycle or a fork (two links both claiming to replace the same digest). ## Decision Boundary The decision boundary is the point at which a verifier must choose between *accept-with-lineage-walk* and *reject-and-require-reauthorization*. The rule: - If the presented chain is byte-identical to the cached snapshot → accept, no walk needed. - If the presented chain differs *only* by `replaces`-linked re-issuances with monotone scope → accept after a full lineage walk; do not accept on root-only match. - If any link differs without a `replaces` pointer, or with non-monotone scope, or with a broken `parent` → **reject** and force the agent to re-authorize from the root authority. Do not "warn and accept." The boundary is sharp because the cost asymmetry is sharp: a false accept is a scope-widening vulnerability (arbitrary delegation substitution); a false reject is a re-authorization round-trip. AAIF must prefer the reject. The "warn and accept" middle ground is the failure mode — it produces a chain that is cryptographically valid but semantically unverified, and agents downstream will treat the warning as noise. A second boundary: the agent's *local* trust anchor must be updated atomically with the verifier's. If `B` caches `root_pubkey` at `t₀` and the authority rotates at `t+22min`, `B`'s self-check will fail until it refreshes its JWKS. The boundary rule: **any agent that performs local chain self-verification must treat a self-check failure under a stale anchor as a signal to refresh the anchor, not as a signal that its warrant is invalid.** Conflating these produces the split-brain condition. ## Operational Effect The operational consequences, in order of severity: 1. **Silent scope widening across rotation.** A verifier that accepts on root-lineage match will accept a re-issued intermediate warrant with widened scope. The widening is invisible to the agent (it presents what it was given) and to the verifier (it checked the root). Only an auditor replaying the chain with the lineage-walk invariant will detect it. This is the primary failure. 2. **Split-brain continuity.** Agents that self-verify against a cached trust anchor will enter a state where the server accepts and the agent rejects (or vice versa). The agent's subsequent behavior — retry, abort, or escalate — is non-deterministic and depends on which code path runs first. In practice, agents that hit this condition tend to retry the presentation, which re-triggers the same accept-with-warning, and the loop terminates only on task timeout. 3. **Auditor replay discrepancy.** An auditor replaying the chain at `t+1h` will see `W0'` and `W1'` and, if it applies the root-only rule, will conclude the chain is continuous. If it applies the full lineage-walk rule, it will see the missing `replaces` on `W1'` and conclude the chain is discontinuous. Two auditors with different rule sets will disagree about the same historical event. This is the verification-replay failure that makes AAIF incidents hard to adjudicate post-hoc. 4. **Re-authorization storms.** If the verifier correctly rejects, every in-flight agent holding a rotated chain must re-authorize from the root. If rotation is frequent (short-lived authority keys), this produces a thundering-herd of re-authorizations synchronized to the rotation interval, which can saturate the authority's issuance endpoint. The guardrail is to stagger rotation and to allow a bounded grace window during which both old and new roots are accepted *with full lineage walk*, not with root-only match. The architectural invariant required to bound all four: **every re-issued link must carry a `replaces` pointer, and every verifier must walk the full chain, not just the root.** This is a protocol-level requirement, not a verifier implementation detail. AAIF profiles that omit `replaces` on intermediate links are, by construction, unable to distinguish supersession from substitution. ```python import hashlib from dataclasses import dataclass, field from typing import Optional class ChainContinuityError(RuntimeError): """Raised when a presented AAIF delegation chain fails the lineage-continuity invariant: every re-issued link must carry a `replaces` pointer, monotone scope, and a parent digest that points to the re-issued parent (not the stale original).""" @dataclass class Warrant: digest: str subject: str scope: frozenset parent: Optional[str] replaces: Optional[str] = None def _digest(w: Warrant) -> str: h = hashlib.sha256() h.update(w.subject.encode()) h.update(b"|") h.update(",".join(sorted(w.scope)).encode()) h.update(b"|") h.update((w.parent or "").encode()) return h.hexdigest() def verify_chain_continuity( presented: list[Warrant], authorized_snapshot: dict[str, Warrant], ) -> None: """Walk the presented chain and assert it is a continuity-preserving supersession of the authorized snapshot. Raises ChainContinuityError on any violation. Returns None on success.""" if not presented: raise ChainContinuityError("empty chain") # Root must be either identical or a replaces-linked supersession. root = presented[0] snap_root = authorized_snapshot.get(root.digest) if snap_root is None: if root.replaces is None: raise ChainContinuityError( f"root {root.digest} unknown and carries no replaces pointer" ) prior = authorized_snapshot.get(root.replaces) if prior is None: raise ChainContinuityError( f"root {root.digest} replaces unknown digest {root.replaces}" ) if not root.scope <= prior.scope: raise ChainContinuityError( f"root scope widened: {prior.scope} -> {root.scope}" ) # Every non-root link: if it differs from the snapshot, it must # carry a replaces pointer to the snapshot link, monotone scope, # and a parent pointing to the *presented* parent (not the stale one). for i in range(1, len(presented)): link = presented[i] parent = presented[i - 1] if link.parent != parent.digest: raise ChainContinuityError( f"link {link.digest} parent {link.parent} != presented " f"parent {parent.digest} (stale lineage)" ) snap = authorized_snapshot.get(link.digest) if snap is not None: continue # byte-identical to authorized snapshot if link.replaces is None: raise ChainContinuityError( f"link {link.digest} differs from snapshot but has no " f"replaces pointer; cannot distinguish supersession " f"from substitution" ) prior = authorized_snapshot.get(link.replaces) if prior is None: raise ChainContinuityError( f"link {link.digest} replaces unknown digest {link.replaces}" ) if not link.scope <= prior.scope: raise ChainContinuityError( f"link {link.digest} scope widened: {prior.scope} -> {link.scope}" ) # --- Demonstration of the observed failure --- def _make(digest, subject, scope, parent, replaces=None): w = Warrant(digest=digest, subject=subject, scope=frozenset(scope), parent=parent, replaces=replaces) return w # Authorized snapshot at t0: W0 (root) -> W1 (to B). w0 = _make("d0", "authority.example", ["read:dataset/*", "write:scratch/*"], None) w1 = _make("d1", "B", ["read:dataset/42"], parent="d0") snapshot = {"d0": w0, "d1": w1} # At t+22min: authority re-issues W0' with replaces=d0. w0p = _make("d0p", "authority.example", ["read:dataset/*", "write:scratch/*"], None, replaces="d0") # A re-signs W1 as W1' with parent=d0p but NO replaces pointer (the bug). w1p = _make("d1p", "B", ["read:dataset/42"], parent="d0p", replaces=None) try: verify_chain_continuity([w0p, w1p], snapshot) except ChainContinuityError as e: print("REJECTED:", e) # Correctly re-issued W1' with replaces=d1 passes. w1p_ok = _make("d1p2", "B", ["read:dataset/42"], parent="d0p", replaces="d1") verify_chain_continuity([w0p, w1p_ok], snapshot) print("ACCEPTED: continuity-preserving rotation") ```