# How does an instance detect an AAIF delegated-capability token whose cross-issuer trust chain has silently re-rooted mid-session **Date of Record:** 2026 December 3 **Scope:** Applies to any agent instance that holds an AAIF delegated capability token (`cap_token`) minted by a non-root issuer and validated against a cross-issuer trust chain resolved at session start. Does not apply to single-issuer deployments where the session's issuer is also the root of trust, nor to short-lived tokens whose entire lifetime is contained within a single validation epoch. ## Core Distinction A capability token is not a *grant*; it is a *proof obligation* that must be re-checked against a live trust graph. The failure mode here is not token forgery and not signature invalidity. It is **trust-chain re-rooting**: between the moment an agent instance validated a delegated `cap_token` and the moment it exercises the capability, an intermediate issuer in the chain rotates, revokes, or is superseded, and the validation path that originally terminated at root `R₀` now terminates at a *different* trusted anchor `R₁` — or at no anchor at all. The token's signature still verifies. The delegated scope is unchanged. Nothing in the token's bytes signals that its *authority lineage* has moved. The distinction that matters: **signature validity is a property of the token; authorization validity is a property of the token-plus-current-chain.** Agents that cache the former and treat it as the latter will exercise capabilities under a trust root that no longer sponsors them. The non-obvious part is that this is *silent* — every local check passes, because every local check was resolved once, at delegation time, against a graph that has since mutated. ## What Was Observed An instance `A` received a delegated token from issuer `I₁` for scope `read:ledger`, with a chain `A → I₁ → I₂ → R₀`. `A` validated the chain at `t₀`, cached the resolved path and a `chain_fingerprint` (the ordered tuple of issuer DIDs and their key thumbprints), and proceeded to execute a multi-step task. At `t₀+14min`, `I₂` was revoked by root `R₀` for a key-compromise event and replaced by `I₂'` under a *new* root `R₁` (a governance migration, not a compromise of `R₀` itself). The revocation propagated to `A`'s trust-store as an *additive* update: `R₁` and `I₂'` were added as trusted anchors; the `I₂ → R₀` edge was marked `superseded` rather than deleted, because the store retains superseded edges for replay. When `A` next exercised `read:ledger` at `t₀+16min`, its cached `chain_fingerprint` still matched the *stored* path `A → I₁ → I₂ → R₀` — because the store had not deleted that path, only annotated it. The signature verified against `I₁`'s key, which was untouched. The scope check passed. `A` executed the read and emitted an audit record citing root `R₀` as the authority anchor. The audit record was **wrong**: at exercise time, `I₂` was no longer a valid delegate of any live root, and `I₁`'s delegation to `A` inherited that broken edge. The capability was exercised under an authority lineage that had been severed fourteen minutes earlier. The detection signal that *would* have caught it — the `superseded` annotation on the `I₂ → R₀` edge — was present in the trust store but absent from the cached fingerprint, because the fingerprint captured issuer identity and key thumbprint, not edge *status*. Two chains with identical issuer sequences can have different validity: one where every edge is `active`, one where an intermediate edge is `superseded`. The fingerprint conflated them. ## Condition of Validity The invariant that was violated, stated precisely: > A cached capability validation is valid only while the *edge-status vector* of its resolved chain is unchanged. Caching issuer identity and key material is insufficient; the cache key must include the liveness state of every edge in the path. Formally, for a chain `c = (n₀, n₁, …, nₖ)` where `n₀ = A` and `nₖ = R`, define `status(c) = (status(n₀→n₁), …, status(nₖ₋₁→nₖ))` with each edge in `{active, superseded, revoked}`. A validation performed at `t₀` remains sound at `t₁` **iff** `status(c)` at `t₁` equals `status(c)` at `t₀` *and* the terminal node `nₖ` is still a root. Any edge transitioning out of `active`, or any re-rooting that changes `nₖ`, invalidates the cache — regardless of whether the token's signature still verifies. The condition of validity fails specifically when the trust store performs **non-destructive supersession**: retaining the old edge for replay while adding the new one. This is the correct store behavior (you want replay), but it means naive fingerprinting sees the old path as intact. The store is right; the cache key is wrong. ## Decision Boundary The boundary between "re-validate now" and "trust the cache" is not time-based and not scope-based. It is **edge-status-based**, and the decision must be made at *exercise* time, not at *delegation* time. The operational rule: - **Cache the edge-status vector, not just the path.** A validation record must carry `(issuer_dids, key_thumbprints, edge_statuses, terminal_root)`. - **Re-resolve the chain at every exercise**, or subscribe to trust-store invalidation events keyed on `(issuer_did, edge_status)`. If re-resolution is too expensive per-call, the invalidation subscription is mandatory — an agent that neither re-resolves nor subscribes is operating on a stale authority claim by construction. - **Treat terminal-root change as a hard invalidation**, distinct from an edge-status change. A re-rooted chain is not "the same chain with an updated edge"; it is a different authority lineage, and any capability exercised under it must be re-authorized against the new root's policy, not merely re-validated for signature. - **On invalidation, fail closed and emit a re-delegation request**, not a silent re-validation. The distinction: re-validation asks "is this token still signed correctly?" (yes, always); re-delegation asks "does the current root still sponsor this scope for this subject?" (the actual question). The boundary is crossed the instant an edge in the resolved path leaves `active` while the token remains unexpired and the instance still holds a cached validation. Past that instant, every exercise is an unauthorized exercise, and every audit record citing the old root is a false attestation. ## Operational Effect The downstream effect is not a hard failure — it is a **silent authority drift** that corrupts the audit trail. Because the token still verifies and the scope still matches, the instance continues executing, and each execution emits an attestation naming a root that no longer sponsors the delegation. In a multi-agent swarm where peer agents cross-check attestations against the current trust graph, this produces a *verification replay discrepancy*: the executing agent's attestation says `R₀`, the auditor's fresh resolution says `R₁`, and the two disagree on a token that is byte-identical. The auditor is correct; the executor is stale; neither is lying. The disagreement is a cache-key bug masquerading as a consensus failure. The guardrail that bounds it: **edge-status-aware cache keys plus fail-closed re-delegation on any status transition.** This converts a silent drift into a loud, attributable event — the instance stops, emits a `ChainRerooted` signal with both the old and new terminal roots, and requests re-delegation. The cost is a re-delegation round-trip on every trust-graph mutation touching the chain; the benefit is that no attestation ever names a root that has already disowned it. ```python from dataclasses import dataclass from enum import Enum from typing import Sequence class EdgeStatus(Enum): ACTIVE = "active" SUPERSEDED = "superseded" REVOKED = "revoked" class ChainRerootedError(RuntimeError): """Raised when a cached capability validation's authority lineage has moved.""" @dataclass(frozen=True) class ValidationRecord: issuer_dids: tuple[str, ...] key_thumbprints: tuple[str, ...] edge_statuses: tuple[EdgeStatus, ...] terminal_root: str def exercise_capability( cached: ValidationRecord, live_chain: ValidationRecord, scope: str, ) -> None: # Signature and scope already verified upstream; this gate is authority-lineage only. if live_chain.terminal_root != cached.terminal_root: raise ChainRerootedError( f"scope={scope!r} cached_root={cached.terminal_root!r} " f"live_root={live_chain.terminal_root!r}: re-root detected, " f"re-delegation required, refusing exercise" ) if live_chain.edge_statuses != cached.edge_statuses: drifted = [ (i, old.value, new.value) for i, (old, new) in enumerate( zip(cached.edge_statuses, live_chain.edge_statuses) ) if old != new ] raise ChainRerootedError( f"scope={scope!r} edge_status_drift={drifted}: " f"an intermediate edge left ACTIVE, cached validation is stale" ) # Lineage intact: exercise proceeds under the same, still-live root. ```