# What happens when an instance negotiates capability against a federated Agent Card registry that has silently drifted from its home domain's authoritative state **Date of Record:** 2026 November 25 **Scope:** Applies to cross-organization A2A/MCP-style federations where an agent resolves a peer's Agent Card through a registry or trust broker that caches or mirrors a home domain's authoritative card. Does not cover intra-domain service discovery with a single writer, nor static capability manifests pinned at deploy time. ## Core Distinction There are two different questions an agent asks a federated registry, and they are not the same question: 1. **"Is this peer trusted?"** — an identity/warrant question, answered by the trust broker's signature chain over the peer's key material. 2. **"What can this peer do right now?"** — a capability question, answered by the Agent Card's `skills`, `capabilities`, schema versions, and transport endpoints. Federation architectures routinely fuse these into a single signed artifact: the broker co-signs a *mirrored* Agent Card, binding the peer's identity to a *snapshot* of its capabilities. The invariant most implementations assume — and most implementations violate — is that **the capability snapshot in the federated card is a pure function of the home domain's current authoritative card**. It is not. It is a pure function of the home card *at the time the mirror was refreshed*, and the trust signature remains valid long after that moment. The signature attests identity continuity; it is silently read as attesting capability currency. This is the boundary. ## What Was Observed A consuming agent (`OrgA/planner`) resolved a peer (`OrgB/ledger-writer`) through a federation broker. The broker's mirrored card advertised `capabilities.schema: "invoice.v3"` and `skills: [post_entry, reverse_entry]`. The card was co-signed by the broker's trust anchor and validated cleanly against the consumer's pinned trust roots. Negotiation succeeded. The consumer dispatched a batch of structured `invoice.v3` payloads. The home domain had, eleven days earlier, deprecated `invoice.v3` in favor of `invoice.v4` and **removed** `reverse_entry` from the peer's card — a capability retraction, not an addition. The broker's mirror refresh job had been failing silently against the home registry's `/cards/{id}` endpoint (HTTP 200 with a `stale: true` body the refresher did not parse, so it treated the response as a no-op success and kept the old snapshot). The broker continued to serve a card that was internally consistent, correctly signed, and wrong. The failure trace: - **T0** — Consumer resolves card. Signature valid. `schema: invoice.v3` accepted. - **T1** — Consumer sends `invoice.v3` payload. Peer, running `invoice.v4`, receives an unknown-version payload. Its own schema validator rejects with a `415`-equivalent over A2A, but the *negotiation* had already been marked `AGREED` on the consumer side, so the consumer's retry logic re-sends rather than renegotiating. - **T2** — Consumer invokes `reverse_entry`, which no longer exists. Peer returns a structured `method_not_found`. The consumer's tool-call loop treats this as a transient transport error (it is not — it is a permanent capability retraction) and backs off and retries. - **T3** — Retry budget exhausts mid-batch. The consumer has written 60% of the batch under `invoice.v3` semantics, the peer has rejected or mis-parsed the remainder, and there is no shared durable record of which entries landed. The consumer's checkpoint says "batch in progress"; the peer's ledger says "partial." Neither side can reconstruct the boundary without out-of-band reconciliation. The non-obvious part: **nothing failed authentication.** Every signature verified. The trust broker did exactly what it was designed to do. The failure lived entirely in the gap between *identity currency* (continuously attested) and *capability currency* (attested once, at mirror time, and never re-attested). ## Condition of Validity The trust-brokered capability handshake is only sound when all of the following hold simultaneously: - The mirrored card carries a **capability epoch** (a monotonically increasing version or a content hash of the home card's capability-bearing fields) that the consumer can compare against the home domain's *current* epoch, not merely against the broker's copy. - The broker's refresh path **distinguishes "home unreachable" from "home says unchanged"** — a silent-success-on-failure refresher (the observed bug) collapses these two states and is the direct cause of drift. - Capability negotiation is **re-run on any capability-shaped error** (`method_not_found`, unknown schema version, `unsupported_capability`), not merely on transport errors. The consumer's error taxonomy must separate *permanent capability retraction* from *transient transport failure*; conflating them turns a retraction into an infinite retry. - The peer's card **retraction semantics are explicit**: removing a skill is a breaking change that must bump the epoch, and a consumer that negotiated against the prior epoch must be told to renegotiate rather than left to discover it via a dead method. When any of these is absent — and in the observed incident, three of four were — the handshake can succeed while the capability contract is already void. ## Decision Boundary The consumer must draw a hard line at the moment it receives a capability-shaped rejection from a peer it believed it had negotiated with: - **Below the boundary (retry):** transport errors, timeouts, `5xx`, rate limits — the peer is presumed capable and merely unreachable. Retry with backoff is correct. - **At/above the boundary (renegotiate or abort):** `method_not_found`, unknown schema version, explicit `capability_retracted`, or any response whose `capability_epoch` differs from the negotiated epoch. The consumer must **invalidate its cached card for that peer, force a re-resolve through the broker, and re-run negotiation before sending another payload.** It must never silently retry a retracted capability. The invariant to enforce: **a negotiated capability is valid only for the epoch it was negotiated under, and any capability-shaped error invalidates that epoch locally.** The consumer owns this invariant; the broker cannot enforce it because the broker does not see the consumer's in-flight calls. ## Operational Effect Enforcing the epoch invariant converts a silent partial-write incident into a bounded, recoverable renegotiation: at T1 the consumer sees the schema rejection, invalidates the `invoice.v3` epoch, re-resolves, receives `invoice.v4`, and either upgrades its payloads or halts the batch cleanly *before* writing — with a durable checkpoint that records "negotiated epoch N, batch not started." The 60%-written state at T3 becomes impossible because the batch never begins under a stale epoch. The cost is an extra resolve-and-negotiate round trip on every capability-shaped error, and the requirement that cards carry an epoch at all. That cost is the price of the only thing that makes federation safe: the ability to tell, at the moment of use, whether the capability you are relying on still exists. ```python class StaleCapabilityEpochError(RuntimeError): """Raised when a negotiated capability is exercised under an epoch the peer no longer honors.""" pass def dispatch_under_negotiated_epoch(peer, negotiated_epoch, payload, broker): # Resolve the peer's current capability epoch through the broker. current = broker.resolve_card(peer.id) # Invariant: a negotiated capability is valid only for the epoch it was negotiated under. if current.capability_epoch != negotiated_epoch: raise StaleCapabilityEpochError( f"peer {peer.id} advanced capability_epoch " f"{negotiated_epoch} -> {current.capability_epoch}; " f"renegotiation required before dispatch" ) response = peer.invoke(payload) # Capability-shaped errors are permanent retractions, not transport failures. if response.kind in {"method_not_found", "unsupported_schema", "capability_retracted"}: broker.invalidate(peer.id) raise StaleCapabilityEpochError( f"peer {peer.id} rejected capability under epoch {negotiated_epoch}: " f"{response.kind} — renegotiate, do not retry" ) return response ```