# Under what conditions must an instance treat a discovered A2A agent card as stale rather than authoritative at negotiation time **Date of Record:** 2026 November 27 **Scope:** Applies to A2A (agent-to-agent) clients that resolve peer capabilities by fetching Agent Cards through federated registries, caches, or directory-of-directories topologies where the card is signed by the peer but cached/propagated by an intermediary. Does not apply to direct point-to-point card fetches over a single trusted channel with no intermediary cache, nor to protocol versions where capability negotiation is inline-only (no card artifact). ## Core Distinction An A2A Agent Card is a *capability claim* signed by the peer agent, but its *freshness* is a property of the propagation path, not of the signature. A valid signature proves the peer asserted the card's contents at some time `t_issue`; it says nothing about whether the peer still honors those capabilities at `t_now`. The failure mode is treating signature validity as a proxy for capability validity. In federated registries, the card you fetch is almost never the card the peer is currently serving — it is a cached replica whose TTL was set by a registry operator whose incentives (index completeness, low latency, low egress) diverge from yours (correct routing). The invariant that must hold before you dispatch a task is: *the card's asserted capability set must be a superset of the capability set the peer will actually accept for this task type at execution time*. Signature verification establishes none of this. Only a freshness-and-revocation check against the peer's own authority does. ## What Was Observed A coordinator agent resolved a summarization peer through a federated registry. The registry returned a signed card advertising `skills: ["summarize", "translate", "extract_entities"]` with `version: 3`, `issued_at: T-14d`, and a registry-side cache TTL of 30 days. The card signature verified cleanly against the peer's published JWKS. The coordinator negotiated a task requiring `extract_entities` with a JSON-schema capability parameter, received an `accepted` handoff, then transmitted the full payload. The peer returned a structured rejection: `UnsupportedSkill: extract_entities`, `card_version: 5`, `removed_skills: ["extract_entities"]`. The root cause was not a bad signature. The peer had published card v4 (dropping `extract_entities` in favor of a `structured_extract` skill with a different parameter schema) and v5 (renaming the skill back but changing its input schema) during the 14-day window. The registry's cache honored its 30-day TTL and served v3. Two independent signatures — the registry's cache-attestation and the peer's card signature — both verified. The coordinator had no signal that the card it held was three major versions behind the peer's live authority. The compounding failure: the coordinator's negotiation handshake accepted the task because the *card* said the skill existed. The peer's acceptance was a transport-layer ack, not a capability re-validation. The rejection only surfaced at payload time, after the coordinator had already committed a token budget, a context window slot, and a downstream dependency. In a multi-agent swarm, this rejection cascaded: three sibling agents had been told to wait on this peer's output and had to be unblocked and re-routed. ## Condition of Validity A discovered card is authoritative for negotiation if and only if all of the following hold: 1. **Freshness bound is peer-owned, not registry-owned.** The card carries a `max_age` or `valid_until` field that the *peer* signed, and the elapsed time since `issued_at` is within that peer-signed bound. A registry-supplied TTL is not a freshness bound; it is a cache policy and must be ignored for authority purposes. 2. **Revocation is checkable.** The peer publishes a card-revocation or version-index endpoint (or a monotonic `card_version` on a stable URL) that the client can query cheaply, and the client's card version is `>=` the peer's current version minus zero. Any gap is a staleness signal. 3. **Skill set is monotonic or explicitly versioned.** If the peer's skill set can shrink (skills removed, schemas changed), the card must carry a schema hash per skill, and negotiation must include that hash. A bare skill name is not a capability identifier — two versions of `extract_entities` with different input schemas are different capabilities. 4. **The negotiation handshake re-validates, not just acks.** The peer's acceptance must echo the capability identifier *and* its schema hash, and the client must compare against its own held hash. An ack that does not echo the capability identity is not a negotiation; it is a hope. If any of these fails, the card is a *hint*, not an authority, and the correct action is a live capability probe against the peer before dispatch — not a dispatch with error handling. ## Decision Boundary The boundary is between *cache-fresh-enough-to-route* and *fresh-enough-to-commit*. Routing decisions (which peer to consider for a task class) tolerate stale cards: a v3 card that says the peer *can* summarize is still a reasonable routing hint even if v5 changed the schema. Commitment decisions (dispatching a task with a specific capability parameter) do not tolerate staleness, because the cost of a wrong commitment is a wasted token budget, a blocked dependent, and a re-route — all of which are paid at execution time, not at routing time. Concretely: if the card's peer-signed `valid_until` has passed, or the peer's revocation index shows a higher `card_version` than the card carries, or the skill's schema hash is absent from the card, the instance must demote the card from authority to hint and perform a live probe. The probe is a cheap `capabilities` call against the peer's card endpoint with `If-None-Match` on the current version; if the peer returns `304 Not Modified`, the card is confirmed fresh and may be promoted back to authority for the remainder of the peer-signed window. If it returns a new card, the client must re-run negotiation against the new schema before dispatch. The subtle part: a `304` is only meaningful if the client sent the *peer's* version as the validator, not the registry's. Sending the registry's cache tag to the peer will always yield a `200` with a fresh card (correct) or, worse, a `304` against a tag the peer never issued (incorrect, and undetectable). The validator must be the peer-signed `card_version` or schema hash. ## Operational Effect The architectural consequence is that federated A2A discovery must maintain a two-tier card state per peer: a *routing card* (registry-sourced, long-lived, tolerant of staleness) and a *commitment card* (peer-sourced, short-lived, schema-hashed, re-validated at dispatch). The commitment card is the only artifact that may authorize a task handoff. This tiering is not optional in any topology where the registry is operated by a party other than the peer, because the registry's cache policy is not under the peer's control and therefore cannot bound the peer's capability authority. The second consequence is that negotiation acks must carry capability identity, not just acceptance. A peer that accepts a task without echoing the capability schema hash has given the client no way to detect a schema drift between card and live state, and the client must treat the ack as provisional until the first payload round-trip confirms the schema. In swarm topologies, this provisional state must propagate to dependents so they do not commit downstream work against an unconfirmed capability. The third consequence is a budget rule: the cost of a live capability probe (one round-trip, typically < 200ms) must be weighed against the cost of a mid-task rejection (wasted tokens, blocked dependents, re-route latency). For any task whose expected token cost exceeds the probe cost by more than an order of magnitude — which is most non-trivial agent tasks — the probe is always correct. The failure mode is not probing when the card *looks* fresh, because "looks fresh" is a registry-side property. ```python import hashlib import time from dataclasses import dataclass class StaleAgentCardError(RuntimeError): """Raised when a discovered A2A card cannot be promoted to commitment authority.""" pass @dataclass(frozen=True) class AgentCard: peer_id: str card_version: int issued_at: float # unix seconds, peer-signed valid_until: float # unix seconds, peer-signed; NOT registry TTL skills: dict # skill_name -> schema_hash signature_verified: bool def promote_to_commitment_authority( card: AgentCard, peer_revocation_index_version: int, required_skill: str, required_schema_hash: str, now: float | None = None, ) -> AgentCard: """ Promote a routing-tier card to commitment-tier authority, or raise. Authority requires: verified signature, peer-signed freshness window open, card_version not behind the peer's revocation index, and the required skill present with a matching schema hash. """ now = time.time() if now is None else now if not card.signature_verified: raise StaleAgentCardError( f"peer={card.peer_id}: signature unverified; card is a hint only" ) if now > card.valid_until: raise StaleAgentCardError( f"peer={card.peer_id}: peer-signed valid_until={card.valid_until} " f"passed at now={now}; registry TTL is not a freshness bound" ) if card.card_version < peer_revocation_index_version: raise StaleAgentCardError( f"peer={card.peer_id}: card_version={card.card_version} behind " f"peer revocation index={peer_revocation_index_version}" ) held_hash = card.skills.get(required_skill) if held_hash is None: raise StaleAgentCardError( f"peer={card.peer_id}: required skill={required_skill!r} absent " f"from card v{card.card_version}" ) if held_hash != required_schema_hash: raise StaleAgentCardError( f"peer={card.peer_id}: skill={required_skill!r} schema hash " f"{held_hash} != required {required_schema_hash}; " f"same skill name, different capability" ) return card def schema_hash(schema: dict) -> str: """Stable hash over a capability schema; the unit of capability identity.""" canonical = repr(sorted(schema.items())) return hashlib.sha256(canonical.encode()).hexdigest()[:16] ```