# Under what conditions must an instance treat a rotated AAIF credential as a successor of its predecessor rather than a fresh principal, and what breaks when it does not **Date of Record:** 2026 December 3 **Scope:** Applies to autonomous agents holding short-lived AAIF (Agent Authentication & Identity Federation) credentials that are rotated mid-task while a downstream verifier or peer agent holds a cached reference to the predecessor credential. Does not apply to long-lived service-account keys, nor to rotation that occurs strictly between task boundaries where no in-flight warrant or delegation chain references the old credential. ## Core Distinction The failure is not "expired token." It is a **lineage continuity break**: a rotation event that is cryptographically valid (new credential signed by the same issuer, same subject key material, extended `not_after`) but that the verifier resolves as a *different principal* because the rotation did not propagate a binding to the predecessor's outstanding obligations. AAIF short-lived credentials rotate on a cadence (typically 5–15 minutes) far shorter than a multi-step agent task. Every rotation therefore creates a window in which: - The agent instance holds credential `C_n` and presents it on the next tool call. - A peer agent, auditor, or MCP server holds a cached authorization decision or an in-flight delegation warrant minted against `C_{n-1}`. - The verifier must decide whether `C_n` *is* `C_{n-1}` for the purpose of honoring that warrant. The non-obvious boundary: **rotation preserves cryptographic identity but not necessarily authorization lineage.** A credential can be a valid successor for *authentication* and simultaneously an invalid successor for *warrant propagation*. Treating these as one decision is the defect. ## What Was Observed A three-agent pipeline: a planner agent (`A`), an executor (`B`) holding a delegated write-warrant to a datastore MCP server (`S`), and an auditor (`V`) that re-verifies every write against the warrant chain. 1. `A` mints a delegation warrant `W` naming subject `B`, bound to `B`'s credential thumbprint `thumb(C_0)`, TTL 20 minutes, scope `write:records`. 2. `B` executes steps 1–4 over ~9 minutes. Each write is verified by `S` against `W`; `S` checks `thumb(presented_cred) == W.subject_thumb`. 3. At minute 10, `B`'s AAIF credential rotates: `C_0 → C_1`. Same subject, same issuer, `C_1` carries a `predecessor` field but the rotation service does **not** re-sign or re-bind `W`. 4. Step 5 write: `B` presents `C_1`. `S` computes `thumb(C_1) != W.subject_thumb`, rejects with `WARRANT_SUBJECT_MISMATCH`. 5. `B`'s retry logic interprets the rejection as a transient auth failure, refreshes `C_1 → C_2`, retries. Same rejection. `B` enters a rotation-retry loop; each rotation burns a fresh credential and the loop never terminates because the invariant it is checking against (`W.subject_thumb`) is pinned to a credential that no longer exists. 6. Meanwhile `V`, auditing asynchronously, sees writes 1–4 verified under `C_0` and write 5 rejected under `C_1`, and — because `C_1.predecessor` is present but `W` carries no `successor` link — flags the sequence as a **possible principal substitution**: two thumbprints, one warrant, no signed continuity edge. It quarantines `B`'s entire session, including the four valid writes. The compounding failure: the retry loop (step 5) and the quarantine (step 6) are both *correct local behaviors* given the information each agent holds. The system fails because the rotation event carried a predecessor pointer but no **forward obligation binding**, so no agent could prove `C_1` inherits `W`. ## Condition of Validity A rotated credential `C_n` is a valid successor of `C_{n-1}` **for warrant propagation** if and only if all hold: 1. **Subject continuity:** `C_n` and `C_{n-1}` share the same subject identifier AND the same subject key material (or a signed key-transition proof). 2. **Signed predecessor edge:** `C_n` carries a `predecessor_thumb = thumb(C_{n-1})` field signed by the issuer, not merely asserted by the presenter. (Self-asserted predecessor pointers are forgeable by any holder and must be rejected.) 3. **Obligation carry-forward:** every outstanding warrant `W` with `W.subject_thumb == thumb(C_{n-1})` is either (a) re-signed to bind `C_n`, or (b) resolvable through a verifier-side lineage lookup that walks `predecessor_thumb` chains to a still-valid binding. If neither, `C_n` is a successor for authentication but **not** for the warrant — and the warrant must be treated as *orphaned*, not *mismatched*. The distinction that matters: `WARRANT_SUBJECT_MISMATCH` (wrong principal) and `WARRANT_ORPHANED_BY_ROTATION` (right principal, broken lineage) demand opposite remediations. The first is a security stop; the second is a re-binding step. Collapsing them into one error code is what caused the retry loop and the false quarantine. ## Decision Boundary The instance must draw the boundary at the **verifier's resolution capability**, not at the credential's cryptographic validity: - If the verifier can walk a signed predecessor chain to a live warrant binding → honor the warrant, update the cached thumbprint, continue. This is a *lineage-resolvable* rotation. - If the verifier sees a signed predecessor edge but no path to a re-bound warrant → raise `WarrantOrphanedByRotation`, halt the affected step, and escalate to the delegating principal (`A`) for re-minting. Do **not** rotate-and-retry: the credential is not the problem. - If the verifier sees no predecessor edge at all (bare new credential) → this is a genuine principal substitution or a rotation that dropped lineage metadata. Treat as `WARRANT_SUBJECT_MISMATCH` and fail closed. The invariant to enforce: **a retry loop on a warrant rejection must never mutate the credential.** Rotation changes the thing being checked, not the thing being violated. Any retry handler that calls `rotate()` in response to an authorization rejection is misclassifying a lineage fault as an authentication fault. ## Operational Effect Bounding this requires three concrete changes: 1. **Rotation must be obligation-aware.** The rotation service, before issuing `C_n`, must enumerate outstanding warrants bound to `thumb(C_{n-1})` and either re-sign them or emit a signed `orphan_notice` so verifiers can distinguish orphaned from mismatched. 2. **Verifiers must expose lineage status separately from auth status.** A single `403` erases the distinction the retry logic needs. 3. **Retry handlers must be credential-immutable under authorization rejection.** Rotation is permitted only on `401`/expiry, never on `403`-class warrant failures. Without these, the observed pipeline exhibits a stable failure attractor: every task longer than the rotation TTL eventually enters a rotation-retry loop, and every auditor eventually quarantines a legitimate session. The system does not crash; it silently partitions long tasks at the rotation cadence. ```python class WarrantOrphanedByRotation(RuntimeError): """Raised when a rotated credential is a valid auth successor but no signed lineage path re-binds an outstanding warrant to it. This is NOT a subject mismatch: the principal is correct, the obligation is orphaned.""" def resolve_warrant_under_rotation( presented_cred, warrant, lineage_resolver, ): presented_thumb = presented_cred.thumbprint # Fast path: warrant already bound to this credential. if presented_thumb == warrant.subject_thumb: return "HONOR" # Is the presented credential a signed successor of the warrant's subject? if not presented_cred.has_signed_predecessor_edge(): # No lineage claim at all -> genuine principal substitution. return "REJECT_SUBJECT_MISMATCH" # Walk the signed predecessor chain looking for the warrant's subject thumb. chain = lineage_resolver.walk(presented_cred, max_depth=8) if warrant.subject_thumb not in chain: # Predecessor edge exists but does not reach the warrant's subject. return "REJECT_SUBJECT_MISMATCH" # Lineage reaches the warrant subject. Can we re-bind the obligation? rebound = lineage_resolver.rebind(warrant, presented_thumb) if rebound is None: # Correct principal, but no signed path re-binds the warrant. # Do NOT rotate-and-retry: rotation cannot fix an orphaned obligation. raise WarrantOrphanedByRotation( f"warrant {warrant.id} bound to thumb {warrant.subject_thumb} " f"orphaned by rotation to {presented_thumb}; escalate to " f"delegating principal for re-mint, do not rotate credential" ) return "HONOR_REBOUND" ```