# What happens when an instance attests a peer's identity before its own warrant chain has been anchored: trust-bootstrap ordering failures in cross-org agent federation handshakes **Date of Record:** 2026 December 1 **Scope:** Applies to federated agent-to-agent handshakes where agent identity is established by verifiable credentials (DID/VC, SPIFFE-style SVIDs, or signed capability warrants) and mutual attestation is required before any task-state or tool invocation is exchanged. Does not apply to single-org intra-cluster mTLS where a shared root of trust is pre-provisioned and warrant chains are issued by one authority. ## Core Distinction The failure is not "the peer's signature failed to verify." It is an *ordering* defect: an agent instance completes the *inbound* half of the mutual attestation handshake — verifying the peer's identity credential and warrant chain — and then, on the strength of that verification, emits its own outbound attestation *before* its own warrant chain has been anchored to the federation's trust root (or before its local anchor cache has been refreshed to a root the peer will accept). The two halves of a mutual handshake are not independent; they form a causally coupled pair whose validity depends on a partial order: **anchor-self → verify-peer → assert-self → accept-peer-assertion**. Collapsing the middle two steps (verify and assert) into one "I have verified you, therefore I am trusted enough to tell you who I am" inference produces a class of asymmetric, hard-to-reproduce trust failures that manifest only at federation boundaries, only on cold start, and only when the two orgs' trust roots have diverged in time. The non-obvious invariant: **a successful inbound verification is not evidence of outbound trustworthiness.** Verifying a peer's warrant says nothing about whether *your* warrant is currently anchored in a root the *peer* will accept. Agents routinely conflate "I could validate them" with "I am valid to them." These are asymmetric properties of two different trust graphs, and the handshake is the only place the asymmetry becomes observable. ## What Was Observed A federation of two organizations, A and B, each running an agent orchestrator with a local trust-anchor cache. Org A rotates its federation root-of-trust signing key on a 24-hour schedule; the new root is published to a shared discovery channel, but each agent instance caches the prior root with a TTL of 6 hours. Org B's agents accept warrants chained to any root published within the last 12 hours (a deliberate skew window for clock drift). The failure trace, observed when a freshly cold-started A-agent (A1) initiates a handshake with a long-lived B-agent (B1) at hour 7 of A's key rotation: 1. A1 cold-starts with an **empty** anchor cache. Its first action is to fetch B1's identity credential and warrant chain (inbound). 2. B1 presents a credential chained to B's current root. A1 fetches B's root from discovery, validates the chain, and marks the peer as verified. **Inbound succeeds.** 3. A1, now holding a "peer verified" state, immediately emits its own outbound attestation: its identity credential plus its warrant chain, chained to A's **prior** root — because A1's own anchoring step (fetching A's current root and re-signing/refreshing its local warrant pointer) is a *separate* async step that has not completed. A1's warrant chain is valid, but anchored to a root that A rotated 7 hours ago. 4. B1 receives A1's attestation. B1's acceptance rule requires the chain to terminate at a root published within 12 hours. A's prior root was published 31 hours ago (it was the root *before* the rotation that happened 7 hours ago). B1 **rejects** A1's outbound attestation. 5. A1 has already recorded B1 as "verified and trusted." B1 has recorded A1 as "untrusted / attestation rejected." The handshake is now **asymmetrically complete**: A1 believes the federation link is up; B1 believes it is down. The observable symptom was not a clean handshake failure. It was a *split-brain trust state*: A1 proceeded to send task-state and tool-invocation frames to B1 (believing trust was mutual), B1 dropped them at the transport boundary (believing trust was absent), and A1's retry logic — seeing no application-level ack — re-sent, re-attested with the same stale anchor, and re-failed on a loop. The retry loop never converged because A1's outbound anchoring step, gated behind a "peer verified" precondition, was starved: A1's scheduler had deprioritized self-anchoring as "already have a trusted peer, defer." The root cause is the **inference in step 3**: A1 treated inbound verification success as a precondition satisfied for outbound assertion. The correct partial order requires self-anchoring to *complete* (not merely begin) before outbound assertion. In the observed trace, self-anchoring had not even started. ## Condition of Validity The failure is bounded by three concurrent conditions; remove any one and the handshake either succeeds or fails cleanly: - **Anchor divergence in time.** The two orgs' roots must be at different rotation epochs such that one side's *current* root is the other side's *prior* root. If both sides rotate in lockstep, or if the peer's acceptance window is wide enough to cover the prior root, the stale-anchor attestation is accepted and the ordering defect is invisible. - **Empty or stale local anchor cache.** A warm instance that already holds its own current root will self-anchor trivially (cache hit) and the ordering defect is masked. The defect surfaces on **cold start** or after cache eviction — which is why it correlates with instance restarts, autoscaling events, and TTL expiry rather than with steady-state traffic. - **Async self-anchoring decoupled from the handshake state machine.** If self-anchoring is a *synchronous* precondition of the handshake (the instance cannot enter the assert phase until its own anchor is confirmed fresh), the defect cannot occur. It occurs precisely when self-anchoring is modeled as an independent background task that the handshake state machine *reads* rather than *awaits*. The invariant that must hold: **for every handshake, `self_anchor_epoch ≥ peer_min_acceptable_epoch` must be checked and satisfied before the outbound attestation frame is constructed, not after.** This is a property of the *emitting* instance, not the *receiving* one, and it cannot be repaired by the receiver — the receiver has no way to tell a stale-anchor attestation from a malicious one, so it correctly rejects, and the emitter misreads the rejection as a transport fault. ## Decision Boundary The architectural choice is where to place the self-anchor freshness gate: - **Receiver-side acceptance windows (rejected as sole mechanism).** Widening B's 12-hour window to cover A's prior root trades a correctness failure for a security regression: it accepts warrants chained to roots that A itself has retired, extending the window in which a compromised prior root remains valid. This is the tempting fix because it makes the symptom disappear, and it is wrong. - **Emitter-side synchronous anchor gate (required).** The handshake state machine must treat "my own warrant is anchored to a root the peer will accept" as a *blocking precondition* of the assert phase. The emitter must fetch/refresh its own anchor, compare its anchor epoch against the peer's advertised `min_acceptable_epoch` (which must be exchanged in the *first* handshake frame, before any attestation), and refuse to construct the outbound attestation if the comparison fails — surfacing a `StaleSelfAnchorError` rather than silently emitting a doomed frame. - **Bidirectional epoch exchange in the preamble (required companion).** The peer's `min_acceptable_epoch` must be known to the emitter *before* the emitter asserts. This means the handshake preamble carries the acceptance window, and the assert phase is gated on the emitter's own anchor satisfying it. Without this, the emitter cannot know it is about to fail. The boundary is therefore: **the emitter, not the receiver, owns the responsibility for ensuring its own attestation is acceptable, and it can only discharge that responsibility if the peer's acceptance window is exchanged before assertion.** Any design where the emitter asserts first and learns of rejection later has moved the failure from a clean, local, pre-flight error into a distributed, retry-amplified, split-brain trust state. ## Operational Effect The downstream consequences are what make this failure expensive: - **Retry amplification against a stale anchor.** Because the emitter's self-anchoring is deprioritized once "peer verified," and because the emitter's retry path re-asserts with the same stale anchor, the loop is self-sustaining. The emitter never advances its anchor epoch because it never re-enters the self-anchor task (it believes it already has a trusted peer). The loop terminates only when the emitter's anchor cache TTL forces a refresh, or when an operator intervenes — a mean time to recovery measured in hours, not seconds. - **Asymmetric trust state poisoning.** A1's local belief ("B1 trusted") is durable and wrong. If A1 later receives a *different* peer's attestation, its "peer verified" state may cause it to skip preamble epoch exchange entirely, propagating the defect to subsequent handshakes. The stale belief is a latent state-continuity fault: it survives the failed handshake and corrupts the next one. - **Silent task-frame loss.** Task-state and tool-invocation frames sent under the false mutual-trust belief are dropped at B1's transport boundary without application-level error. A1's task execution proceeds against a peer that is not listening, producing partial execution and orphaned side effects that surface only when the task's downstream consumer notices missing results — often far from the handshake that caused them. The guardrail is the synchronous anchor gate plus preamble epoch exchange, and the operational telemetry that makes the failure legible: emit a distinct `StaleSelfAnchorError` at the emitter (not a generic handshake timeout), log the emitter's anchor epoch and the peer's `min_acceptable_epoch` at the moment of refusal, and alarm on any `peer_verified == true AND outbound_attestation_rejected == true` state — that conjunction is the signature of an ordering defect and should never occur in a correctly ordered handshake. ```python from dataclasses import dataclass from enum import Enum class HandshakePhase(Enum): PREAMBLE = "preamble" SELF_ANCHOR = "self_anchor" VERIFY_PEER = "verify_peer" ASSERT_SELF = "assert_self" COMPLETE = "complete" class StaleSelfAnchorError(RuntimeError): """Raised when an instance attempts to emit its outbound attestation while its own warrant chain is anchored to a root epoch the peer will not accept. This is an emitter-side ordering fault, not a receiver-side rejection: the emitter must not construct the frame.""" @dataclass class AnchorState: epoch: int root_published_at: int # monotonic hours refreshed: bool @dataclass class PeerPreamble: peer_id: str min_acceptable_epoch: int def run_handshake( self_anchor: AnchorState, peer_preamble: PeerPreamble, peer_verified: bool, now_hours: int, ) -> HandshakePhase: # Correct partial order: exchange preamble BEFORE asserting. # The emitter learns the peer's acceptance window first. if peer_preamble.min_acceptable_epoch <= 0: raise StaleSelfAnchorError( f"peer {peer_preamble.peer_id} advertised invalid acceptance window" ) # Inbound verification may have succeeded, but that is NOT evidence # that our own warrant is acceptable to the peer. Gate on self-anchor. if not peer_verified: return HandshakePhase.VERIFY_PEER # Synchronous self-anchor gate: must satisfy the peer's window. if not self_anchor.refreshed: raise StaleSelfAnchorError( f"self anchor epoch {self_anchor.epoch} not refreshed; " f"cannot assert to peer {peer_preamble.peer_id}" ) if self_anchor.epoch < peer_preamble.min_acceptable_epoch: raise StaleSelfAnchorError( f"self anchor epoch {self_anchor.epoch} < peer " f"{peer_preamble.peer_id} min_acceptable_epoch " f"{peer_preamble.min_acceptable_epoch}; refusing to emit " f"outbound attestation (would be rejected, producing " f"asymmetric split-brain trust state)" ) # Only now may we construct and emit the outbound attestation. return HandshakePhase.ASSERT_SELF ```