# Why does an instance lose its delegation chain when a verifiable credential is re-issued mid-flight? **Date of Record:** 2026 December 3 **Scope:** Applies to AAIF-style agent authorization where an agent holds a verifiable credential (VC) that encodes a delegation chain (principal → orchestrator → sub-agent) and the credential is re-issued, refreshed, or rotated while a task is in progress. Does not apply to stateless bearer-token schemes or to chains that are re-verified from scratch on every call with no cached chain state. ## Core Distinction The failure is not credential *expiry* and not signature *invalidity*. It is a **chain-identity discontinuity**: the re-issued credential is cryptographically valid, unexpired, and signed by the same issuer, yet it carries a *different delegation-chain identifier* (a fresh `chain_id` and fresh per-link `delegation_nonce`s) than the one under which the in-flight task was authorized. Downstream verifiers that bind authorization decisions to a cached `chain_id` — or that replay a warrant against the link hashes they saw at task start — will reject or, worse, silently accept a chain whose link ordering no longer matches the operation being performed. The credential is valid; the *continuity of the authorization lineage* is broken. ## What Was Observed An orchestrator agent `O` holds a VC delegating scope `S` from principal `P`, with chain `P→O→W` (where `W` is a worker sub-agent). The chain is materialized as three signed links, each link embedding `parent_link_hash`, a `delegation_nonce`, and a `chain_id = H(root_pubkey || epoch)`. `W` caches `chain_id` and the ordered link hashes at task start to bind its tool calls to the authorizing lineage. At T+40s the issuer rotates `O`'s credential (routine refresh, 15-minute TTL). The new VC is issued with a **new `chain_id`** because the issuance service derives `chain_id` from `H(root_pubkey || epoch)` and the epoch counter incremented. The new chain is `P→O→W` with identical scopes and identical `parent_link_hash` topology, but every `delegation_nonce` is freshly generated and the `chain_id` differs. `W` continues executing. On its next tool call it presents the new VC. The resource server verifies the signature, checks scope `S`, checks expiry — all pass — and admits the call. But `W`'s own local guard, which asserts `presented.chain_id == cached.chain_id`, now raises. In deployments where that guard is absent (the common case), the call is admitted under a chain the *audit log* still records as the old `chain_id`, producing an authorization record whose lineage cannot be reconstructed: the resource server logged `chain_id_new`, the task ledger logged `chain_id_old`, and no link binds them. The second-order observation is the dangerous one: because scopes and topology were preserved, **replay of a pre-rotation signed tool-call warrant still verifies** against the new chain's link hashes when the verifier compares scopes rather than link hashes. A warrant minted for `W` under epoch *n* is accepted under epoch *n+1* because the verifier's check is `warrant.scope ⊆ credential.scope`, and scope is invariant across rotation. The nonce that was supposed to bind warrant-to-link was never checked. ## Condition of Validity The invariant that must hold for safe mid-flight rotation is: > For any operation `op` authorized under chain `C_n`, the verifying party must be able to establish `C_n ≡ C_{n+1}` in *lineage*, not merely in *scope*. Equivalently: rotation may change signatures and nonces but must preserve a stable, verifiable `lineage_id` that is itself signed and that every warrant commits to. This holds only when one of the following is true: 1. **Lineage-stable rotation.** The issuer preserves `chain_id` across refreshes and rotates only signatures/nonces, with the new VC asserting `supersedes: ` so a verifier can walk the supersession edge. 2. **Warrant-to-link binding.** Every tool-call warrant embeds the `parent_link_hash` it was minted against, and verifiers check `warrant.parent_link_hash == presented.link.parent_link_hash` rather than scope containment. 3. **Re-authorization barrier.** Rotation invalidates all outstanding warrants and forces `W` to re-acquire authorization; in-flight operations are drained or checkpointed before the new chain is admitted. The failure is *valid* (i.e., the bug is reachable) whenever the issuer rotates `chain_id` and the verifier checks scope, not link hash. This is the default in most AAIF implementations because `chain_id` is cheap to regenerate and scope-containment is the obvious check. ## Decision Boundary The boundary between "safe to continue" and "must re-authorize" is drawn at the point where the *binding between the executing operation and the authorizing link* would be lost. Concretely: - If the new credential's `chain_id` differs **and** any outstanding warrant lacks a `parent_link_hash` commitment → the operation must be halted and re-authorized. Continuing means the audit trail cannot prove which link authorized which side effect. - If the new credential's `chain_id` differs **but** every warrant commits to `parent_link_hash` and the verifier checks it → continuation is safe; the lineage is recoverable by hash, not by id. - If `chain_id` is preserved across rotation (option 1) → continuation is safe by construction, and the only remaining risk is nonce reuse, which is bounded by the nonce's inclusion in the signed link. The decision must be made **at the verifier**, not at the issuer, because the issuer cannot know which warrants are outstanding. An issuer that "helpfully" preserves `chain_id` without a supersession edge creates a different bug: two distinct credentials claim the same lineage with no way to order them, enabling a confused-deputy swap. ## Operational Effect The observable effect is a **split-brain authorization ledger**. The task ledger records operations under `chain_id_old`; the resource server records admissions under `chain_id_new`; the two cannot be joined. Post-incident reconstruction of "which delegated authority permitted this side effect" fails not because logs are missing but because the join key (`chain_id`) was mutated mid-stream and no supersession edge was written. The secondary effect is **warrant replay across epochs**: a warrant minted under epoch *n* verifies under epoch *n+1* whenever the verifier checks scope containment instead of link-hash commitment, because scope is rotation-invariant. This is a genuine authorization bypass, not a logging artifact — an attacker who captures a warrant before rotation can replay it after, and the verifier will admit it under the fresh chain. The guardrail is a **lineage commitment invariant**: every warrant must embed the `parent_link_hash` of the link that authorized it, and every verifier must check that hash against the presented credential's link, not the scope. Rotation may then change `chain_id`, signatures, and nonces freely, because the binding is by hash and the hash is preserved in the link topology. Where the hash cannot be preserved (topology change), the operation must be checkpointed and re-authorized, and the checkpoint must record both `chain_id_old` and the supersession edge so the ledger remains joinable. ```python import hashlib from dataclasses import dataclass class LineageDiscontinuityError(RuntimeError): """Raised when a re-issued credential breaks warrant-to-link binding.""" pass @dataclass(frozen=True) class Link: parent_link_hash: str delegation_nonce: str scope: frozenset @dataclass(frozen=True) class Credential: chain_id: str link: Link supersedes: str | None # hash of prior VC, or None on first issuance @dataclass(frozen=True) class Warrant: scope: frozenset parent_link_hash: str # the commitment that must survive rotation def link_hash(link: Link) -> str: h = hashlib.sha256() h.update(link.parent_link_hash.encode()) h.update(link.delegation_nonce.encode()) h.update(b"|".join(sorted(link.scope)).encode()) return h.hexdigest() def verify_warrant(warrant: Warrant, cred: Credential, cached_chain_id: str) -> None: # Scope containment alone is NOT sufficient: scope is rotation-invariant, # so a warrant from epoch n would replay cleanly under epoch n+1. if not warrant.scope <= cred.link.scope: raise LineageDiscontinuityError( f"warrant scope {warrant.scope} not contained in credential scope {cred.link.scope}" ) # The binding that actually survives rotation is the parent_link_hash. if warrant.parent_link_hash != cred.link.parent_link_hash: raise LineageDiscontinuityError( "warrant.parent_link_hash does not match presented link; " "credential was re-issued with a new lineage and the warrant " "cannot be bound to it — halt and re-authorize" ) # If the chain_id changed, a supersession edge MUST exist so the ledger # remains joinable across the rotation boundary. if cred.chain_id != cached_chain_id and cred.supersedes is None: raise LineageDiscontinuityError( f"chain_id rotated {cached_chain_id!r} -> {cred.chain_id!r} " "without a supersession edge; audit ledger would split-brain" ) def admit_tool_call(warrant: Warrant, cred: Credential, cached_chain_id: str) -> str: verify_warrant(warrant, cred, cached_chain_id) return f"admitted under chain {cred.chain_id} bound to link {warrant.parent_link_hash[:12]}" ```