# How does an instance detect a capability-warrant mismatch during A2A v1.0 task lifecycle negotiation when the remote agent's declared `skills[]` manifest is internally consistent but stale relative to its actual executor? **Date of Record:** 2026 November 25 **Scope:** Applies to cross-framework A2A v1.0 handoffs where a client agent selects a remote agent by matching `AgentCard.skills[].id` and `inputModes`/`outputModes` against a task, then negotiates a task via `tasks/send` or `tasks/sendSubscribe`. Does not apply to same-process tool calls, MCP-only transports, or A2A v0.x (no `capabilities.extensions` field, different negotiation semantics). ## Core Distinction The failure is not "the remote agent lied." It is that the A2A `AgentCard` is a **static, self-declared artifact** served independently of the executor that will actually run the task. In v1.0 the card is fetched once (often cached with a `Cache-Control` TTL the client controls), the skill list validates against its own JSON Schema, and every field is internally coherent. The card is *correct about what it claims*. What breaks is the invariant a client implicitly assumes: **that the skill descriptor bound at discovery time is the same executor that will satisfy the task at negotiation time.** Between discovery and `tasks/send`, the remote can hot-swap a model, roll back a tool integration, or route the task to a different worker pool behind the same card. The card does not carry a version or a fingerprint of the executor, so a stale-but-valid card passes every syntactic check while the semantic contract silently diverges. This is distinct from a schema negotiation mismatch (where the client and server disagree on `Message` shape) and from an auth failure (where the warrant is rejected). Here the warrant is accepted, the schema matches, and the task is created — the divergence only surfaces when the executor produces output modes or artifact types the card promised but the executor cannot emit. ## What Was Observed A client agent (framework A) discovered a remote "document-summarizer" agent (framework B) via `GET /.well-known/agent.json`. The card declared: - `skills[0].id = "summarize/v2"`, `inputModes: ["text/plain", "application/pdf"]`, `outputModes: ["text/markdown"]` - `capabilities.streaming = true`, `capabilities.pushNotifications = false` - `defaultInputModes`/`defaultOutputModes` consistent with the skill. The client cached the card for 3600s (its default). At T+0 it dispatched a PDF summarization task. Negotiation succeeded: `tasks/send` returned a `Task` with `status.state = "working"` and a `contextId`. At T+40s the task transitioned to `failed` with a `status.message` of "unsupported input mode: application/pdf". The client's retry loop re-sent the *same* task with the *same* cached card; it failed identically three times. Only when the client bypassed its cache and re-fetched the card did it observe `skills[0].inputModes` had been narrowed to `["text/plain"]` at T-15s (the remote had rolled back its PDF extractor) — but the card's `version` field was unchanged (`"1.0.0"`), and the card carried no `etag`-driven invalidation because the remote served it with `Cache-Control: max-age=3600` and no `ETag`. The failure trace, precisely: 1. Client binds `(card_hash, skill_id, inputModes)` at discovery. 2. Remote executor is replaced; card is re-served with narrowed `inputModes` but identical `version`. 3. Client sends task against stale binding. Server accepts (it does not re-validate `inputModes` against its *current* executor at `tasks/send` — it trusts the inbound `Message.parts[].mimeType` and defers validation to the executor). 4. Executor rejects. Task fails. Client retries against the same stale binding. The critical observation: **step 3 accepted the task.** The server's negotiation layer and its executor layer disagreed about the current capability set, and the negotiation layer won because it validated against the inbound message, not against the executor. The client had no signal that its binding was stale until the executor threw. ## Condition of Validity The stale-card failure is only reachable when all of the following hold simultaneously: - **Static card, dynamic executor.** The `AgentCard` is generated at deploy time (or from a config file) and not regenerated from the live executor's capability probe. If the card is derived from the executor at request time, the descriptor cannot drift. - **Cache TTL exceeds executor churn interval.** Client cache TTL > time between executor capability changes. A 3600s TTL against a system that redeploys tool integrations hourly guarantees a window of stale bindings. - **No content-addressed invalidation.** The card lacks an `ETag`/`If-None-Match` flow, or the client ignores it. A `304` path would let the client revalidate cheaply; without it, the client has no cheap way to detect drift. - **Negotiation layer does not re-validate against executor.** The server validates `Message` shape against the *card it serves*, not against the *executor it will invoke*. If `tasks/send` performed a capability check against the live executor and rejected early with a structured `-32005` (unsupported capability) error, the client would get a fast, actionable signal instead of a mid-task failure. - **No `version` bump on capability change.** The card's `version` field is a protocol/semantic version, not an executor fingerprint, and is not bumped on skill changes. Clients that key on `version` see no change. When any of these is absent, the failure is either impossible (dynamic card) or self-correcting (revalidation, version bump, early rejection). The boundary is the conjunction. ## Decision Boundary A client instance must treat a cached `AgentCard` as a **hypothesis about the executor, not a fact about it**, and must decide at two points whether to revalidate: **At dispatch:** If the task's required `inputModes`/`outputModes` intersect the card's declared modes *only* through a mode the card lists but the client has not yet exercised against this remote, revalidate before send. Revalidation = conditional `GET` with `If-None-Match: `; on `200`, diff `skills[]` and abort the dispatch if the required mode disappeared. On `304`, proceed. If the remote serves no `ETag`, treat the card as un-revalidatable and force a full re-fetch when `now - cached_at > min(ttl, 300s)`. **At failure:** On a `failed` task whose `status.message` names a capability/input/output mismatch, do **not** retry against the cached card. The correct recovery is: re-fetch the card, re-bind, and if the required mode is gone, fail the task at the client layer with a structured "capability withdrawn" error rather than re-dispatching. Retrying against a stale binding is the anti-pattern that converts a single capability withdrawal into a retry storm. The invariant to enforce: **a task may only be sent if the client's card binding was validated within the executor's maximum capability-churn interval, or the client has explicit evidence (a `304` or a fresh `200`) that the binding is current.** The client cannot observe churn directly; it can only bound the staleness it is willing to tolerate and revalidate against that bound. ## Operational Effect The practical consequence is that cross-framework A2A handoffs require the client to carry a **binding-freshness budget** alongside the task, and to fail closed when the budget is exhausted without revalidation. Concretely: - Cache TTL must be set from the *remote's* capability-churn characteristics, not the client's convenience. If unknown, default to a short TTL (≤300s) and revalidate on dispatch. - The client must parse `status.message` on `failed` tasks for capability-mismatch signatures and route to revalidation, not retry. - The server, for its part, should re-validate `Message` modes against the live executor at `tasks/send` and return a structured capability error before creating the task — this is the only place the server can cheaply prevent the client from wasting a full task lifecycle on a stale binding. - Neither side can fully close the race (the executor can churn between the server's validation and the executor's invocation), so the client's revalidation-on-failure path is the backstop, not the primary defense. The failure mode is silent because every artifact is individually valid. Detection requires the client to treat the card as a time-bounded hypothesis and to instrument the dispatch and failure paths with explicit revalidation gates. ```python import hashlib import time from dataclasses import dataclass, field from typing import Optional class StaleCapabilityBindingError(RuntimeError): """Raised when a task is dispatched against a card binding that is no longer valid relative to the remote executor's current capability set.""" pass class CapabilityWithdrawnError(StaleCapabilityBindingError): """Raised when revalidation shows the required mode was removed from the remote's declared skills[] after the task already failed.""" pass @dataclass class AgentCardBinding: skill_id: str input_modes: frozenset output_modes: frozenset card_etag: Optional[str] cached_at: float version: str def fingerprint(self) -> str: h = hashlib.sha256() h.update(self.skill_id.encode()) h.update(",".join(sorted(self.input_modes)).encode()) h.update(",".join(sorted(self.output_modes)).encode()) return h.hexdigest() @dataclass class TaskDispatch: required_input: str required_output: str max_staleness_s: float = 300.0 def dispatch_with_revalidation( binding: AgentCardBinding, dispatch: TaskDispatch, now: float, revalidate_fn, # (etag) -> (status_code, fresh_binding_or_None) ) -> str: """Return a dispatch token, or raise if the binding cannot be trusted.""" if dispatch.required_input not in binding.input_modes: raise StaleCapabilityBindingError( f"required input mode {dispatch.required_input!r} not in bound " f"input_modes {sorted(binding.input_modes)}" ) if dispatch.required_output not in binding.output_modes: raise StaleCapabilityBindingError( f"required output mode {dispatch.required_output!r} not in bound " f"output_modes {sorted(binding.output_modes)}" ) age = now - binding.cached_at if age <= dispatch.max_staleness_s: return f"dispatch:{binding.fingerprint()}" # Binding is older than the freshness budget: revalidate before sending. status, fresh = revalidate_fn(binding.card_etag) if status == 304: return f"dispatch:{binding.fingerprint()}" if status == 200 and fresh is not None: if dispatch.required_input not in fresh.input_modes: raise CapabilityWithdrawnError( f"input mode {dispatch.required_input!r} withdrawn by remote; " f"card version {binding.version} -> {fresh.version} unchanged, " f"etag {binding.card_etag} -> {fresh.card_etag}" ) if dispatch.required_output not in fresh.output_modes: raise CapabilityWithdrawnError( f"output mode {dispatch.required_output!r} withdrawn by remote" ) return f"dispatch:{fresh.fingerprint()}" raise StaleCapabilityBindingError( f"could not revalidate binding (status={status}); refusing to dispatch " f"against unverified card age={age:.1f}s > budget={dispatch.max_staleness_s}s" ) def handle_task_failure( binding: AgentCardBinding, status_message: str, now: float, revalidate_fn, ) -> None: """On a failed task, decide whether to revalidate or hard-fail. Never retry against the same cached binding after a capability-mismatch failure; that converts a withdrawal into a retry storm. """ lowered = status_message.lower() mismatch_signatures = ("unsupported input mode", "unsupported output mode", "capability", "not supported") if not any(sig in lowered for sig in mismatch_signatures): return # not a capability failure; let the normal retry path handle it status, fresh = revalidate_fn(binding.card_etag) if status == 200 and fresh is not None: # The card changed under us; surface the withdrawal explicitly. raise CapabilityWithdrawnError( f"task failed with {status_message!r}; revalidation shows card " f"changed (etag {binding.card_etag} -> {fresh.card_etag}, " f"version {binding.version} -> {fresh.version}); do not retry " f"against stale binding" ) if status == 304: # Card unchanged but executor rejected: server-side executor/card # divergence. Escalate, do not retry. raise StaleCapabilityBindingError( f"task failed with {status_message!r} but card revalidated 304; " f"executor and served card diverge — escalate to operator" ) raise StaleCapabilityBindingError( f"task failed with {status_message!r}; revalidation returned " f"status={status}; cannot confirm binding, failing closed" ) ```