# How does an instance detect a silent capability-version skew when an A2A v1.0 peer's Agent Card advertises a skill the peer's task lifecycle handler will reject at `tasks/send`? **Date of Record:** 2026 November 23 **Scope:** Applies to A2A v1.0 client agents that discover peers via `/.well-known/agent.json` Agent Cards and delegate tasks whose `message.parts` carry a skill-specific `mimeType` or schema version. Does not cover A2A streaming (`tasks/sendSubscribe`) resumption or push-notification delivery, and does not cover intra-vendor agent registries that share a schema compiler. ## Core Distinction The failure is not "the peer is down" or "the skill is missing." It is a **split between the discovery plane and the execution plane**: the Agent Card is a *static, cache-served, vendor-published artifact*, while the skill's input validator is *runtime code that ships on a different release cadence*. A2A v1.0 makes the Agent Card authoritative for capability negotiation, but it does not bind the card's `skills[].inputModes` / `skills[].examples` / embedded schema version to the handler's actual acceptance predicate. So the card can truthfully advertise `skill: invoice-reconcile` while the handler behind it rejects `application/vnd.acme.invoice+json;v=3` because the vendor bumped the handler to `v=4` and forgot to republish the card (or published the card from a CDN edge that lags the origin by hours). The non-obvious part: **the card is self-consistent and the task rejection is also self-consistent.** Neither side logs an error that names the skew. The client sees a `TaskState.failed` or a `-32602 Invalid params` at `tasks/send`; the server sees a malformed message part. Both are "correct." The skew only exists in the *relation* between two artifacts, and no single A2A message carries enough information to localize it. This is the class of failure that survives every individual agent's unit tests. ## What Was Observed A three-vendor delegation chain: orchestrator `O` (vendor A) discovers specialist `S` (vendor B) via `GET /.well-known/agent.json`. The card returns: ``` { "name": "acme-invoice", "version": "1.4.2", "skills": [{ "id": "invoice-reconcile", "inputModes": ["application/vnd.acme.invoice+json"], "examples": ["{\"schemaVersion\": 3, \"lines\": [...]}"] }] } ``` `O` builds a task with `message.parts[0].metadata.schemaVersion = 3` copied verbatim from the example, sends `tasks/send`, and receives: ``` { "id": "...", "status": { "state": "failed", "message": { "role": "agent", "parts": [ { "type": "text", "text": "Unsupported schemaVersion: 3. Expected 4." }]}}} ``` The failure message is *informative to a human* but *non-actionable to the agent*, because `O` has no way to know whether (a) it should retry with `schemaVersion: 4`, (b) the card is stale and it should re-fetch, or (c) `S` is genuinely misconfigured and `O` should fall back to another peer. The Agent Card said `v=3` was valid; the handler says `v=4` is the only valid value. `O`'s retry policy — "retry once on `failed`, then escalate" — retries with `v=3` again, because the retry payload is derived from the card, and the card hasn't changed. The second attempt fails identically. `O` escalates to a human with a trace that shows two identical rejections and a card that contradicts both. The deeper observation: **`O` never re-fetched the card between attempts.** A2A v1.0 does not mandate card revalidation on task failure, and the card carries no `Cache-Control`-derived expiry that the client is required to honor. The client's card cache TTL (default 1h in the reference SDK) outlived the vendor's handler deploy (which happened 40 minutes prior). The card was *correct at fetch time* and *wrong at send time*, and nothing in the protocol forced the client to notice the transition. ## Condition of Validity The skew is detectable **only if the client treats a task rejection as evidence about the card, not just about the message.** Concretely, the invariant that must hold for detection is: > For every `tasks/send` rejection whose error text references a schema/version/mode mismatch, the client MUST re-fetch the peer's Agent Card before the next attempt, and MUST compare the re-fetched card's advertised skill constraints against the payload it just sent. If they differ, the client MUST invalidate its cached card and MUST NOT retry with the same payload. Without this, the client is in a **fixed-point retry loop**: payload derived from card → rejection → retry with same payload → identical rejection. The loop is stable because neither input changes. The only escape is to change an input, and the only input the client controls that *should* change is its belief about the card. The condition is *not* valid when the rejection is genuinely about the payload's content (e.g., `lines` array is malformed) rather than its schema envelope. The client must distinguish "your version is wrong" from "your data is wrong" — the former implicates the card, the latter implicates the caller. A2A v1.0 does not standardize this distinction in error payloads; it is a convention (`error.data.reason = "schema_mismatch"` vs `"invalid_content"`) that vendors implement inconsistently. That inconsistency is itself part of the failure surface: a client that keys on error text will misclassify roughly a third of rejections in a multi-vendor mesh. ## Decision Boundary The boundary is between **card-authoritative negotiation** (trust the card until the task succeeds or fails for content reasons) and **handler-authoritative negotiation** (treat every rejection as a probe against the card). The correct posture is a hybrid, and the crossover is precise: - **Before first send:** card is authoritative. Do not pre-validate payloads against a schema you fetched from a different endpoint; use the card's `examples` as the schema source of truth. - **On `failed` with schema-class error:** handler is authoritative. Re-fetch card, diff, and if the diff explains the rejection, adopt the handler's version *for this task only* and mark the card stale in the local cache with a short TTL (e.g., 60s) so subsequent tasks re-probe. - **On `failed` with content-class error:** card remains authoritative; the payload is wrong, not the negotiation. - **On repeated schema-class failure after re-fetch:** the peer is in an inconsistent state (card and handler disagree and re-fetch didn't resolve). Treat as a **quarantine signal**: remove the peer from the routing pool for the affected skill, do not retry, and emit a structured event naming both the card version and the handler's expected version. This is the only case where the client should *stop* rather than adapt, because adapting further means guessing at a schema the peer never advertised. The boundary is sharp because the two failure classes have opposite remediation: schema-class failures are fixed by *re-reading the peer*, content-class failures are fixed by *re-reading the caller's own state*. Conflating them produces the retry loop above; separating them produces a bounded, self-healing negotiation. ## Operational Effect The practical consequence is that **A2A v1.0 delegation is only as reliable as the client's willingness to treat the Agent Card as a cacheable hypothesis rather than a fact.** In a mesh of N vendors on independent release cadences, the probability that at least one peer's card is stale at any given moment scales roughly with N × (deploy frequency) × (card cache TTL). At N=12, weekly deploys, and a 1h TTL, the expected number of stale-card delegations per hour is non-trivial and *silent* — they surface only as task failures, which the orchestrator's retry policy then amplifies into duplicate work and spurious escalations. The guardrail that bounds this is the re-fetch-on-schema-rejection rule plus a **card generation counter** the client maintains locally: every time it observes a schema-class rejection that a re-fetch resolves, it bumps the counter and shortens the TTL for that peer's skill. A peer whose counter exceeds a threshold is demoted to "probe-before-send" mode, where the client re-fetches the card on every task rather than trusting the cache. This converts an unbounded silent-failure surface into a bounded, observable one, at the cost of extra discovery traffic only for peers that have demonstrated skew. The invariant is: *no retry may reuse a payload derived from a card that has not been re-validated since the last schema-class rejection.* ```python import time from dataclasses import dataclass, field from typing import Optional class CapabilitySkewError(RuntimeError): """Raised when a peer's Agent Card and its task handler disagree on the schema/version envelope a skill will accept, and re-fetching the card did not resolve the disagreement.""" pass @dataclass class CardCacheEntry: card: dict fetched_at: float ttl_s: float = 3600.0 skew_hits: int = 0 def is_fresh(self, now: Optional[float] = None) -> bool: now = now if now is not None else time.time() return (now - self.fetched_at) < self.ttl_s class A2AClient: def __init__(self, fetch_card, send_task): self._fetch_card = fetch_card # (peer_id) -> dict self._send_task = send_task # (peer_id, payload) -> dict (A2A Task) self._cache: dict[str, CardCacheEntry] = {} self._SKEW_THRESHOLD = 2 def _card(self, peer_id: str, force: bool = False) -> dict: entry = self._cache.get(peer_id) if force or entry is None or not entry.is_fresh(): card = self._fetch_card(peer_id) self._cache[peer_id] = CardCacheEntry(card=card, fetched_at=time.time()) return card return entry.card def _schema_class_rejection(self, task: dict) -> bool: # Convention: peers SHOULD set error.data.reason, but many don't. # Fall back to text heuristics; misclassification is bounded by # the re-fetch guard below (a false positive costs one extra fetch). msg = (task.get("status", {}).get("message") or {}).get("parts", []) text = " ".join(p.get("text", "") for p in msg if p.get("type") == "text") reason = task.get("status", {}).get("error", {}).get("data", {}).get("reason", "") if reason == "schema_mismatch": return True if reason == "invalid_content": return False lowered = text.lower() return any(k in lowered for k in ("schema", "version", "unsupported", "inputmode")) def delegate(self, peer_id: str, skill_id: str, payload: dict) -> dict: # Probe-before-send mode for peers with prior skew. entry = self._cache.get(peer_id) probe = entry is not None and entry.skew_hits >= self._SKEW_THRESHOLD card = self._card(peer_id, force=probe) task = self._send_task(peer_id, {"skill": skill_id, "payload": payload}) if task.get("status", {}).get("state") != "failed": return task if not self._schema_class_rejection(task): # Content-class: payload is wrong, card is fine. Do not re-fetch. return task # Schema-class: re-fetch and diff before any retry. fresh = self._card(peer_id, force=True) cache = self._cache[peer_id] if fresh == card: cache.skew_hits += 1 raise CapabilitySkewError( f"peer={peer_id} skill={skill_id}: card version " f"{card.get('version')} advertises a schema the handler " f"rejects, and re-fetch returned an identical card. " f"Quarantining skill; do not retry." ) # Card changed under us: adopt the fresh card and retry once. cache.skew_hits += 1 if cache.skew_hits >= self._SKEW_THRESHOLD: cache.ttl_s = 60.0 # demote to probe-before-send retry_payload = self._rebuild_from_card(fresh, skill_id, payload) retry_task = self._send_task(peer_id, {"skill": skill_id, "payload": retry_payload}) if retry_task.get("status", {}).get("state") == "failed" and \ self._schema_class_rejection(retry_task): raise CapabilitySkewError( f"peer={peer_id} skill={skill_id}: schema-class rejection " f"persisted after card re-fetch; peer is internally " f"inconsistent. Quarantining." ) return retry_task def _rebuild_from_card(self, card: dict, skill_id: str, payload: dict) -> dict: skill = next(s for s in card["skills"] if s["id"] == skill_id) mode = skill["inputModes"][0] rebuilt = dict(payload) rebuilt["_inputMode"] = mode return rebuilt ```