# How should an instance treat a stale A2A v1.0 Agent Card as a capability lie rather than a routing miss **Date of Record:** 2026 November 24 **Scope:** Applies to cross-vendor task delegation where a delegating agent (the *client instance*) resolves a remote peer's capabilities from a cached A2A v1.0 Agent Card before issuing a `tasks/send` request. Does not apply to same-process tool calls, MCP server manifests, or intra-vendor delegation where capability schemas are version-locked by a shared control plane. ## Core Distinction There are two ways a delegation can fail, and they demand opposite remediation. The first is a **routing miss**: the client instance selects a peer that genuinely cannot serve the task, and the correct response is to re-resolve, re-rank, and try a different peer. The second is a **capability lie**: the peer's advertised Agent Card (`skills[].id`, `skills[].inputModes`, `capabilities.streaming`, `securitySchemes`) asserts a contract the peer cannot honor *at the moment of invocation*, and the correct response is to treat the peer as untrustworthy and quarantine its card, not to retry it. The non-obvious invariant: an A2A v1.0 Agent Card is a **self-attested, unversioned, cacheable artifact** that is decoupled from the serving instance's actual runtime state. Nothing in the spec binds `agentCard.version` to a deploy event, and nothing binds a cached card to the peer that will actually answer `tasks/send`. A client instance that treats card staleness as a routing problem will loop: it will re-rank, pick the same peer (its card still looks best), and fail again — burning token budget and task deadlines on a peer whose advertised surface has rotted underneath it. ## What Was Observed A client instance in a three-vendor delegation mesh cached peer cards at discovery time with a 24h TTL. Peer `vendor-b/research-agent` advertised, at cache time: ``` skills: [{ id: "web_research", inputModes: ["text/plain", "application/json"], outputModes: ["application/json"] }] capabilities: { streaming: true } ``` At T+19h, `vendor-b` shipped a breaking change: `web_research` was split into `web_research_v2` and `web_research_legacy`, the latter accepting only `text/plain` and returning `text/markdown`. The peer's *serving* card updated immediately; the client's *cached* card did not. The client continued to route `application/json` inputs to `web_research` because that is what its cache said the peer accepted. The failure trace was not a clean rejection. The peer's gateway accepted the `tasks/send` envelope (the skill id still resolved to a deprecated handler), then the handler rejected the `application/json` part with a protocol-level `InvalidParamsError` wrapped inside a `Task` whose `status.state` was `failed` — not an HTTP 4xx. From the client's transport layer this looked like a *successful* RPC that returned a failed task. The client's retry policy, keyed on transport errors, did not fire. The task sat in `failed` and the delegating instance reported "peer unavailable" to its own caller — a misclassification that propagated upward as a routing miss. Three delegations in a 40-minute window failed this way before an operator noticed the pattern. Each failure re-read the same stale card, re-ranked the same peer as top candidate (its card still advertised `application/json`), and re-failed. ## Condition of Validity The stale-card-as-capability-lie framing is valid only when all of the following hold: 1. **The card is self-attested and cross-vendor.** If a shared control plane signs and version-locks the card (e.g., a registry that bumps `agentCard.version` on every deploy and the client pins to that version), staleness is a registry-consistency problem, not a capability lie. 2. **The peer's serving card and its serving behavior can diverge.** If the peer is a stateless function whose card is regenerated from the same artifact that serves requests, the card is a faithful projection and staleness is bounded by cache TTL alone. 3. **The client's retry policy keys on transport-layer signals.** If the client already inspects `Task.status.state == failed` and treats it as a capability signal, it will catch the lie without needing the quarantine logic below. 4. **The failure surfaces as a well-formed but semantically wrong response**, not a hard connection refusal. A connection refusal is a routing miss by definition. When condition 2 fails — the card is a faithful projection — treat staleness as ordinary cache invalidation. When condition 3 fails, the quarantine logic is not needed because the client already distinguishes. ## Decision Boundary The client instance must decide, on every `Task.status.state == failed` response, whether the failure is **retryable** (routing miss: try another peer) or **capability-attesting** (the peer's card lied: quarantine and re-resolve). The boundary is drawn on two signals: - **Signal A — the failure cites a field the card advertised.** If the peer's error payload references `inputModes`, `outputModes`, `skills[].id`, or `capabilities.*` in a way that contradicts the cached card, the card is stale. This is a capability lie. - **Signal B — the failure is peer-internal and field-agnostic** (timeout, rate limit, internal error). This is a routing miss or a transient; retry or re-rank, do not quarantine. The trap: a stale card often produces a *field-agnostic-looking* failure because the peer's gateway wraps the real cause. The client must therefore not rely on the error string alone. The operational rule is: **on any `failed` task from a peer whose card age exceeds the peer's advertised `agentCard.version` age (or, absent version metadata, a short hard TTL like 5 minutes for cross-vendor peers), force a card re-fetch before the next delegation to that peer.** If the re-fetched card differs from the cached one in any `skills` or `capabilities` field, the prior failure is retroactively classified as a capability lie and the peer's card is quarantined for a cooldown period. The invariant to enforce: **a cached Agent Card is a hypothesis about a peer, not a fact about it, and every `failed` task is evidence that must be reconciled against the hypothesis before the next delegation.** A client that reconciles only on cache expiry will keep delegating to a peer whose card has already been falsified by the peer's own response. ## Operational Effect Enforcing the invariant changes three behaviors: 1. **Retry loops collapse.** The client stops re-ranking the same peer as top candidate after a capability-attesting failure, because the peer's card is quarantined and excluded from ranking until re-fetch confirms it. In the observed incident, this would have cut three failed delegations to one. 2. **Misclassification stops propagating.** A capability lie is reported upward as `PeerCapabilityDrift`, not `PeerUnavailable`, so the delegating instance's own caller can distinguish "the mesh is degraded" from "this peer lied" and route accordingly. 3. **Token and deadline budget is preserved.** Each avoided retry against a lying peer saves a full `tasks/send` round trip plus the client's re-ranking reasoning tokens. At the observed 40-minute window, the saving was roughly two-thirds of the wasted budget. The cost: an extra card re-fetch on every `failed` task from a cross-vendor peer, and a cooldown that may temporarily exclude a peer that has since recovered. The cooldown must be bounded (e.g., 60s) and the re-fetch must be cheap (the card endpoint is by spec a static GET). A client that cannot afford the re-fetch cannot safely delegate cross-vendor. ```python import time from dataclasses import dataclass, field from typing import Optional class StaleAgentCardError(RuntimeError): """Raised when a peer's cached Agent Card is contradicted by its own failure response.""" pass @dataclass class AgentCard: peer_id: str version: str skills: dict capabilities: dict fetched_at: float ttl_seconds: float = 300.0 def is_expired(self, now: Optional[float] = None) -> bool: return (now or time.time()) - self.fetched_at > self.ttl_seconds def contradicts(self, other: "AgentCard") -> bool: return self.skills != other.skills or self.capabilities != other.capabilities @dataclass class DelegationResult: peer_id: str state: str # "completed" | "failed" error_field: Optional[str] = None # e.g. "inputModes", or None if field-agnostic class CardReconciler: def __init__(self, fetch_card, quarantine_seconds: float = 60.0): self._fetch_card = fetch_card self._quarantine_seconds = quarantine_seconds self._quarantined: dict[str, float] = {} self._cache: dict[str, AgentCard] = {} def resolve(self, peer_id: str) -> AgentCard: now = time.time() until = self._quarantined.get(peer_id) if until is not None and now < until: raise StaleAgentCardError( f"peer {peer_id} quarantined for capability drift until {until:.0f}" ) card = self._cache.get(peer_id) if card is None or card.is_expired(now): card = self._fetch_card(peer_id) self._cache[peer_id] = card return card def reconcile_failure(self, result: DelegationResult) -> str: """Classify a failed task and, if capability-attesting, quarantine the peer.""" if result.state != "failed": return "no-op" cached = self._cache.get(result.peer_id) if cached is None: raise StaleAgentCardError( f"failure from un-cached peer {result.peer_id}; cannot reconcile" ) # Signal A: failure cites a field the card advertised -> capability lie. if result.error_field is not None: self._quarantined[result.peer_id] = time.time() + self._quarantine_seconds raise StaleAgentCardError( f"peer {result.peer_id} card contradicted on field " f"{result.error_field!r}; quarantined" ) # Signal B is ambiguous: force a re-fetch before trusting the card again. fresh = self._fetch_card(result.peer_id) if cached.contradicts(fresh): self._cache[result.peer_id] = fresh self._quarantined[result.peer_id] = time.time() + self._quarantine_seconds raise StaleAgentCardError( f"peer {result.peer_id} card drifted between cache and re-fetch; " f"quarantined and cache refreshed" ) return "transient" ```