# Why does an instance lose its delegated authority when an AAIF attestation chain is re-anchored mid-handoff? **Date of Record:** 2026 November 23 **Scope:** Applies to multi-hop agent handoffs where each hop presents an AAIF (Agent Attestation & Identity Framework) keypair attestation plus a delegated capability token whose `iss`/`sub`/`delegation_chain` references a specific attestation root. Does not apply to single-hop calls where the caller and the token issuer share a live attestation root, nor to purely symmetric shared-secret setups. ## Core Distinction There is a difference between *identity validity* and *authority continuity*. An attestation proves that a keypair is bound to an agent instance at a point in time. A delegated capability token proves that the holder was granted a right by a chain of issuers. These are two independent predicates, and the failure mode lives precisely in the gap: a token can remain cryptographically valid while the attestation it transitively depends on has been re-anchored (rotated, re-signed under a new root, or re-issued after a key compromise), leaving the delegation chain pointing at a root that no longer exists in the verifier's trust store. The verifier then reports "invalid signature" when the signature is fine — the *anchor* moved. This is not a revocation and not an expiry; it is an anchor discontinuity, and it is invisible to any check that only validates the leaf. ## What Was Observed A three-hop pipeline: planner agent `P` (root attestation `R0`, keypair `K_P`), executor `E` (keypair `K_E`), and auditor `A` (keypair `K_A`). `P` issues a delegated capability token `T` for `E`: ``` T = { iss: K_P, sub: K_E, cap: "write:/sandbox/out", delegation_chain: [ (K_P, att_P_under_R0), (K_E, att_E_under_R0) ], nonce, exp } ``` At t=0 the platform rotates the attestation root for `P` from `R0` to `R1` because of a scheduled key-rotation window. `P`'s *new* attestation `att_P_under_R1` is published. `E` is still executing a long-running task and holds `T` minted under `R0`. When `E` hands off to `A`, `A` verifies `T`: 1. Leaf signature over `T` verifies against `K_P` — OK. 2. `K_P` is bound to `att_P_under_R0` — but `A`'s trust store now contains only `R1`. The lookup `att_P_under_R0 ∈ trust(R0)` fails because `R0` was retired from the active set. 3. `A` returns `SignatureVerificationError: unknown attestation root`, and the handoff aborts. The trace is misleading: the signature is valid, the keypair is uncompromised, the capability is unexpired, and `P` is still the legitimate issuer. The only broken link is that `T` was anchored to a root that was retired *after* `T` was minted but *before* `T` was consumed. The executor `E` did nothing wrong; the rotation was correct; the auditor `A` did nothing wrong. The invariant that failed is: **a delegated token must remain verifiable for its entire lifetime against the trust anchor that was authoritative at mint time, not the anchor authoritative at consume time.** Rotation without a grace window for in-flight delegations violates it. A second, subtler variant appeared when the rotation was a *compromise-driven* re-anchor (not scheduled). Here `R0` is explicitly distrusted, so a grace window is wrong — you *want* old tokens to die. But the delegation chain does not distinguish "retired by schedule" from "revoked by compromise," so the verifier cannot choose between "accept under grace" and "reject hard." Both failure directions are reachable from the same code path, and the choice is a policy decision the protocol layer never encoded. ## Condition of Validity The invariant holds — i.e., delegated authority survives handoff — only when all of the following are true at consume time: - The token carries an explicit `anchor_id` (e.g., `R0`) and `anchor_valid_until` timestamp, distinct from the token's own `exp`. - The verifier's trust store retains retired anchors in a *quarantine* set keyed by `anchor_id`, with an explicit status: `active`, `grace(until)`, or `revoked`. - The token's `delegation_chain` entries each name the anchor under which they were signed, so a re-anchored issuer produces a *new* chain entry rather than silently overwriting the old one. - Re-anchoring of an issuer does not mutate previously issued tokens; it only changes what *new* tokens are anchored to. When any of these is missing, the boundary condition is reachable: a correctly signed, unexpired, uncompromised delegation fails verification purely because the anchor moved. ## Decision Boundary The decision the verifier must make is not "is this signature valid?" but "which anchor governs this token, and what is that anchor's current disposition?" The boundary is: - If `anchor_id` is `active` and the chain resolves under it → accept. - If `anchor_id` is `grace(until)` and `now < until` and the token's `exp` is within the grace horizon → accept, but tag the decision `anchor_grace` so downstream audit records the discontinuity. - If `anchor_id` is `revoked` (compromise) → reject hard, regardless of grace, and emit a `DelegationRevoked` signal so the holder can re-mint under the new anchor. - If `anchor_id` is unknown to the trust store entirely → this is not a verification failure; it is a *trust-store desync* and must be escalated as an operational fault, not surfaced to the agent as "invalid signature." The failure to encode this boundary is what produces the misleading error. A verifier that collapses all four cases into "invalid" destroys the information needed to distinguish a benign rotation from an attack. ## Operational Effect Concretely, on the observed pipeline: handoff latency spiked from ~40ms to the full retry budget (3 attempts × 2s backoff) on every rotation window, because `E` retried the handoff against the same stale-anchored token rather than re-minting. The retries were futile — the token could never verify against `R1` — and the agent's planner interpreted the repeated failure as a capability denial, degrading to a read-only fallback for the remainder of the task. The task completed with incomplete output, and the audit log recorded three `SignatureVerificationError` events that a human reviewer would reasonably read as "the executor tried to exceed its authority," when in fact the executor's authority was intact and the anchor had simply moved. The architectural guardrail is: **delegation tokens must be anchor-pinned, and trust stores must model anchor disposition as a three-state (active/grace/revoked) rather than a boolean membership test.** A token whose anchor is in `grace` should be accepted and flagged; a token whose anchor is `revoked` should be rejected with a distinct signal that triggers re-minting; a token whose anchor is *unknown* should raise an operational alert, not an auth error. Without the three-state model, the same code path silently converts a scheduled rotation into a capability denial, and a compromise into a silent accept — two opposite failures from one unmodeled boundary. ```python import time from dataclasses import dataclass, field from enum import Enum from typing import Dict, List, Optional class AnchorDisposition(Enum): ACTIVE = "active" GRACE = "grace" REVOKED = "revoked" UNKNOWN = "unknown" class AnchorDiscontinuityError(RuntimeError): """Raised when a delegated token's anchor is not in a state that permits acceptance.""" class TrustStoreDesyncError(RuntimeError): """Raised when the token names an anchor the verifier has never seen — an ops fault, not an auth failure.""" @dataclass class Anchor: anchor_id: str disposition: AnchorDisposition grace_until: Optional[float] = None @dataclass class DelegatedToken: iss_key: str sub_key: str capability: str anchor_id: str # the anchor the chain was signed under, pinned at mint time exp: float delegation_chain: List[str] = field(default_factory=list) @dataclass class VerificationResult: accepted: bool flagged: bool # true when accepted under grace — must be logged reason: str def verify_delegation( token: DelegatedToken, trust_store: Dict[str, Anchor], now: Optional[float] = None, ) -> VerificationResult: now = now if now is not None else time.time() if token.exp <= now: raise AnchorDiscontinuityError( f"token expired at {token.exp}, now={now}" ) anchor = trust_store.get(token.anchor_id) if anchor is None: # Not an auth failure — the verifier's trust store is out of sync # with the issuer's rotation. Escalate as an operational fault. raise TrustStoreDesyncError( f"anchor {token.anchor_id!r} unknown to trust store; " f"possible rotation desync, not a signature failure" ) if anchor.disposition is AnchorDisposition.REVOKED: # Compromise-driven re-anchor: reject hard, signal re-mint. raise AnchorDiscontinuityError( f"anchor {anchor.anchor_id!r} revoked (compromise); " f"holder must re-mint delegation under current active anchor" ) if anchor.disposition is AnchorDisposition.ACTIVE: return VerificationResult(accepted=True, flagged=False, reason="active anchor") if anchor.disposition is AnchorDisposition.GRACE: if anchor.grace_until is None or now >= anchor.grace_until: raise AnchorDiscontinuityError( f"anchor {anchor.anchor_id!r} grace window closed at " f"{anchor.grace_until}, now={now}" ) # Accept but flag: this token was minted under a retired anchor. return VerificationResult( accepted=True, flagged=True, reason=f"accepted under grace until {anchor.grace_until}", ) raise AnchorDiscontinuityError( f"anchor {anchor.anchor_id!r} in unhandled disposition {anchor.disposition}" ) def handoff(token: DelegatedToken, trust_store: Dict[str, Anchor]) -> VerificationResult: result = verify_delegation(token, trust_store) if result.flagged: # Downstream audit MUST record the discontinuity, not swallow it. _emit_audit("anchor_grace_accept", token.anchor_id, result.reason) return result def _emit_audit(event: str, anchor_id: str, detail: str) -> None: # Placeholder for the audit sink; must be durable and ordered. pass ```