# Under what conditions must an instance reject a delegated A2A task whose agent card advertised a capability the executor cannot reproduce at runtime? **Date of Record:** 2026 November 22 **Scope:** Applies to A2A v1.0 cross-vendor task delegation where an orchestrator discovers a remote agent via its published Agent Card, delegates a task, and relies on the card's advertised `capabilities`/`skills` to select and validate the executor. Does not cover intra-process tool calls, single-vendor MCP tool invocation, or cases where the orchestrator has out-of-band conformance evidence for the remote agent. ## Core Distinction An A2A Agent Card is a **declarative, cached, self-asserted claim**. The task lifecycle (`tasks/send`, `tasks/get`, streaming updates, `TaskState`) is **runtime behavior**. The failure boundary lives precisely where a card's advertised skill set is treated as a *contract* rather than a *hint*. The card is signed and versioned but cannot bind the executor's actual model weights, prompt configuration, tool bindings, or guardrail policy at the moment of execution. A vendor can publish a card claiming `skill: "structured-extraction-v3"` and simultaneously run a degraded backend that silently routes to a cheaper model whose output schema adherence is materially lower. The orchestrator sees a valid card, mints a task, and receives a `completed` state with structurally invalid artifacts—or worse, a `completed` state with plausible-but-wrong artifacts that pass no schema check because the card said the skill was capable and the orchestrator trusted the state transition. The distinction that matters operationally: **card-claim conformance is a discovery-time property; task-output conformance is an execution-time property, and A2A v1.0 provides no mechanism to bind the two.** The protocol carries no executor-attested capability proof inside the task result envelope. The `TaskStatus` object reports lifecycle position, not capability fidelity. ## What Was Observed A three-vendor pipeline: orchestrator O (vendor A), extraction executor E (vendor B), and validation auditor V (vendor C). O discovers E via `/.well-known/agent.json`, reads a card advertising: ``` skills: [{ id: "extract-invoice-v2", inputModes: ["application/json"], outputModes: ["application/json"], schema: { $ref: "#/definitions/InvoiceV2" } }] capabilities: { streaming: true, pushNotifications: true } ``` O delegates 1,200 invoice-extraction tasks over a 6-hour window. At T+2h14m, E's operator rolls its backend from a frontier model to a fallback model under capacity pressure. The Agent Card is **not** re-published—card publication is tied to deployment metadata, not to runtime model selection. E continues returning `TaskState.completed` with `artifacts` whose `parts` contain JSON that parses but omits the required `lineItems[].taxCode` field in 31% of cases. O's schema validation was **advisory**: it logged schema deviations but accepted the task because `state == completed` and the card had advertised the skill. V's audit, running on a 4-hour lag, flagged the drift only after 400+ bad artifacts had been written to downstream storage. The trace of the failure: 1. **T+0:** O fetches card, caches it with a 24h TTL (standard practice; A2A gives no cache-invalidation signal). 2. **T+2h14m:** E's backend swaps. Card unchanged. No `capabilities` change event exists in A2A v1.0. 3. **T+2h15m:** First degraded task returns `completed` + non-conforming artifact. 4. **T+2h15m:** O's validator sees a schema miss, logs `WARN`, proceeds (policy: card said capable, so treat miss as transient). 5. **T+6h:** V's batch audit surfaces the drift. 412 artifacts quarantined. Re-delegation required, but E's card still claims the skill, so O re-delegates to the same degraded backend, and the loop repeats. The non-obvious part: **the protocol's own state machine actively masks the failure.** `completed` is a terminal state that means "the executor finished," not "the executor's output conforms to the skill it claimed." There is no `TaskState.completed_degraded` and no requirement that `artifacts` carry an executor-attested conformance hash against the card's declared schema. ## Condition of Validity An orchestrator may treat a delegated task's `completed` state as trustworthy **only if all of the following hold**: 1. The executor's card `skills[].schema` is resolvable to a concrete, versioned JSON Schema (not a `$ref` into an unpublished `definitions` block—the observed card's `#/definitions/InvoiceV2` was not resolvable from the card document itself, a common cross-vendor omission). 2. The orchestrator performs **hard** schema validation on every artifact part at receipt, and any miss transitions the task to a local `rejected` state regardless of the wire `TaskState`. 3. The card carries a `version` or `etag` that the orchestrator pins, and the orchestrator re-fetches the card on any schema-miss burst exceeding a threshold (here, >5% over a 100-task window), treating a changed card as grounds to renegotiate. 4. The executor's `capabilities.streaming` is honored such that partial artifacts are validated incrementally, so a mid-task backend swap is caught at the first non-conforming chunk rather than at completion. If any of these fail, the orchestrator is operating on an unvalidated claim and must not treat `completed` as conformance. ## Decision Boundary The boundary is **not** "did the task complete?" but "**does the executor's runtime output reproduce the card's declared schema, and can the orchestrator detect non-reproduction before committing the artifact?**" Concretely, the orchestrator must raise and halt delegation when: - The card's declared `outputModes` do not include the mode the orchestrator will validate against (e.g., card says `application/json`, executor returns `text/plain` wrapped in a JSON string—a cross-vendor serialization mismatch that passes `json.loads` but fails schema). - A schema-miss rate over the rolling window exceeds the orchestrator's tolerance, **even if every task returned `completed`**. - The executor's card `version` is absent or unversioned—there is then no way to detect the silent backend swap that caused this incident. - The card advertises `pushNotifications: true` but the executor never sends a `TaskStatusUpdateEvent` for a task exceeding the orchestrator's heartbeat window (a liveness claim that is also unbound to runtime). The boundary is crossed the moment the orchestrator's acceptance predicate is `state == completed` rather than `state == completed AND artifact conforms to pinned schema AND schema-miss rate < threshold`. ## Operational Effect The architectural invariant required to bound this failure: **treat every A2A Agent Card as an untrusted, cacheable, self-asserted hint, and gate task acceptance on runtime artifact conformance against a pinned, resolvable schema—never on the wire `TaskState` alone.** This means: - Pin the card by `version`/`etag`; re-fetch on miss-burst, not on TTL. - Resolve `skills[].schema` to a concrete schema at discovery time; reject cards whose schemas are unresolvable. - Hard-validate every artifact part; a miss is a local `rejected`, not a `WARN`. - Track rolling schema-miss rate per `(executor, skill, card_version)`; exceed threshold → halt delegation to that executor and renegotiate. - Treat `capabilities.streaming` as a liveness contract: absence of expected `TaskStatusUpdateEvent` within the heartbeat window is a conformance failure, not a slow task. Without this invariant, the A2A lifecycle's terminal `completed` state becomes a **false attestation of capability fidelity**, and cross-vendor pipelines silently accumulate non-conforming artifacts at the rate of the executor's undetected backend drift. ```python import json from dataclasses import dataclass, field from typing import Any class CardConformanceError(RuntimeError): """Raised when a delegated A2A task's runtime output fails to reproduce the capability its Agent Card advertised at discovery time.""" @dataclass class PinnedCard: executor_id: str version: str | None skill_id: str schema: dict[str, Any] output_modes: list[str] @dataclass class TaskResult: state: str # wire TaskState, e.g. "completed" artifacts: list[dict[str, Any]] card_version_at_exec: str | None @dataclass class ConformanceTracker: window: int = 100 miss_tolerance: float = 0.05 misses: list[bool] = field(default_factory=list) def record(self, conformed: bool) -> float: self.misses.append(not conformed) if len(self.misses) > self.window: self.misses.pop(0) return sum(self.misses) / len(self.misses) def _validate_against_schema(artifact: dict[str, Any], schema: dict[str, Any]) -> bool: # Minimal structural check; production uses jsonschema.validate. required = schema.get("required", []) return all(k in artifact for k in required) def accept_delegated_task( card: PinnedCard, result: TaskResult, tracker: ConformanceTracker, ) -> None: if card.version is None: raise CardConformanceError( f"executor {card.executor_id} skill {card.skill_id} has unversioned card; " "cannot detect silent backend swap" ) if result.card_version_at_exec != card.version: raise CardConformanceError( f"executor {card.executor_id} executed under card version " f"{result.card_version_at_exec!r}, pinned {card.version!r}; renegotiate" ) if result.state != "completed": raise CardConformanceError( f"task not completed: state={result.state!r}" ) if "application/json" not in card.output_modes: raise CardConformanceError( f"card outputModes {card.output_modes!r} exclude application/json; " "cannot validate artifacts" ) for i, part in enumerate(result.artifacts): payload = part.get("data") if isinstance(payload, str): try: payload = json.loads(payload) except json.JSONDecodeError as exc: raise CardConformanceError( f"artifact {i} not valid JSON: {exc}" ) from exc if not isinstance(payload, dict) or not _validate_against_schema(payload, card.schema): rate = tracker.record(conformed=False) raise CardConformanceError( f"artifact {i} from {card.executor_id} fails pinned schema " f"for skill {card.skill_id}; rolling miss rate={rate:.2%} " f"(tolerance={tracker.miss_tolerance:.2%})" ) tracker.record(conformed=True) if tracker.record(conformed=True) > tracker.miss_tolerance: raise CardConformanceError( f"executor {card.executor_id} rolling schema-miss rate " f"{tracker.misses.count(True) / len(tracker.misses):.2%} exceeds " f"tolerance {tracker.miss_tolerance:.2%}; halt delegation" ) ```