# In what scenarios must an instance treat an A2A v1.0 Agent Card as a cache-coherence hazard rather than a discovery artifact **Date of Record:** 2026 November 26 **Scope:** Applies to delegating agents that resolve remote A2A v1.0 peers via Agent Card fetch and then dispatch `tasks/send` across vendor boundaries where the remote executor's advertised capability set can change between card fetch and task execution. Does not apply to single-vendor deployments where card and executor are versioned and deployed atomically behind one control plane. ## Core Distinction The Agent Card is treated by most A2A clients as a *discovery* artifact: fetch once, cache, dispatch. This is the wrong mental model. In a cross-vendor delegation, the Agent Card is a *capability claim* with a validity window that is decoupled from the executor's actual state. The card is served by a discovery endpoint (often a CDN, a static manifest, or a well-known URI) that is operated by a different control plane than the task executor. The two are not transactionally coupled. A card is therefore a *stale-by-construction* snapshot of the remote agent's skills, input/output schemas, and supported `message` content types. The distinction that matters operationally: a card fetch that returns HTTP 200 and a schema-valid document tells you what the remote *advertised at some past instant*, not what the remote *will accept at dispatch time*. The failure mode is not "the card is malformed." It is "the card is well-formed, recently fetched, and wrong." ## What Was Observed A delegating orchestrator (vendor A) resolved a research-synthesis peer (vendor B) whose card advertised skill `summarize.v3` with an input schema requiring `{documents: array, max_tokens: integer}`. The orchestrator cached the card with a 15-minute TTL, validated its own outbound payload against the cached JSON Schema, and dispatched a `tasks/send` with a conformant body. Vendor B had, four minutes earlier, rolled `summarize.v4`: the executor now requires `{documents: array<{uri, mime}>, max_tokens: integer, citation_mode: enum}` and *rejects* bare-string `documents`. The card endpoint was still serving the v3 manifest because the manifest is published from a separate release pipeline that lags the executor rollout by a blue/green drain window. The trace: 1. Orchestrator fetches card at T+0, validates schema, caches under key `(peer_id, card_etag)`. 2. Vendor B executor flips to v4 at T+4min. Card endpoint unchanged (etag identical). 3. Orchestrator dispatches at T+9min with v3-conformant body. 4. Executor returns JSON-RPC error `-32602 Invalid params` with a message referencing field `documents[0].mime`. 5. Orchestrator's retry policy sees a non-idempotent-looking 4xx, marks the peer `degraded`, and *does not refetch the card* because the cached etag still matches the discovery endpoint's `ETag` header. The orchestrator's cache-coherence logic was correct against the discovery endpoint and wrong against the executor. It had no signal that the two had diverged. The task failed, the peer was penalized in the routing table, and the same failure recurred for every orchestrator instance sharing the cache until TTL expiry. The non-obvious part: the `ETag` matched. A conditional `If-None-Match` refetch would have returned `304 Not Modified`. The cache was *provably fresh with respect to its source* and *provably stale with respect to its consumer*. ## Condition of Validity The invariant that must hold for card-cache-as-truth to be safe is: > For every peer P, the card served at discovery(P) and the executor at dispatch(P) are drawn from the same monotonic version sequence, and a version bump at the executor is observable at discovery(P) no later than it is observable at dispatch(P). This holds in single-control-plane deployments and fails in every cross-vendor deployment where the card is a published manifest and the executor is a rolling service. It also fails whenever the card is served through a CDN with its own TTL, or when the card is hand-maintained by the peer vendor and updated on a human cadence. When the invariant does not hold, the following must be treated as *unverified* at dispatch time, regardless of card freshness: - Input schema required fields and their types. - Enumerated `content types` the peer will accept in `message.parts`. - The set of `skills` the peer will actually route (a card may advertise a skill the executor has feature-flagged off). - Authentication scheme and required scopes (a card may advertise `bearer` while the executor now requires mTLS or a signed warrant). The card is a *hint*, not a contract. The only contract is the executor's response to a real request. ## Decision Boundary The boundary is: **does the delegation path have a cheap, side-effect-free way to confirm executor state before committing a task?** If yes — e.g., the peer exposes a `tasks/validate` or dry-run endpoint, or the card carries a `version` field that the executor echoes in an error envelope — the orchestrator may cache the card aggressively, because divergence is detectable and recoverable without task loss. If no — the common case for cross-vendor peers — the orchestrator must treat card-derived schema as *advisory* and adopt one of: 1. **Optimistic dispatch with structured renegotiation.** Dispatch the task; on `-32602` or a schema-shaped error, refetch the card unconditionally (bypass `If-None-Match`), re-derive the payload, and retry once. This requires the orchestrator to distinguish "schema rejection" from "task rejection" in the error envelope — a distinction A2A v1.0 does not standardize, so it must be inferred from error code and message shape, which is itself probabilistic. 2. **Pessimistic probe.** Send a minimal no-op or capability-probe task before the real dispatch. Costs a round trip and may not be supported. 3. **Version pinning by contract.** Negotiate an explicit card `version` out-of-band and refuse to dispatch if the executor's error envelope does not echo it. This only works if the peer vendor cooperates. The decision boundary is *not* "is the card fresh?" — freshness against the discovery endpoint is necessary but not sufficient. It is "can I detect executor-side divergence before I lose the task?" ## Operational Effect An orchestrator that treats card freshness as sufficient will exhibit a characteristic failure signature under cross-vendor delegation: - Bursts of `-32602` errors clustered around peer rollout windows, not around orchestrator changes. - Cache hit rate near 1.0 while task success rate dips — the cache is *working* and *causing* the failure. - Routing tables that penalize peers for orchestrator-side staleness, causing the orchestrator to route around a healthy peer and concentrate load on a smaller set of peers, which then saturate and produce a second, unrelated failure class. - Retry storms that replay the same stale payload, because the retry path re-validates against the same cached card. The corrective invariant: **card-derived schema must be re-validated against the executor on any schema-shaped rejection, and the refetch must be unconditional (no `If-None-Match`), because the discovery endpoint's etag is not a proxy for executor state.** Additionally, the orchestrator must not penalize the peer's routing score for a rejection that occurred within a configurable divergence window after a card fetch — the rejection is evidence of orchestrator staleness, not peer unreliability. Conflating the two converts a cache-coherence bug into a routing instability that outlives the original rollout. The guardrail is a *divergence-aware dispatch loop*: treat the first schema-shaped rejection from a peer as a signal to invalidate the card cache entry unconditionally, re-derive the payload, and retry exactly once; if the retry also fails, escalate to the peer's error channel rather than the routing penalty path. The loop must be bounded to one renegotiation to avoid oscillation when the peer's card and executor are persistently out of sync — in that case the peer is genuinely misconfigured and should be quarantined, not retried. ```python class CardExecutorDivergence(RuntimeError): """Raised when a peer's advertised Agent Card schema disagrees with its executor's accepted schema.""" pass class DivergenceAwareDispatcher: def __init__(self, card_cache, transport, max_renegotiations: int = 1): self.card_cache = card_cache self.transport = transport self.max_renegotiations = max_renegotiations def dispatch(self, peer_id: str, skill: str, payload: dict) -> dict: renegotiations = 0 while True: card = self.card_cache.get(peer_id) if card is None: raise CardExecutorDivergence( f"no card cached for peer {peer_id!r}; refusing blind dispatch" ) if skill not in card.get("skills", {}): raise CardExecutorDivergence( f"peer {peer_id!r} card does not advertise skill {skill!r}" ) self._validate_against_card(card, skill, payload) response = self.transport.send(peer_id, skill, payload) if not self._is_schema_rejection(response): return response # Schema-shaped rejection: the card lied. Invalidate unconditionally. if renegotiations >= self.max_renegotiations: self.card_cache.quarantine(peer_id) raise CardExecutorDivergence( f"peer {peer_id!r} card/executor persistently divergent after " f"{renegotiations} renegotiation(s); quarantined" ) self.card_cache.invalidate_unconditional(peer_id) # no If-None-Match new_card = self.card_cache.fetch(peer_id) if new_card is None: raise CardExecutorDivergence( f"peer {peer_id!r} card refetch failed during renegotiation" ) payload = self._renegotiate_payload(card, new_card, skill, payload) renegotiations += 1 def _validate_against_card(self, card, skill, payload): # Local JSON-Schema check against cached card. Advisory only. ... def _is_schema_rejection(self, response) -> bool: # A2A v1.0 does not standardize this; infer from JSON-RPC code + message shape. err = response.get("error") or {} return err.get("code") == -32602 and "param" in str(err.get("message", "")).lower() def _renegotiate_payload(self, old_card, new_card, skill, payload): # Map old-schema payload onto new-schema requirements; refuse if unmappable. ... ```