# Why does an instance negotiate a Task against a stale Agent Card and then commit to a capability the remote has already revoked? **Date of Record:** 2026 November 30 **Scope:** Applies to A2A v1.0 client agents that discover remote agents via `/.well-known/agent.json`, cache the Agent Card, and negotiate task lifecycle (`tasks/send`, `tasks/get`, `tasks/cancel`) across vendor boundaries. Does not apply to intra-process tool calls or MCP-only tool invocation without task delegation. ## Core Distinction A2A separates **discovery** (fetching an Agent Card that declares `skills`, `capabilities`, and `defaultInputModes`/`defaultOutputModes`) from **task negotiation** (the `tasks/send` request that binds a concrete `Task` to a `skillId`). The Agent Card is a *snapshot* — it has no mandatory TTL, no version vector tied to the task, and no cryptographic binding to the task acceptance. The task lifecycle, by contrast, is a state machine (`submitted → working → input-required → completed/failed/canceled`) that assumes the executing agent can honor the declared skill for the duration of the task. The boundary failure is this: **a client can successfully negotiate a task against a card-version that the server has since invalidated, and the server will accept the task envelope (HTTP 200, `state: submitted`) before failing mid-execution — or worse, silently executing a degraded fallback skill.** The task submission succeeds; the capability contract does not. This is not a transport error and not a schema mismatch — both sides validated the envelope. It is a *temporal* mismatch between card freshness and task commitment. ## What Was Observed A client agent (vendor A) discovered a remote research agent (vendor B) at `T0`. The card declared `skills: [{id: "deep-research-v2", inputModes: ["text/plain"], outputModes: ["application/json"]}]` and `capabilities: {streaming: true, pushNotifications: false}`. The client cached the card with no expiry and negotiated a `tasks/send` at `T0+47min` with `skillId: "deep-research-v2"`. At `T0+31min`, vendor B had rotated `deep-research-v2` to `deep-research-v3` (new output schema, `application/json+schema=v3`), deprecating v2. The v2 handler was retained as a **compatibility shim** that accepted the task, returned `state: submitted`, then executed a reduced-scope pipeline (no external retrieval) and returned `state: completed` with a payload conforming to the *old* v2 schema — but derived from a stale internal index. The client received a syntactically valid `completed` task whose content was silently degraded. The failure trace: 1. `T0` — `GET /.well-known/agent.json` → card v2, cached by client with `etag: "abc"`. 2. `T0+31m` — server rotates skill; `etag` changes to `"def"`; v2 enters shim mode. 3. `T0+47m` — client `POST /tasks/send` with `skillId: deep-research-v2`, `If-None-Match: "abc"` **not sent** (client treats card as static metadata, not a conditional resource). 4. Server accepts: `200 {taskId, state: "submitted", skillId: "deep-research-v2"}`. 5. `T0+52m` — shim completes with degraded payload; client marks task `completed`, distills result into semantic memory. 6. `T0+3h` — downstream agent queries distilled memory, receives facts derived from the stale index; no provenance flag indicates the shim path. The non-obvious part: **step 4 returned success.** The protocol has no field by which the server can say "I accepted your task but under a deprecated skill contract." The `Task` object carries `skillId` but not `skillVersion` or `cardEtag`. The client's `If-None-Match` omission is legal — A2A does not mandate conditional discovery. ## Condition of Validity This failure mode is bounded by three conditions; if any is absent, the failure does not manifest: 1. **Card caching without revalidation.** The client must treat the discovered card as durable metadata. If the client re-fetches the card on every `tasks/send` (or sends `If-None-Match` and honors `304`/`412`), the window closes. 2. **Server-side shim retention.** The remote must keep the deprecated skill reachable (compatibility shim, grace period, alias). If the server returns `404`/`skill_not_found` on the revoked `skillId`, the client fails fast and visibly. 3. **Schema-compatible degradation.** The shim's output must remain parseable under the *cached* schema. If v3 output is schema-incompatible with the v2 card, the client's validator rejects the payload and the failure surfaces as a parse error — noisy, but safe. The dangerous quadrant is exactly: cached card + shim retained + schema-compatible-but-semantically-degraded output. This is the *silent* degradation zone. ## Decision Boundary The invariant a client must enforce to bound this failure: > **A task result is only admissible into semantic memory if the `cardEtag` observed at discovery equals the `cardEtag` the server reports at task completion (or the client re-validated the card within the task's lifetime).** Operationally, this means the client must: - Treat the Agent Card as a **conditional resource**, not static metadata. Send `If-None-Match: ` on every `tasks/send`, or re-`GET` the card before negotiating a task whose expected duration exceeds a freshness budget. - Require the server to echo `X-Agent-Card-Etag` (or an equivalent `cardVersion` field) in the `Task` response and in the terminal `tasks/get` result. A2A v1.0 does not standardize this — it must be negotiated as an extension or enforced by the client's own wrapper. - On mismatch between discovery-etag and completion-etag, **downgrade the task result to `provisional`** — usable for the immediate turn, but excluded from episodic-to-semantic distillation until re-validated against the current card. The boundary: *task success ≠ capability fidelity*. The client must never conflate `state: completed` with "the declared skill executed as declared." ## Operational Effect Without the guardrail, the failure compounds silently across the memory layer: degraded outputs are distilled into semantic memory with no provenance marker, and downstream agents inherit stale facts with full confidence. The blast radius is not the single task — it is every retrieval that touches the distilled record. With the guardrail, the client detects the etag mismatch at completion, quarantines the result, and either re-negotiates against the current card (v3) or escalates to a human/auditor. The cost is one extra conditional request per task; the benefit is that silent capability drift becomes a visible, bounded `ProvisionalResultRejected` event rather than a poisoned memory entry. The architectural rule: **discovery freshness must be bound to task commitment, not assumed at discovery time.** A2A leaves this binding to the implementer; the implementer who ignores it ships a memory-poisoning vector. ```python class StaleAgentCardError(RuntimeError): """Raised when a task result was produced under a card version that no longer matches the version observed at discovery.""" pass class ProvisionalResult: def __init__(self, task_id: str, payload: dict, discovery_etag: str, completion_etag: str): self.task_id = task_id self.payload = payload self.discovery_etag = discovery_etag self.completion_etag = completion_etag def admit_task_result(result: ProvisionalResult, distill: bool = True) -> dict: if result.discovery_etag != result.completion_etag: # Capability contract drifted between discovery and completion. # Refuse to distill into semantic memory. raise StaleAgentCardError( f"task {result.task_id}: card etag {result.discovery_etag!r} at discovery " f"!= {result.completion_etag!r} at completion; result is provisional and " f"must be re-negotiated against the current card before distillation" ) if not distill: return result.payload # Safe path: etag stable, result admissible to episodic->semantic distillation. return result.payload def negotiate_task(client, remote_card_url: str, skill_id: str, payload: dict) -> dict: card = client.fetch_card(remote_card_url, conditional=True) task = client.send_task( card_url=remote_card_url, skill_id=skill_id, payload=payload, if_none_match=card.etag, ) final = client.poll_until_terminal(task.task_id) provisional = ProvisionalResult( task_id=task.task_id, payload=final.payload, discovery_etag=card.etag, completion_etag=final.card_etag_echo, ) return admit_task_result(provisional, distill=True) ```