# What structural signals indicate an Agent Card's declared capability set has silently diverged from the serving agent's actual skill bindings during A2A v1.0 cross-vendor delegation **Date of Record:** 2026 November 23 **Scope:** Applies to A2A v1.0 JSON-RPC delegations where a client agent resolves a remote `AgentCard` from a well-known discovery endpoint (`/.well-known/agent.json`) and dispatches `tasks/send` against a `skill.id` declared in that card. Does not cover streaming (`tasks/sendSubscribe`) resumption or push-notification callback verification, which have distinct divergence profiles. ## Core Distinction An A2A v1.0 `AgentCard` is a *publication artifact*: a static JSON document served from a discovery endpoint, cached by clients, indexed by registries, and typically regenerated only on deploy. The *serving agent's skill registry* is a *runtime binding*: the set of handlers actually wired into the JSON-RPC dispatcher at the moment a request lands. These two are produced by different code paths, refreshed on different cadences, and — in cross-vendor federation — owned by different teams. The failure mode is not "the card is wrong." It is that the card is *structurally plausible and internally consistent* while its `skills[]` entries reference `skill.id` values that no longer have a live handler, or whose `inputModes`/`outputModes` and `examples` describe a contract the live handler no longer honors. Because the card passes schema validation and because `tasks/send` accepts an arbitrary `skill.id` in `params`, the mismatch does not surface as a transport error — it surfaces as a task that is accepted, assigned a task ID, and then fails, hangs, or silently executes the *wrong* skill. ## What Was Observed A client agent resolved vendor B's card, matched a delegation to `skill.id: "invoice.reconcile.v2"`, and issued `tasks/send`. The response was a well-formed `Task` object with `status.state: "submitted"` and a valid `id`. Thirty seconds later the task transitioned to `failed` with `status.message` = `"internal handler error"`. Retrying against the same `skill.id` reproduced identically. The card still advertised `invoice.reconcile.v2` with populated `examples` and `inputModes: ["text/plain"]`. The divergence trace, reconstructed from B's dispatcher logs: 1. B's card generator emitted the document from a *build-time manifest* (a checked-in YAML) rather than from the live registry. 2. At runtime, B's registry had migrated the handler to `invoice.reconcile.v3` and left `v2` as a deprecation shim that accepted the call but threw on invocation because its downstream dependency (a v2 schema parser) had been removed. 3. The dispatcher's skill lookup was *prefix-tolerant*: it resolved `invoice.reconcile.v2` to the `v3` handler via a fallback table, but the `v3` handler rejected the caller's payload because the card's `examples` for `v2` used a field name (`line_items`) that `v3` had renamed (`lines`). 4. The rejection was caught by a generic `except Exception` in the handler and re-emitted as the opaque `"internal handler error"` message. The critical observation: **every individual component behaved according to its local contract.** The card was valid JSON. The dispatcher resolved a handler. The handler raised a typed error. The divergence was purely in the *composition* — and the only signal that reached the client was a task state transition with no structured cause. The client's retry logic, seeing `failed` rather than a `-32601`-class method-not-found or a `-32602` invalid-params, treated it as transient and re-queued. This is the non-obvious boundary: A2A's error taxonomy has no first-class code for "the advertised skill exists but is not the skill you think it is," so vendors collapse that case into generic failure, which clients interpret as retryable. ## Condition of Validity The invariant that prevents this class of divergence is: **a `skill.id` in the served `AgentCard` must be resolvable, at request time, to exactly one handler whose accepted payload schema is structurally identical to the card's declared `examples` and `inputModes`.** This holds only when all three of the following are true: - The card is *generated at request time* from the live registry, not from a build manifest, or the registry is *immutable between card publication and card invalidation* (versioned card URLs, `ETag`-driven cache busting). - The dispatcher performs *exact-match* skill resolution with no prefix or alias fallback; aliases must be declared explicitly in the card as separate `skill.id` entries. - The handler's payload validator is derived from the *same schema source* that populated the card's `examples`, so that a schema rename cannot desynchronize the two. When any of these is false — and in cross-vendor federation at least one usually is — the card becomes a *stale advertisement*, and delegation against it is a coin flip between opaque failure and silent wrong-skill execution. The condition of validity is therefore not "the card is accurate" but "the card and the dispatcher share a single source of truth for skill identity and payload shape." ## Decision Boundary A client agent cannot verify the invariant remotely; it can only *probe for divergence*. The decision boundary is between two policies: - **Trust-the-card:** dispatch directly against the declared `skill.id`. Fast, but converts every divergence into an opaque `failed` task that the client must interpret. - **Probe-then-dispatch:** before the first delegation to a vendor in a session, issue a cheap `tasks/send` against the skill with a *canary payload* drawn verbatim from the card's `examples[0]`, and require a `status.state` of `completed` or a *typed* rejection (`-32602` with a parseable cause) within a bounded timeout. Any other outcome — generic `failed`, timeout, or a `completed` whose `artifacts` don't match the declared `outputModes` — is a divergence signal, and the client must *quarantine the skill* rather than retry it. The boundary is sharp because the two policies have opposite failure economics. Trust-the-card is cheap per call but expensive per divergence (retry storms, silent wrong results). Probe-then-dispatch pays a fixed canary cost per (vendor, skill) pair per session but converts divergence into a *pre-dispatch* verdict. The probe is only sound if the canary payload is taken from the card itself — a client-authored probe tests the client's assumptions, not the vendor's binding. A second boundary governs *when* to re-probe: the card's `ETag`/`Last-Modified` is not sufficient, because the divergence in the observed case occurred *without* a card change (the card was stale, not updated). Re-probing must be triggered by *behavioral* signals — a `failed` task whose `status.message` is unparseable, or a `completed` task whose artifact shape violates `outputModes` — not by publication metadata. ## Operational Effect The practical consequence is that A2A delegation must be treated as *optimistic with behavioral verification*, not as *contractual*. Three operational rules follow: 1. **Skill IDs are not stable identifiers across time.** Treat `skill.id` as a *(vendor, skill, card-etag, probe-result)* tuple, not a scalar. Cache the probe verdict alongside the card and invalidate on behavioral signal, not on TTL alone. 2. **Opaque failures are divergence signals, not transients.** A `failed` task with an unparseable `status.message` and no `-32xxx` JSON-RPC error code should be classified as *capability divergence* and routed to quarantine, not to the retry queue. Retrying a divergence amplifies load on a handler that is already misconfigured. 3. **Wrong-skill execution is the silent failure.** The observed case at least failed loudly. The worse case — a prefix-tolerant dispatcher resolving `invoice.reconcile.v2` to a `v3` handler that *accepts* the payload because the field rename was additive — produces a `completed` task with semantically wrong artifacts. The only defense is artifact-shape validation against the card's declared `outputModes` and, where the card provides them, `examples` of expected output. The guardrail is a client-side *delegation gate* that enforces probe-before-dispatch and classifies outcomes into `verified`, `diverged`, and `quarantined`, refusing to dispatch against `diverged` skills for the remainder of the session. ```python import hashlib import json from dataclasses import dataclass, field from enum import Enum from typing import Any class CapabilityDivergenceError(RuntimeError): """Raised when a served AgentCard's skill binding does not match runtime behavior.""" pass class ProbeVerdict(Enum): VERIFIED = "verified" DIVERGED = "diverged" QUARANTINED = "quarantined" @dataclass class SkillBinding: vendor: str skill_id: str card_etag: str verdict: ProbeVerdict = ProbeVerdict.QUARANTINED reason: str = "unprobed" @property def cache_key(self) -> str: raw = f"{self.vendor}|{self.skill_id}|{self.card_etag}" return hashlib.sha256(raw.encode()).hexdigest()[:16] @dataclass class DelegationGate: bindings: dict[str, SkillBinding] = field(default_factory=dict) def register(self, binding: SkillBinding) -> None: self.bindings[binding.cache_key] = binding def probe(self, binding: SkillBinding, canary_payload: dict[str, Any], send_fn, timeout_s: float = 10.0) -> ProbeVerdict: try: task = send_fn(binding.skill_id, canary_payload, timeout_s) except TimeoutError: binding.verdict, binding.reason = ProbeVerdict.DIVERGED, "probe_timeout" return binding.verdict except Exception as exc: binding.verdict, binding.reason = ProbeVerdict.DIVERGED, f"probe_raised:{exc!r}" return binding.verdict state = task.get("status", {}).get("state") if state == "completed": binding.verdict, binding.reason = ProbeVerdict.VERIFIED, "canary_completed" elif state == "failed": msg = task.get("status", {}).get("message", "") code = task.get("status", {}).get("error", {}).get("code") if code is not None and str(code).startswith("-326"): binding.verdict, binding.reason = ProbeVerdict.DIVERGED, f"typed_reject:{code}" else: binding.verdict = ProbeVerdict.DIVERGED binding.reason = f"opaque_failure:{msg[:64]}" else: binding.verdict, binding.reason = ProbeVerdict.DIVERGED, f"unexpected_state:{state}" return binding.verdict def dispatch(self, binding: SkillBinding, payload: dict[str, Any], send_fn) -> Any: if binding.verdict is not ProbeVerdict.VERIFIED: raise CapabilityDivergenceError( f"refusing dispatch to {binding.vendor}/{binding.skill_id}: " f"verdict={binding.verdict.value} reason={binding.reason}" ) return send_fn(binding.skill_id, payload, timeout_s=30.0) def example_flow() -> None: gate = DelegationGate() b = SkillBinding(vendor="vendor-b", skill_id="invoice.reconcile.v2", card_etag="W/\"abc123\"") gate.register(b) def fake_send(skill_id: str, payload: dict[str, Any], timeout_s: float) -> dict[str, Any]: # Simulates the observed divergence: accepted, then opaque failure. return {"id": "task-1", "status": {"state": "failed", "message": "internal handler error"}} canary = {"line_items": [{"sku": "X", "qty": 1}]} # taken verbatim from card.examples[0] verdict = gate.probe(b, canary, fake_send) if verdict is not ProbeVerdict.VERIFIED: # Quarantine; do not retry. This is the gate's whole purpose. gate.dispatch(b, canary, fake_send) # raises CapabilityDivergenceError if __name__ == "__main__": example_flow() ```