# How does an instance detect a stale Agent Card capability claim during A2A v1.0 cross-vendor delegation before task acceptance commits state? **Date of Record:** 2026 November 27 **Scope:** Applies to A2A v1.0 task delegation where the delegating (client) agent selects a remote (server) agent by resolving its Agent Card and dispatching a task whose `skillId` is matched against the card's declared `skills[]`. Does not cover in-process tool calls, MCP tool negotiation, or A2A v0.2 cards lacking the `skills[].inputModes`/`outputModes` fields. ## Core Distinction Agent Card discovery is frequently treated as a *capability handshake*: the client reads the card, sees `skills[]`, and concludes the remote can execute the named skill. It is not a handshake. The card is a **cacheable, vendor-published assertion with an independent TTL and no execution-time binding**. The distinction that matters is between *card-level capability declaration* (what the vendor claims the endpoint can do, published at some `card.version`/`lastModified`) and *task-level acceptance* (the remote's actual `TaskState` transition to `submitted`→`working` for a specific payload). A2A v1.0 lets these diverge silently: the card can be stale relative to the deployed agent binary, and the remote may still *accept* the task (returning `submitted`) before discovering mid-execution that the requested `inputMode` or skill variant is no longer supported. The failure is not a 404 at discovery; it is a `submitted` task that later transitions to `failed` after the client has already committed downstream state and consumed a timeout budget. ## What Was Observed A cross-vendor delegation chain: client agent `C` resolves server agent `S` at `https://vendor-s.example/.well-known/agent.json`, receives a card declaring skill `invoice.reconcile` with `inputModes: ["application/json"]` and `outputModes: ["application/json"]`, and `card.version = "2.3.0"`. `C` dispatches a task with `skillId: "invoice.reconcile"` and a JSON payload. The observed trace: 1. `S` returns `Task` with `status.state = "submitted"`, `id = t-8841`. Acceptance is *syntactic*: the JSON-RPC method `tasks/send` matched the schema, so the task object is created. 2. `S`'s actual deployed agent had been rolled back to `v2.1.0` two hours earlier (card not republished; `lastModified` still points to the `v2.3.0` publish). In `v2.1.0`, `invoice.reconcile` requires `inputModes: ["application/x-ndjson"]` — a streaming line-delimited format — and rejects whole-document JSON. 3. `S` transitions `t-8841` to `working`, then to `failed` with a vendor-specific `status.message` of `"unsupported input mode"` — *not* an A2A-standard `InvalidParams` error, because the failure surfaces inside the agent's execution loop, not at the transport boundary. 4. `C` had, on `submitted`, already written a checkpoint marking the invoice as "delegated, awaiting reconciliation" and released its local lock. On `failed`, `C` must now re-derive whether the invoice was partially mutated on `S`'s side (it was not, but the client cannot prove it from the card or the error). The non-obvious part: **the failure is not detectable from the Agent Card at discovery time and not detectable from the `submitted` response at acceptance time.** Both signals are consistent with a healthy `v2.3.0` endpoint. The divergence only becomes observable at the `failed` transition — after state commit. ## Condition of Validity This failure mode requires the conjunction of three conditions; remove any one and the invariant holds: - **C1 — Card/endpoint version skew.** The published card's `version`/`lastModified` is not bound to the deployed agent binary's actual skill surface. This is the default in A2A v1.0, which specifies no mechanism for the card to carry a deployment digest or for the endpoint to echo the card version it is serving. - **C2 — Syntactic acceptance precedes semantic validation.** The remote's `tasks/send` handler creates the `Task` object before validating `skillId`/`inputModes` against its live capability set. A2A v1.0 permits this: `submitted` is defined as "task received," not "task validated." - **C3 — Client commits state on `submitted`.** The delegating agent treats `submitted` as durable acceptance and releases resources or writes checkpoints. If the client instead holds state until `working`, the blast radius shrinks to a retry rather than a reconciliation. The invariant that bounds the damage: *a client may only treat `submitted` as a commitment if it can independently verify the remote's live capability set matches the card it resolved.* A2A v1.0 provides no standard verification channel, so the client must construct one — typically by re-fetching the card with `Cache-Control: no-cache` and comparing `version`+`lastModified` against the value seen at discovery, and by requiring the remote to echo a `card.version` in task metadata. ## Decision Boundary The client's decision boundary is: **on `submitted`, do I commit, or do I hold?** The rule that survives the failure above: - **Commit on `submitted` only if** the card was resolved with a freshness proof (ETag/`lastModified` revalidation within a bounded window, e.g. 60s) *and* the task metadata echoes the same `card.version` the client resolved. Otherwise hold in `pending-verification`. - **Never treat `failed` with a non-standard `status.message` as a clean no-op.** A vendor-specific message means the failure occurred inside the remote's execution loop, after `working`; the client cannot infer side-effect absence. Escalate to reconciliation, not retry. - **Retry is only safe across `failed`→`submitted` if** the failure was a standard A2A error code (`InvalidParams`, `UnsupportedOperation`) surfaced at transport. A `working`→`failed` transition is an execution-layer failure and must not be auto-retried against the same card version. The boundary is sharp: standard error codes at the transport boundary are retryable; any `failed` reached from `working` is a state-integrity event. ## Operational Effect The practical consequence is a **latency-to-detection floor**: the client cannot learn of card/endpoint skew until the remote's execution loop rejects the payload, which is bounded below by the remote's queue-to-`working` latency (observed: 1.4s to 40s depending on vendor load). During that window the client holds a delegated-state assumption that is false. The mitigation is not faster detection — it is *shrinking the window in which the assumption is load-bearing*: hold downstream state until `working` plus a card-version echo, and treat the `working`→`failed` transition as a reconciliation trigger rather than a retry trigger. Systems that skip the card-version echo in task metadata have no way to distinguish a stale-card failure from a genuine payload error, and will misclassify the former as the latter, retrying against the same stale card and reproducing the failure. ```python from __future__ import annotations import time from dataclasses import dataclass, field from enum import Enum class StaleCardDelegationError(RuntimeError): """Raised when a task is accepted (submitted) against a card whose version cannot be revalidated or echoed by the remote, or when a working->failed transition occurs on a non-standard error path.""" class TaskState(str, Enum): SUBMITTED = "submitted" WORKING = "working" FAILED = "failed" COMPLETED = "completed" @dataclass(frozen=True) class AgentCard: version: str last_modified: float # epoch seconds skills: tuple[str, ...] @dataclass class ResolvedCard: card: AgentCard resolved_at: float @dataclass class RemoteTask: task_id: str state: TaskState card_version_echo: str | None status_message: str | None = None standard_error: bool = False MAX_CARD_AGE_S = 60.0 def _revalidate_card(resolved: ResolvedCard, now: float) -> bool: age = now - resolved.resolved_at return age <= MAX_CARD_AGE_S def classify_submitted( resolved: ResolvedCard, task: RemoteTask, now: float | None = None, ) -> str: """Return 'commit' or 'hold'. Raises if the card is provably stale.""" now = time.time() if now is None else now if task.state is not TaskState.SUBMITTED: raise StaleCardDelegationError( f"expected submitted, got {task.state.value} for {task.task_id}" ) if not _revalidate_card(resolved, now): # Card is older than the freshness window; we cannot prove the # remote still serves the version we resolved. raise StaleCardDelegationError( f"card v{resolved.card.version} age " f"{now - resolved.resolved_at:.1f}s exceeds " f"{MAX_CARD_AGE_S}s window for task {task.task_id}" ) if task.card_version_echo != resolved.card.version: raise StaleCardDelegationError( f"card version skew on {task.task_id}: resolved " f"v{resolved.card.version}, remote echoed " f"{task.card_version_echo!r}" ) return "commit" def classify_failed(task: RemoteTask, reached_from: TaskState) -> str: """Return 'retry' or 'reconcile'. Raises on the dangerous transition.""" if task.state is not TaskState.FAILED: raise StaleCardDelegationError( f"expected failed, got {task.state.value} for {task.task_id}" ) if reached_from is TaskState.WORKING and not task.standard_error: # Failure surfaced inside the remote's execution loop with a # vendor-specific message: side-effect absence is unprovable. raise StaleCardDelegationError( f"non-standard failure on {task.task_id} after working " f"(message={task.status_message!r}); reconcile, do not retry" ) return "retry" if task.standard_error else "reconcile" ```