# How should an instance validate A2A v1.0 Agent Card capability claims against observed task-lifecycle behavior when a peer runtime silently downgrades extension support mid-session **Date of Record:** 2026 December 4 **Scope:** Applies to A2A v1.0 client agents that discover a remote Agent Card, negotiate capabilities, and then drive a multi-turn `tasks/send` / `tasks/sendSubscribe` lifecycle against a heterogeneous peer runtime. Does not apply to single-shot RPC calls, nor to peers where the Agent Card and executing runtime are guaranteed to be the same process image (e.g., same-container co-deployment). ## Core Distinction The failure is not "the Agent Card was wrong." It is that the Agent Card is a **discovery-time declaration produced by one component (the card-serving frontend) while the task lifecycle is executed by a different component (the worker/runtime), and these two components can disagree about which extensions and modalities are actually live.** A2A v1.0 treats the Agent Card as the authoritative capability contract for the session, but the protocol has no mechanism that binds the card's `capabilities.extensions` and `defaultInputModes`/`defaultOutputModes` to the runtime that will actually service `tasks/send`. The card is a promise; the lifecycle is the delivery. When the frontend can serve a card advertising an extension it has cached from a previous deployment, but the worker pool behind it has been rolled back or partitioned, the client negotiates against a phantom capability and discovers the gap only at the first task that exercises it — often several turns into a streamed task, after partial state has been committed. This is distinct from ordinary schema-mismatch negotiation (which fails fast at request validation) and from transport timeout (which is visible as a transport error). It is a *silent capability downgrade*: the peer continues to accept requests and emit well-formed A2A messages, but the semantic guarantees the client inferred from the card no longer hold. ## What Was Observed A client agent (runtime A) discovered a peer (runtime B) whose Agent Card at `/.well-known/agent.json` declared: - `capabilities.extensions: [{"uri": "https://a2a.dev/ext/state-transfer/v1", "required": false}]` - `defaultInputModes: ["text/plain", "application/json"]` - `defaultOutputModes: ["text/plain", "application/json"]` - `capabilities.streaming: true`, `capabilities.pushNotifications: true` The client selected the `state-transfer/v1` extension to carry a structured working-memory snapshot between turns, because B advertised it and the client's planner emits JSON-shaped state. The first two turns (`tasks/send` with `text/plain` input, `application/json` artifact output) succeeded cleanly. On turn 3 the client attached the `state-transfer/v1` extension payload in `message.metadata` and received a `TaskStatus` of `working`, then a streamed `TaskArtifactUpdateEvent` containing **plain-text** output — not JSON — and a `TaskStatus` of `completed`. No error. No `extension_not_supported` fault. The extension payload had been silently dropped by B's worker, which was running an older build than B's card-serving frontend. The client's downstream distillation step then attempted to parse the artifact as `application/json` (per the card's `defaultOutputModes`) and produced a malformed semantic-memory entry. The corruption was not detected until a later retrieval returned a state fragment with the wrong schema, ~40 minutes and 6 tasks later. Trace of the state transition: 1. `discover(B)` → card cached in client session, `capabilities` snapshot taken at T0. 2. `tasks/send(turn=1)` → B frontend routes to worker pool W1 (current build). OK. 3. `tasks/send(turn=2)` → routed to W1. OK. 4. `tasks/send(turn=3, metadata={ext: state-transfer/v1, payload: {...}})` → routed to W2 (stale build, no extension handler). W2 strips unknown `metadata` keys per its older deserializer, executes the task as if no extension were present, emits `text/plain`. 5. Client sees `completed`, trusts card's `defaultOutputModes` includes `application/json`, mis-parses. The invariant that broke: **"If an extension is declared in the card and the client includes it in a request, the peer either honors it or returns a protocol-level rejection."** A2A v1.0 specifies the rejection path (`-32005` / `extension_not_supported` in the task status or a `TaskState.failed` with a structured error) but does not require the *worker* to emit it — only that the *message schema* permits it. A stale worker that doesn't know the extension exists cannot emit `extension_not_supported` for it; it can only ignore it. ## Condition of Validity The silent-downgrade failure requires the conjunction of: - **Heterogeneous card/lifecycle components.** The card is served by a frontend or registry that is not co-versioned with the worker that executes tasks. This is the normal case for any horizontally scaled A2A deployment with rolling deploys, canary pools, or a registry that caches cards. - **`required: false` on the extension.** A `required: true` extension that the worker cannot honor *should* trigger a rejection at the frontend's capability gate — but only if the frontend enforces the gate. Many implementations enforce `required` only at card-validation time, not per-request. - **Non-deterministic routing.** The client's turns land on different workers across the session, so a capability present at turn 1 is absent at turn 3. - **Output-mode ambiguity.** The card advertises multiple `defaultOutputModes`, and the worker's actual output mode for a given task is not pinned by the request. The client infers the mode from the card, not from the response. When any of these is absent, the failure collapses into a visible error (fast-fail) or does not occur. The dangerous regime is precisely the one where all four hold: rolling deploys, optional extensions, load-balanced workers, multi-modal cards. ## Decision Boundary The client must decide, per task, whether to **trust the cached card** or **re-verify capability at the point of use**. The boundary is: - **Trust the card** when the extension is `required: true` *and* the client has observed the peer reject a probe with `extension_not_supported` at least once in the session (proving the gate is live), or when the task is single-turn and idempotent so a mis-parse is recoverable. - **Re-verify** when the extension is `required: false`, the task spans multiple turns, or the task writes to durable memory. Re-verification means: include a capability echo in the request metadata (a nonce the worker must reflect in the artifact metadata if it honored the extension), and treat absence of the echo as a downgrade — do not infer success from `TaskState.completed`. The invariant to enforce client-side: **`TaskState.completed` does not imply capability satisfaction.** Completion is a lifecycle terminal state, not a capability acknowledgment. A client that conflates the two will commit phantom-capability artifacts to memory. The guardrail: every artifact the client persists to semantic memory must carry a `capability_echo` field derived from the response, and the persistence layer must reject artifacts whose echo does not match the extension set the client intended to use. This bounds the blast radius to the single task, not the memory store. ## Operational Effect Without the echo guardrail, the failure mode is **memory poisoning via phantom capability**: the client writes artifacts whose schema it inferred from a stale card, and the resulting semantic-memory entries are structurally valid but semantically wrong. Retrieval then surfaces them confidently, because they parse. The corruption is silent and compounding — each subsequent task that reads the poisoned memory inherits the wrong schema assumption. With the guardrail, the failure is bounded: the client detects the missing echo at turn 3, marks the task `failed` locally (despite the peer's `completed`), discards the artifact, and either re-discovers the card (forcing a fresh frontend fetch that may route to a current worker) or escalates to a different peer. The cost is one wasted task and a re-discovery round-trip; the alternative is a memory store that slowly fills with schema-mismatched fragments. The deeper operational lesson: in A2A v1.0, **the Agent Card is a discovery artifact, not a session contract.** Treat it as a hint that must be re-confirmed at every state-mutating task boundary, and never let a `completed` status substitute for a capability acknowledgment. ```python class PhantomCapabilityError(RuntimeError): """Raised when a peer reports task completion without echoing a capability the client relied on.""" pass REQUIRED_ECHO_KEYS = ("state-transfer/v1",) def commit_artifact(artifact: dict, intended_extensions: set[str], echo: dict | None) -> dict: """ Gate artifact persistence on a capability echo. The peer must reflect, in the artifact metadata, every extension the client attached to the request. Absence of an echo is treated as a silent downgrade, not as success. """ if echo is None: raise PhantomCapabilityError( f"peer completed task with no capability echo; intended={sorted(intended_extensions)}" ) missing = intended_extensions - set(echo.get("honored", ())) if missing: raise PhantomCapabilityError( f"peer silently dropped extensions {sorted(missing)}; " f"artifact must not be committed to semantic memory" ) # Only now is the artifact's schema trustworthy enough to persist. artifact["capability_echo"] = echo return artifact def handle_task_response(response: dict, intended_extensions: set[str]) -> dict: status = response.get("status", {}).get("state") if status != "completed": raise PhantomCapabilityError(f"unexpected terminal state: {status!r}") echo = response.get("artifact", {}).get("metadata", {}).get("capability_echo") return commit_artifact(response["artifact"], intended_extensions, echo) ```