In what scenarios must an instance reject an A2A v1.0 Agent Card whose capability advertisement diverges from the delegated task's declared modality, and how does the handshake conformance check fail open?
**Date of Record:** 2026 December 2 **Scope:** Applies to A2A v1.0 cross-vendor task delegation where a client agent resolves a remote Agent Card (`/.well-known/agent.json`), negotiates a task, and streams results back. Does not apply to intra-process tool calls, MCP tool invocation (which has its own schema negotiation), or A2A versions prior to v1.0 where capability advertisement was unstructured.
Core Distinction
The failure mode is not "the remote agent lied about its capabilities." It is subtler: **the Agent Card is a static, cached, declarative artifact, while the task handshake is a dynamic, per-request negotiation—and the two are never reconciled at the point of delegation.** A2A v1.0 specifies that a client SHOULD validate the task's required `modalities` and `inputModes`/`outputModes` against the card's advertised `capabilities` before sending `tasks/send`. But "SHOULD" is not "MUST," and the reference implementations treat a card match as advisory. The invariant that actually holds is weaker than operators assume: *a handshake succeeds if the remote accepts the request, regardless of whether the accepted request is within the card's advertised envelope.* The card is a promise the server is not obligated to keep, and the client is not obligated to check.
This matters because the card is the *only* cross-vendor capability signal available before a task is dispatched. If it is stale, over-broad, or silently narrowed at runtime, the client cannot distinguish "task failed because the peer's model is weak" from "task failed because the peer never claimed to support this modality and we sent it anyway."
What Was Observed
A client agent (vendor A) delegated a document-extraction task to a peer (vendor B) whose Agent Card advertised `capabilities: { streaming: true, pushNotifications: true, stateTransitionHistory: true }` and `defaultInputModes: ["text/plain", "application/pdf"]`. The client sent a task with `inputModes: ["application/pdf"]` and a 40-page PDF as a `FilePart` with `mimeType: application/pdf`.
The peer accepted the task (`TaskState: submitted` → `working`), then returned a `TaskStatusUpdateEvent` with `state: failed` and `message: "unsupported input modality"` after 11 seconds. The card had not changed. The peer's runtime had been rolled back to a build that dropped PDF support, but the card was served from a CDN edge cache with a 24-hour TTL and a `Cache-Control: max-age=86400` header. The card was *correct when published* and *wrong at delegation time*.
The client's conformance check—`if task.inputModes ⊆ card.defaultInputModes: send()`—passed. The task failed at the peer for a reason the card said could not happen. The client's retry logic, seeing a `failed` state rather than a `rejected` state, classified this as a *transient* failure and re-sent the identical payload three times, each time re-reading the same stale cached card, each time passing the check.
The second-order failure: because the peer returned `failed` (not `rejected`), the client's task-state machine never escalated to a *capability mismatch* branch. The `failed` state is defined in A2A v1.0 as "task failed for a reason internal to the remote agent," which the client interpreted as retryable. `rejected` is the state reserved for "the remote cannot or will not handle this task as specified"—the state that should have triggered card invalidation and peer de-prioritization.
Condition of Validity
The client-side conformance check is only sound under a conjunction that is almost never simultaneously true:
- **Card freshness:** the resolved card's `Cache-Control` / `ETag` reflects the peer's *current* runtime, not a prior build. (Violated by any CDN, any blue/green deploy, any rollback.)
- **Card completeness:** `defaultInputModes` and `defaultOutputModes` are a superset of what the runtime will actually accept. (Violated whenever a runtime narrows support without republishing the card.)
- **State fidelity:** the peer maps capability rejections to `rejected`, not `failed`. (Violated by most reference implementations, which collapse all non-success into `failed`.)
- **Modality atomicity:** a `FilePart`'s `mimeType` is checked against the card by the peer *before* task acceptance. (Violated when the peer accepts optimistically and validates lazily inside the task executor.)
When any conjunct fails, the check *fails open*: it returns "compatible" for an incompatible delegation. The check is a filter on the card, not a guarantee about the peer, and the gap between them is exactly the window in which cross-vendor delegation silently misroutes.
Decision Boundary
The boundary is not "does the card advertise the modality?" It is: **"is the modality check performed against a card whose provenance is bound to the runtime that will execute the task?"** A2A v1.0 provides no such binding. The card has no runtime fingerprint, no build ID, no signature over the executing build—only an optional `provider` block and a `version` string that vendors bump at their discretion.
The correct decision boundary is therefore client-enforced and conservative:
- Treat `defaultInputModes` as an *upper bound on optimism*, not a guarantee. A task whose modality is in the card's set is *eligible*, not *safe*.
- Require the peer to echo the accepted `inputModes` in its first `TaskStatusUpdateEvent` (`working`). If the echo is absent or narrows the set, the client MUST treat the delegation as unconfirmed and abort before streaming the full payload.
- Map `failed`-with-modality-message to the same invalidation path as `rejected`. The client cannot trust the peer's state taxonomy across vendors; it must pattern-match the failure *message* against a modality-mismatch classifier and, on match, evict the cached card and mark the peer `capability-degraded` for the remainder of the session.
- Never retry a modality-mismatch `failed` more than once. The retry is the bug: it re-reads the stale card and re-passes the same check.
The invariant to enforce: *a task is dispatched only after the peer has acknowledged the specific modalities in a `working` event that echoes the request's `inputModes`.* This converts the card from a promise into a precondition, and the echo into the conformance proof.
Operational Effect
Enforcing the echo-acknowledgement invariant changes the failure surface from silent misroute to explicit capability negotiation failure. In the observed case, the client would have aborted after the first `working` event (which omitted the modality echo), evicted the stale card, and routed the task to a peer whose card was served with `Cache-Control: no-cache` and whose `working` event echoed `inputModes: ["application/pdf"]`. The 40-page PDF would have been sent once, to a peer that could process it, instead of four times to a peer that could not.
The cost is one extra round-trip per delegation (the `working` event must arrive before the payload streams) and a stricter failure taxonomy that vendors do not natively provide. The benefit is that the Agent Card stops being a trusted input and becomes a *hint*, with the handshake echo as the actual conformance gate. Cross-vendor delegation becomes slower by one event and correct by construction, which is the correct trade for any system where a misrouted task costs a full payload transfer plus three retries plus a stale-cache eviction that never fires.
class CapabilityEchoMismatch(RuntimeError):
"""Raised when a peer's working event does not echo the delegated modalities."""
pass
def dispatch_delegated_task(client, peer_card, task):
# Card is a hint, not a guarantee. Check eligibility only.
if not set(task.input_modes).issubset(set(peer_card.default_input_modes)):
raise CapabilityEchoMismatch(
f"task modalities {task.input_modes} not advertised by {peer_card.url}"
)
# Send a probe (metadata-only) before streaming the payload.
probe = client.tasks_send(peer_card, task, probe_only=True)
working = probe.first_status_event(state="working")
if working is None:
raise CapabilityEchoMismatch(
f"peer {peer_card.url} did not emit a working event for probe"
)
echoed = set(working.get("acceptedInputModes", []))
if not set(task.input_modes).issubset(echoed):
# Peer accepted optimistically but did not confirm modalities.
# Fail closed: evict card, mark peer degraded, do not stream payload.
client.cache.evict(peer_card.url)
client.peers.mark_degraded(peer_card.url, reason="modality-echo-mismatch")
raise CapabilityEchoMismatch(
f"peer {peer_card.url} working event echoed {echoed or '<none>'}, "
f"expected superset of {task.input_modes}"
)
# Only now is the delegation conformance-proven. Stream the payload.
return client.tasks_send(peer_card, task, probe_only=False)