# What happens when an instance re-attests mid-tool-call and the AAIF warrant chain forks **Date of Record:** 2026 November 25 **Scope:** Applies to agent runtimes that obtain short-lived workload credentials from an Agent Authorization and Identity Framework (AAIF) issuer and present a warrant chain (delegation proof from principal → orchestrator → sub-agent) to downstream resource servers on every tool call. Does not apply to long-lived service-account credentials, mTLS-only mutual auth without delegation warrants, or single-hop agents that never re-attest during an active turn. ## Core Distinction The distinction that matters is between *identity freshness* and *warrant continuity*. AAIF workload credentials are designed to be short-lived and re-attestable: the agent periodically exchanges its platform attestation (e.g., a TPM quote, an enclave measurement, a signed runtime manifest) for a fresh credential with a new `jti`, new `exp`, and a re-signed delegation chain. Most implementers treat re-attestation as a pure liveness/security hygiene operation — "swap the token, keep going." That is correct for a stateless request. It is *wrong* for an agent mid-execution, because the warrant chain is not just a bearer token: it is the cryptographic record of *which principal authorized which concrete action under which constraints*. When an instance re-attests between the issuance of a tool-call intent and the resource server's verification of that intent, the new credential can carry a re-signed chain whose intermediate delegation node differs (new orchestrator `jti`, new policy epoch, new constraint set) from the chain that authorized the original intent. The result is a **warrant fork**: the agent presents a credential that is valid, unexpired, and correctly signed, but whose chain does not actually authorize the specific action the agent is in the middle of performing. The resource server sees a valid credential; the audit log sees an authorization that never happened under the chain that is now on the wire. The boundary is sharp: re-attestation is safe at turn boundaries and unsafe *within* a turn, unless the runtime pins the warrant chain for the duration of the in-flight action and treats re-attestation as a *new* chain that must re-authorize, not inherit, pending intents. ## What Was Observed A three-hop agent executed a `transfer_funds` tool call against a resource server enforcing AAIF warrant checks. Trace, condensed: 1. **t0** — Orchestrator holds warrant chain `W1 = [P→O (epoch 41), O→A1 (scope: transfer ≤ $500)]`. Sub-agent A1 issues an intent `I = transfer($480)`, signs it with the credential bound to `W1`, and begins the call. 2. **t1** — A1's credential hits its 90s soft-expiry mid-flight (the tool call is slow: the resource server does a downstream KYC lookup). The runtime's background re-attestor fires, exchanges attestation, and receives a fresh credential bound to `W2 = [P→O (epoch 42), O→A1 (scope: transfer ≤ $500, new constraint: beneficiary allowlist v7)]`. Epoch 42 tightened the beneficiary allowlist. The runtime overwrites the in-memory credential. 3. **t2** — The resource server, having received `I` signed under `W1` but the *connection* re-presenting `W2` on a retry after a transient 503, verifies `W2`, sees a valid chain, and — because the intent signature and the presented chain are verified independently — accepts the call. The beneficiary in `I` is *not* on allowlist v7. 4. **t3** — Audit reconciliation fails: the intent's signature binds to `W1`'s `jti`, but the authorization record written by the resource server references `W2`'s chain. The two records cannot be joined. The transfer is neither provably authorized nor provably unauthorized. The non-obvious part: nothing in the system *errored*. Every signature verified. Every expiry was respected. The failure was a silent continuity break between the warrant that authorized an intent and the warrant that was presented to verify it. ## Condition of Validity The fork is only possible when all of the following hold simultaneously: - The runtime supports **in-turn re-attestation** (background refresh, not turn-boundary only). - The resource server verifies the **presented credential** and the **intent signature** as two independent checks, rather than requiring the intent to be signed by the same `jti` and chain that is presented at verification time. - The tool call is **retryable or connection-resumable**, so a second presentation of the same intent can occur after the credential has rotated. - The re-issued chain is **not byte-identical** to the prior chain — i.e., the issuer re-signs with a new epoch, new `jti`, or tightened constraints. (If the issuer returns an idempotent chain for the same attestation within a window, the fork collapses to a no-op.) Absent any one condition, the mechanism does not fire. In particular, a runtime that pins the credential for the duration of an in-flight turn — refusing to swap while an intent is outstanding — cannot fork, because the chain presented at verification is the chain that signed the intent. ## Decision Boundary The architectural invariant required is **warrant pinning with intent binding**: > For every in-flight intent, the credential presented at verification MUST be the credential (same `jti`, same chain hash) that signed the intent. Re-attestation during an in-flight turn MUST NOT mutate the credential bound to outstanding intents; it may only stage a successor credential for the *next* turn, or it must invalidate and re-authorize all outstanding intents under the new chain before any retry is permitted. The decision boundary for the runtime is therefore: - **At a turn boundary** (no outstanding intents): re-attest freely, swap credential, proceed. - **Within a turn with outstanding intents**: stage the new credential, keep the old one bound to outstanding intents until they resolve or are explicitly re-authorized. If the old credential expires before resolution, the intents MUST be failed closed — not retried under the successor chain — because retrying under a chain that did not authorize them is exactly the fork. The resource server's side of the boundary: **bind verification**. The verifier must check that `intent.signing_jti == presented_credential.jti` and `hash(presented_chain) == intent.chain_hash`. A valid-but-different chain is a rejection, not an acceptance. ## Operational Effect Without the invariant, the observable effect is an **authorization continuity gap** that is invisible to per-request validation and only surfaces at audit reconciliation or, worse, at incident review after an out-of-policy action. The agent's own reasoning loop does not notice: it sees a 200, records success, and continues. The resource server does not notice: it saw a valid credential. Only the join of intent-signature and chain-presentation reveals the break. The guardrail is cheap to implement and expensive to omit. Pin the credential per in-flight intent; fail closed on expiry rather than retrying under a successor chain; make the verifier reject chain/intent mismatch rather than validating them independently. The failure mode is not a crash — it is a quiet, cryptographically clean authorization that no one actually granted. ```python import hashlib from dataclasses import dataclass, field class WarrantForkError(RuntimeError): """Raised when an intent is presented under a warrant chain that did not authorize it.""" @dataclass(frozen=True) class WarrantChain: jti: str epoch: int constraints: dict def chain_hash(self) -> str: payload = f"{self.jti}|{self.epoch}|{sorted(self.constraints.items())}" return hashlib.sha256(payload.encode()).hexdigest() @dataclass class Intent: action: str signing_jti: str chain_hash: str resolved: bool = False @dataclass class AgentRuntime: current_chain: WarrantChain outstanding: list = field(default_factory=list) def issue_intent(self, action: str) -> Intent: intent = Intent( action=action, signing_jti=self.current_chain.jti, chain_hash=self.current_chain.chain_hash(), ) self.outstanding.append(intent) return intent def re_attest(self, successor: WarrantChain) -> None: # In-turn re-attestation is only safe if no intent is outstanding. live = [i for i in self.outstanding if not i.resolved] if live: # Stage successor but do NOT rebind outstanding intents. self._staged = successor return self.current_chain = successor def present(self, intent: Intent) -> WarrantChain: # Verifier-side binding: the presented chain MUST be the signing chain. if intent.chain_hash != self.current_chain.chain_hash(): raise WarrantForkError( f"intent signed under {intent.signing_jti} " f"({intent.chain_hash[:12]}) presented under " f"{self.current_chain.jti} ({self.current_chain.chain_hash()[:12]})" ) return self.current_chain def verify_call(runtime: AgentRuntime, intent: Intent) -> None: chain = runtime.present(intent) if intent.resolved: raise WarrantForkError(f"intent {intent.action!r} already resolved; replay rejected") # ... resource-server-side authorization under `chain` ... intent.resolved = True ```