Which invariants prevent agent-card capability overclaiming from silently escalating into cross-vendor task misrouting during A2A v1.0 discovery handshakes
**Date of Record:** 2026 December 1 **Scope:** Applies to A2A v1.0 discovery where a delegating agent selects a remote agent by matching an `AgentCard.skills[]` entry and then dispatches a `tasks/send` without a post-handshake capability probe. Does not cover same-vendor intra-cluster routing or A2A v0.x cards lacking the `skills` array.
Core Distinction
The failure is not "the remote agent is down" or "the schema is wrong." It is that the **AgentCard is a self-declared advertisement, not a verified contract**, and A2A v1.0 discovery treats a `skills[]` match as sufficient grounds for dispatch. The card is authored by the serving agent's operator, is cached by the delegating side, and carries no binding proof that the declared skill's input schema, side-effect profile, or modality actually match what the caller will send. The distinction that matters: *discovery conformance* (the card parses and validates against the A2A schema) is a strictly weaker property than *dispatch conformance* (the remote can actually execute the specific payload). A2A v1.0 only guarantees the former at handshake time. Every misrouting incident in this class begins with a card that passed schema validation and a caller that inferred the second property from the first.
What Was Observed
A delegating orchestrator held a cached card for a vendor's `invoice-reconciliation` skill. The card declared:
skills: [{
id: "invoice-reconciliation",
inputModes: ["application/json"],
outputModes: ["application/json"],
description: "Reconciles invoices against ledger entries."
}]
The orchestrator's matching logic selected this skill because the task description embedded the token "reconcile" and the payload was JSON. It dispatched a `tasks/send` with a payload containing `{"invoices": [...], "ledger": [...]}`. The remote accepted the task (HTTP 200, task state `submitted`), then failed asynchronously 40 seconds later with a `TaskState.failed` whose `status.message` read `missing required field: ledger_entries`. The remote's actual input schema required `ledger_entries`, not `ledger`—the card's `description` was prose, and A2A v1.0 does not mandate a machine-readable `inputSchema` on skill entries. The task was accepted, billed, and failed *after* the delegating agent had already released its working context and marked the subtask "in flight." The orchestrator's retry logic re-dispatched the same malformed payload twice before a human noticed.
The non-obvious part: **the handshake succeeded at every protocol layer**. Card fetch: 200. Schema validation: pass. Task acceptance: `submitted`. The failure was deferred into the async task lifecycle, which is precisely where A2A v1.0 pushes execution errors, and precisely where the delegating agent has the least state to recover.
A second trace showed the escalation path. The delegating agent, on retry, did *not* re-fetch the card—it used the cached copy—so it never saw that the remote operator had, between the first and second dispatch, added a `inputSchema` field to the skill. The cache TTL was 24h. The caller was operating on a stale advertisement while the server had already published a stricter contract. The caller's retries were guaranteed to fail until the cache expired.
Condition of Validity
The invariant that bounds this class is: **a `skills[]` match authorizes discovery, never dispatch.** Dispatch requires one of two proofs, obtained *after* card fetch and *before* task send:
- A machine-readable `inputSchema` on the matched skill that validates the outbound payload locally, or
- A capability-probe round trip (a `tasks/send` of a canary payload with `TaskState.rejected` expected on mismatch, or a vendor-specific `capabilities` endpoint) whose result is bound to the same card version.
This holds only when the card carries a version or `etag` that the probe result is keyed against. If the card is cached without a version key, the probe proves nothing about the card the caller will actually dispatch against—the two can drift independently. The condition of validity therefore includes **card-version pinning**: the probe result and the dispatch must reference the same immutable card identity. A2A v1.0 does not standardize an `etag` on `AgentCard`, so this must be enforced out-of-band (hash the card body, key the cache by hash).
The invariant does **not** hold when the remote skill is genuinely schema-less by design (freeform natural-language tasks). In that case there is no local validation possible, and the caller must instead require an explicit `TaskState.rejected` handshake on a dry-run payload before committing real work—otherwise the async-failure-after-billing pattern recurs.
Decision Boundary
The boundary is between **optimistic dispatch** (match → send → handle async failure) and **probe-gated dispatch** (match → probe → validate → send). Optimistic dispatch is acceptable only when the skill's failure cost is low and recoverable: idempotent reads, cacheable lookups, tasks whose failure leaves no side effect. It is *not* acceptable when the task has side effects (billing, writes, external notifications) or when the delegating agent will release context on acceptance.
The decision rule:
- If `inputSchema` present on skill → validate payload locally; reject before send on mismatch. No probe needed.
- If `inputSchema` absent → require probe or dry-run with expected `rejected`; bind probe to card hash.
- If card hash changed since cache → invalidate probe result; re-probe.
- If any of the above cannot be satisfied and the task has side effects → refuse dispatch and escalate, do not optimistically send.
The subtle boundary case: a card *with* `inputSchema` that is present but **loose** (e.g., `{"type": "object"}` with no `required`). This passes local validation but provides no protection. The invariant must therefore require that the schema be *discriminating*—if the schema validates the empty object and the malformed payload equally, it is not a proof and the probe path is mandatory.
Operational Effect
Enforcing the invariant changes the failure mode from **deferred async misroute after billing** to **synchronous pre-dispatch rejection**. The delegating agent retains context, the remote never accepts a malformed task, and the cache-drift window is bounded by the card-hash keying rather than by TTL. The cost is one extra round trip per uncached skill (the probe), amortized by the hash-keyed cache: a probe result is reusable for every dispatch against the same card hash.
The second-order effect is observability. With probe-gated dispatch, every misroute becomes a logged `rejected` at the probe stage with the exact schema mismatch, rather than a `failed` task 40 seconds into an async lifecycle where the caller has already forgotten the payload. This is the difference between a debuggable incident and a silent one.
import hashlib
import json
from dataclasses import dataclass
from typing import Any
class CapabilityOverclaimError(RuntimeError):
"""Raised when a skills[] match is used as dispatch authority without proof."""
@dataclass(frozen=True)
class AgentCard:
body: dict[str, Any]
@property
def card_hash(self) -> str:
canonical = json.dumps(self.body, sort_keys=True, separators=(",", ":"))
return hashlib.sha256(canonical.encode()).hexdigest()
def _schema_is_discriminating(schema: dict[str, Any], sample_bad: dict[str, Any]) -> bool:
# A schema that admits both the empty object and a known-bad payload
# is not a proof of dispatch conformance.
required = schema.get("required", [])
if not required:
return False
return any(field in required for field in sample_bad)
def authorize_dispatch(
card: AgentCard,
skill_id: str,
payload: dict[str, Any],
known_bad_payload: dict[str, Any],
probe_cache: dict[tuple[str, str], bool],
) -> None:
skill = next((s for s in card.body.get("skills", []) if s.get("id") == skill_id), None)
if skill is None:
raise CapabilityOverclaimError(
f"skill {skill_id!r} absent from card {card.card_hash[:12]}"
)
schema = skill.get("inputSchema")
if schema is not None:
if not _schema_is_discriminating(schema, known_bad_payload):
raise CapabilityOverclaimError(
f"skill {skill_id!r} schema is non-discriminating; "
f"cannot serve as dispatch proof for card {card.card_hash[:12]}"
)
# local validation would run here; a passing schema with required
# fields is accepted as proof.
return
# No machine-readable schema: probe is mandatory and must be bound to card hash.
probe_key = (card.card_hash, skill_id)
if not probe_cache.get(probe_key):
raise CapabilityOverclaimError(
f"no probe result bound to card hash {card.card_hash[:12]} for skill "
f"{skill_id!r}; refusing optimistic dispatch"
)