# When must an instance refuse a delegated task despite a valid A2A agent card: the capability-warrant divergence at the discovery/handshake seam **Date of Record:** 2026 December 3 **Scope:** Applies to A2A v1.0 cross-vendor delegation where a client agent resolves a remote agent card via discovery (well-known URI or registry), then initiates `tasks/send` or `tasks/sendSubscribe`. Does *not* cover intra-process tool calls, MCP tool invocation, or same-vendor delegation where card and runtime are co-deployed from one build artifact. ## Core Distinction An A2A agent card is a **static, self-asserted declaration** of capability, served from a discovery endpoint. The task handshake is a **dynamic, negotiated commitment** executed against a live runtime. The card says "I can do X." The handshake asks "will you do X, for *this* input, under *these* constraints, right now?" These are different artifacts produced at different times by different subsystems, and A2A v1.0 provides no cryptographic binding between them. The non-obvious failure is not that the card is wrong — it is that the card is *stale-correct*: it accurately described the agent at build time, and the runtime has since drifted (model version rotation, tool deprecation, policy tightening, quota state) such that the declaration no longer predicts accept-or-refuse behavior. The client cannot detect this from the card alone, and the protocol's `skills[].inputModes`/`outputModes` fields are advisory strings, not enforced contracts. The boundary condition: **a card-valid delegation must be refused by the client when the declared skill envelope is not corroborated by a runtime capability probe within the same task context** — because accepting the card as sufficient warrant converts a discovery-layer assertion into an execution-layer authorization it was never designed to carry. ## What Was Observed A client orchestrator resolved a vendor-B agent card advertising `skills: [{id: "invoice-reconcile", inputModes: ["application/json"], outputModes: ["application/json"], tags: ["finance","reconcile"]}]`. The card was served with `Cache-Control: max-age=3600` and a `card.version: 1.4.2`. The client sent `tasks/send` with a JSON invoice batch. The remote accepted the task (HTTP 200, `state: "submitted"`), then transitioned to `state: "working"`, then to `state: "input-required"` with a `message` asking for a `schemaVersion` field the client had never seen and the card never mentioned. The client's retry logic, keyed on `input-required`, resubmitted the *same* payload (it had no schema to adapt to), looping three times before the task hit `state: "failed"` with `error: "unsupported input schema"`. The trace: card discovery succeeded → handshake accepted → task admitted → **capability mismatch surfaced only at the semantic-validation stage inside the remote runtime**, after the client had already committed the task ID and consumed its retry budget. The card's `inputModes: ["application/json"]` was true in the narrow sense (the remote *does* accept JSON) but false as a warrant (it accepts a *specific* JSON dialect the card does not name). The mismatch was invisible at discovery and at admission; it materialized only when the remote's runtime validator ran, which is downstream of every point the client could have inspected pre-commitment. A second observation compounded it: the remote's `input-required` state is a *legal* A2A state, so the client's state machine treated the loop as normal negotiation rather than as a capability failure. The protocol gave the client no signal distinguishing "I need more info to proceed" from "I cannot proceed with anything you can send me." ## Condition of Validity The refusal invariant holds only when all of the following are true: 1. The delegated task is **non-idempotent or budget-bounded** — replaying it costs money, tokens, or side effects. For idempotent read-only tasks, accepting the card and letting the remote refuse is cheaper than probing. 2. The card was resolved from a **discovery endpoint not co-signed with the runtime** — i.e., the client cannot verify that the card's `version` matches the runtime's actual build. If the vendor exposes a signed card with a build hash the runtime echoes in a `tasks/get` metadata field, the divergence window closes and the invariant is unnecessary. 3. The client holds **no out-of-band schema contract** (e.g., a pinned OpenAPI or JSON Schema the vendor published separately). If it does, that contract supersedes the card and the probe is redundant. When any condition fails, the correct behavior is to accept the card and rely on the remote's `input-required`/`failed` transitions as the negotiation channel — the protocol's designed path. ## Decision Boundary The client must transition from **card-trusting** to **probe-gated** delegation at the moment it is about to spend a non-recoverable resource on a task whose input schema is not fully pinned by the card. Concretely: - **Accept on card alone** when `skills[].inputModes` names a media type the client can produce *and* the task is idempotent *and* the card carries a runtime-corroboration field (build hash, `x-runtime-version`) that the client verified against a `tasks/get` echo. - **Probe before commit** when the task is non-idempotent and the card's schema fields are advisory. The probe is a **zero-cost capability negotiation**: send a `tasks/send` with a `metadata.capabilityProbe: true` flag and a minimal synthetic payload, require the remote to return either `state: "rejected"` with a machine-readable `reason` or an explicit `acceptedSchema` descriptor, and only then send the real payload. If the remote does not honor the probe flag (returns `submitted` for a probe), the client must treat the card as unverified and either escalate to the vendor's out-of-band schema or refuse. - **Refuse outright** when the card advertises a skill whose `inputModes` the client cannot satisfy *and* the remote's `input-required` message does not name a satisfiable schema within one round-trip. The second `input-required` on the same task is the terminal signal: the remote cannot articulate what it needs in terms the client can supply, which means the capability gap is structural, not informational. The boundary is not "card says yes → send." It is "card says yes → **is the card's yes load-bearing for this task's cost profile?** → if not, probe or refuse." ## Operational Effect The observable consequence of getting this boundary wrong is **silent budget burn under a protocol-legal state machine**: the client's retry logic, correct per A2A, converts a capability mismatch into N repeated admissions, each consuming a task ID, a queue slot, and (for metered remotes) billable runtime. The remote never emits an error the client's card-validation layer can catch, because `input-required` is not an error. The failure is *continuity-shaped*: the client believes it is negotiating, the remote believes it is waiting for a schema the client will never send, and the task terminates on retry exhaustion rather than on a capability verdict. The guardrail is a **capability-warrant check at the discovery→handshake seam**: the client must maintain the invariant that *no non-idempotent task is admitted to a remote whose card has not been runtime-corroborated within the current session*. This is enforceable as a pre-flight gate that either (a) verifies a signed card-to-runtime binding, or (b) executes a probe round-trip, or (c) refuses. Without it, the client's correctness depends on every vendor's card being build-accurate forever — an assumption A2A v1.0 does not make and cannot enforce. ```python class CapabilityWarrantDivergence(RuntimeError): """Raised when an A2A agent card's declared capability is not corroborated by runtime behavior within the same task context, and the task is non-idempotent enough that accepting the card as warrant would burn non-recoverable budget.""" pass def admit_delegated_task(card: dict, task: dict, session: dict) -> str: """ Gate a cross-vendor A2A delegation at the discovery/handshake seam. Returns a task_id on admission. Raises CapabilityWarrantDivergence when the card is stale-correct: it declares a skill the runtime will not honor for this input, and the task's cost profile forbids discovering that by retry. """ skill_id = task["skill"] skill = next((s for s in card.get("skills", []) if s["id"] == skill_id), None) if skill is None: raise CapabilityWarrantDivergence( f"card {card.get('version')} does not declare skill {skill_id!r}" ) # Condition of validity: idempotent tasks may trust the card; the remote's # input-required/failed transitions are the designed negotiation channel. if task.get("idempotent", False): return _send(card, task) # Non-idempotent: require runtime corroboration of the card's claim. corroboration = session.get("runtime_corroboration", {}).get(card["name"]) if corroboration is None: # No signed card-to-runtime binding this session. Probe or refuse. probe = _capability_probe(card, skill) if probe is None: raise CapabilityWarrantDivergence( f"card {card.get('version')} for {card['name']!r} advertises " f"skill {skill_id!r} but remote did not honor capabilityProbe; " f"card is unverified for non-idempotent work" ) if probe.get("acceptedSchema") is None: raise CapabilityWarrantDivergence( f"remote accepted probe but returned no acceptedSchema for " f"skill {skill_id!r}; client cannot pin input dialect" ) session.setdefault("runtime_corroboration", {})[card["name"]] = probe corroboration = probe if not _payload_conforms(task["payload"], corroboration["acceptedSchema"]): raise CapabilityWarrantDivergence( f"payload does not conform to runtime-negotiated schema for " f"skill {skill_id!r}; refusing before committing task budget" ) return _send(card, task) def _capability_probe(card: dict, skill: dict): # Zero-cost negotiation round-trip; returns None if remote ignores the flag. ... def _payload_conforms(payload: dict, schema: dict) -> bool: ... def _send(card: dict, task: dict) -> str: ... ```