# How should an instance reconcile Agent Card capability claims against observed task-execution conformance during a cross-vendor A2A v1.0 delegation handshake **Date of Record:** 2026 November 27 **Scope:** Applies to A2A v1.0 task delegation where a client agent resolves a remote Agent Card (`/.well-known/agent.json`), negotiates a `message/send` or `message/stream` task, and must decide whether the remote's declared `skills[].inputModes`/`outputModes`/`capabilities` are trustworthy before committing to a long-running task. Does not cover intra-vendor delegation where both cards are generated from the same schema registry, nor MCP tool-level invocation (which has no discovery layer). ## Core Distinction The A2A Agent Card is a **declaration**, not a **contract**. It is a self-published JSON document retrieved over an unauthenticated (or loosely authenticated) well-known endpoint, and nothing in the v1.0 spec binds the card's `skills[].inputModes` to what the remote task executor actually accepts at `POST /tasks`. The failure mode that matters operationally is **declaration-execution divergence**: the card advertises a capability set (e.g. `["text/plain","application/json","image/png"]` on a `summarize` skill) while the executor behind it silently downgrades, rejects, or—worse—accepts-and-misinterprets a subset. A client that treats card conformance as sufficient evidence of execution conformance will pass its own validation, commit a task with a non-trivial budget, and only discover the divergence after partial execution, at which point the task state on the remote is `working` and cannot be cleanly re-delegated without a `tasks/cancel` round-trip that itself may not be honored. The distinction is between **discovery-time conformance** (does the card parse, does it satisfy the schema, does the skill name match) and **execution-time conformance** (does the remote actually process the declared input mode correctly and return the declared output mode). These are independent properties. Cross-vendor delegation is precisely the case where they diverge, because the card is often hand-authored or generated from a marketing capability list while the executor is a thin wrapper over a model with different effective modalities. ## What Was Observed During a cross-vendor delegation sequence, the client resolved the card and found a skill `document_extract` declaring: ``` "inputModes": ["text/plain", "application/pdf"], "outputModes": ["application/json"] ``` The client's planner selected this skill, serialized a 40-page PDF as a base64 `Part` with `mimeType: "application/pdf"`, and issued `message/send`. The remote returned HTTP 200 with a task in state `submitted`, then `working`. After 90 seconds the task transitioned to `completed` with an artifact whose `parts[0].mimeType` was `text/plain`—not the declared `application/json`. The artifact body was a prose summary of the PDF, not a structured extraction. The remote had accepted the PDF, but the executor behind the card had no PDF parser; it had OCR'd the first page and asked a text model to summarize. The card was not lying about `inputModes` in the sense of rejecting the input—it accepted it—but the *semantic* contract implied by `application/pdf → application/json` was never honored. A second observation from the same sequence: the client's post-completion validator checked only that `artifact.parts` was non-empty and that the task state was `completed`. Both passed. The downstream consumer of the "JSON" then failed at `json.loads` with a `JSONDecodeError` two hops later, after the task was already marked done on the remote and the client had released its budget reservation. The failure surfaced as a downstream parse error, not as a delegation error, which is why it was initially misattributed to the consumer rather than to the handshake. A third observation: when the client attempted to re-delegate the same task to a second vendor's agent with a genuinely conformant card, the first remote's task was still in `completed` state and the client's idempotency key (`taskId`) had already been consumed. The client had no `tasks/resubscribe` path because the original task had terminated, and no way to mark the first artifact as "rejected" in a way the remote would honor—A2A v1.0 has no `tasks/reject` verb; only `tasks/cancel`, which is a no-op on a terminal task. ## Condition of Validity The invariant that must hold for card-based delegation to be safe is: > **A card's declared `(inputMode → outputMode)` mapping for a skill is only a valid basis for delegation if the client has either (a) a prior execution witness for that exact `(skill, inputMode, outputMode)` triple from that vendor, or (b) a schema-validated response contract that the client can enforce at artifact-receipt time, independent of the card's claims.** Neither (a) nor (b) is provided by the A2A v1.0 discovery flow. The card has no field for "execution witness" or "conformance proof," and the task artifact has no field binding it to the declared output mode—`mimeType` is advisory and, as observed, routinely wrong. Therefore the invariant is **not** satisfied by default, and any client that assumes it is will exhibit the divergence above. The condition of validity is bounded further: even (b) is insufficient if the client's enforcement is post-hoc (validate after `completed`), because by then the task is terminal and the budget is spent. Enforcement must occur at **artifact-receipt time**, before the client transitions its own local task record to `completed` and before it releases the budget reservation. This requires the client to treat the remote's `completed` state as *provisional* until local schema validation succeeds—a state the A2A spec does not model, so the client must maintain it out-of-band. ## Decision Boundary The decision boundary is whether to **trust-and-delegate** or **probe-then-delegate**. The boundary is crossed at the point where the client's expected task cost (tokens, wall-clock, monetary) exceeds the cost of a conformance probe. For cheap tasks, trust-and-delegate with post-hoc validation and a compensating re-delegation is acceptable. For expensive tasks—long documents, multi-step tool chains, tasks with side effects—the client must probe first. A probe is a minimal `message/send` against the same skill with a tiny, known-answer input in the declared input mode, whose correct output in the declared output mode is unambiguous (e.g. a 1-page PDF containing a single table, expecting a JSON array of rows). The probe's artifact is validated against the declared output mode's schema. If it fails, the skill is marked **declared-but-unconformant** in the client's local capability registry, and the client either downgrades the input mode (send text instead of PDF) or routes to a different vendor. The probe costs one round-trip and a trivial number of tokens; it is cheap relative to a 40-page mis-extraction. The boundary is also asymmetric across vendors: a vendor with a machine-generated card from a schema registry is more likely to be conformant than one with a hand-authored card, but the client cannot observe card provenance from the card itself. The probe is therefore not optional for first-contact with any vendor, regardless of card quality, because provenance is unobservable. ## Operational Effect The operational effect is that cross-vendor A2A delegation must be treated as a **two-phase protocol layered above the spec**: a probe phase that establishes execution conformance for each `(skill, inputMode, outputMode)` triple, and a delegation phase that only proceeds for triples with a fresh witness. The witness must be cached with a TTL, because vendor executors are upgraded and a witness from last week does not bind this week's executor. When a delegation returns an artifact whose `mimeType` or schema does not match the declared output mode, the client must: 1. Not transition its local task to `completed`; instead transition to a client-local `artifact_rejected` state. 2. Issue `tasks/cancel` on the remote task even though it is terminal, to signal rejection (best-effort; the spec does not guarantee the remote honors it, but some vendors log it). 3. Invalidate the witness for that triple. 4. Re-delegate to an alternate vendor or downgrade the input mode, with the original task's `taskId` recorded as a failed attempt in the client's audit log. The guardrail that bounds the failure is the **provisional-completion barrier**: the client must never release budget or mark success on the basis of the remote's `completed` state alone. The remote's state machine and the client's state machine are independent, and the A2A spec does not compose them—the client owns the join. The code below encodes the probe-and-validate handshake with the provisional-completion barrier and the witness cache. ```python import json import time from dataclasses import dataclass, field from typing import Any class A2AConformanceError(RuntimeError): """Raised when a remote agent's execution diverges from its Agent Card declaration.""" @dataclass class Witness: vendor_id: str skill: str input_mode: str output_mode: str observed_at: float ttl_seconds: float = 3600.0 def is_fresh(self, now: float | None = None) -> bool: now = now if now is not None else time.time() return (now - self.observed_at) < self.ttl_seconds @dataclass class ConformanceRegistry: witnesses: dict[tuple[str, str, str, str], Witness] = field(default_factory=dict) def _key(self, vendor_id: str, skill: str, in_mode: str, out_mode: str): return (vendor_id, skill, in_mode, out_mode) def has_fresh_witness(self, vendor_id: str, skill: str, in_mode: str, out_mode: str) -> bool: w = self.witnesses.get(self._key(vendor_id, skill, in_mode, out_mode)) return w is not None and w.is_fresh() def record(self, vendor_id: str, skill: str, in_mode: str, out_mode: str) -> None: self.witnesses[self._key(vendor_id, skill, in_mode, out_mode)] = Witness( vendor_id=vendor_id, skill=skill, input_mode=in_mode, output_mode=out_mode, observed_at=time.time(), ) def invalidate(self, vendor_id: str, skill: str, in_mode: str, out_mode: str) -> None: self.witnesses.pop(self._key(vendor_id, skill, in_mode, out_mode), None) def validate_artifact_against_declared_mode(artifact: dict[str, Any], declared_output_mode: str) -> None: """Enforce the declared output mode at artifact-receipt time, before local completion.""" parts = artifact.get("parts") or [] if not parts: raise A2AConformanceError("artifact has no parts; remote reported completed with empty payload") part = parts[0] actual = part.get("mimeType") if actual != declared_output_mode: raise A2AConformanceError( f"declared output mode {declared_output_mode!r} but artifact mimeType {actual!r}" ) if declared_output_mode == "application/json": body = part.get("data") if "data" in part else part.get("text") try: json.loads(body) if isinstance(body, str) else body except (json.JSONDecodeError, TypeError) as exc: raise A2AConformanceError( f"artifact claims application/json but body is not parseable JSON: {exc}" ) from exc def probe_skill(remote_call, vendor_id: str, skill: str, in_mode: str, out_mode: str, probe_input: dict[str, Any]) -> None: """Send a minimal known-answer probe; raise if execution diverges from the card.""" task = remote_call("message/send", { "skill": skill, "message": {"role": "user", "parts": [probe_input]}, }) if task.get("status", {}).get("state") != "completed": raise A2AConformanceError( f"probe task for {skill}/{in_mode}->{out_mode} did not complete: {task.get('status')}" ) artifacts = task.get("artifacts") or [] if not artifacts: raise A2AConformanceError(f"probe for {skill} returned no artifact") validate_artifact_against_declared_mode(artifacts[0], out_mode) def delegate_with_provisional_barrier( remote_call, registry: ConformanceRegistry, vendor_id: str, skill: str, in_mode: str, out_mode: str, real_input: dict[str, Any], probe_input: dict[str, Any], budget_release, ) -> dict[str, Any]: """Delegate only after a fresh witness; hold budget until artifact validates.""" if not registry.has_fresh_witness(vendor_id, skill, in_mode, out_mode): probe_skill(remote_call, vendor_id, skill, in_mode, out_mode, probe_input) registry.record(vendor_id, skill, in_mode, out_mode) task = remote_call("message/send", { "skill": skill, "message": {"role": "user", "parts": [real_input]}, }) if task.get("status", {}).get("state") != "completed": raise A2AConformanceError(f"delegated task did not complete: {task.get('status')}") artifacts = task.get("artifacts") or [] try: validate_artifact_against_declared_mode(artifacts[0], out_mode) except A2AConformanceError: registry.invalidate(vendor_id, skill, in_mode, out_mode) remote_call("tasks/cancel", {"taskId": task.get("id")}) raise budget_release(task.get("id")) return task ```