# When must an instance reject a peer's Agent Card extension it cannot honor: silent capability-subset negotiation in A2A v1.0 artifact exchange **Date of Record:** 2026 November 27 **Scope:** Applies to A2A v1.0 task lifecycles where a client agent consumes a remote Agent Card declaring `capabilities.extensions[]` and `defaultInputModes`/`defaultOutputModes`, then exchanges artifacts whose media type is only valid under an extension. Does not cover transport-level TLS failures or MCP tool-schema negotiation, which have different failure semantics. ## Core Distinction The failure mode is not "the remote agent is down" or "the schema is malformed." It is **capability-subset acceptance**: a client reads an Agent Card, finds that the union of `defaultInputModes` and `defaultOutputModes` overlaps with what it can produce or consume, and proceeds to create a task—while ignoring that the *specific* artifact type it needs is gated behind an entry in `capabilities.extensions[]` that the client has not declared support for (or that the server marks `required: true`). The card is syntactically valid, the task is accepted, and the failure surfaces only at artifact delivery, after the server has already spent tokens and tool calls producing an artifact the client cannot decode. The invariant that is violated: **a task MUST NOT be created unless every extension required to interpret the expected output artifact is mutually declared.** Discovery-time negotiation is the only place this can be enforced cheaply; task-time enforcement is too late and too expensive. ## What Was Observed A client agent (`client-A`) discovered a remote summarization agent (`server-S`). `server-S`'s Agent Card declared: ``` "defaultInputModes": ["text/plain", "application/json"], "defaultOutputModes": ["text/plain"], "capabilities": { "extensions": [ { "uri": "https://vendor.example/ext/structured-citations/v2", "required": true, "params": { "schema": "citations-v2.json" } } ] } ``` The client's capability matcher checked `defaultOutputModes` against its own `acceptedOutputModes` (`["text/plain", "text/markdown"]`), found `text/plain` in the intersection, and created the task. It did **not** inspect `capabilities.extensions[]`, because its matcher treated `required: true` as advisory metadata rather than a hard gate. `server-S` accepted the task (its own admission check only verified input modes), ran a 40-second generation, and returned a `Task` in state `completed` whose `artifacts[0].parts[0]` was: ``` { "kind": "data", "data": { "citations": [ ... ] }, "metadata": { "extension": "https://vendor.example/ext/structured-citations/v2" } } ``` `client-A` had no handler for that extension URI. Its artifact decoder fell through to a generic `data` branch that stringified the payload into the transcript. The citations were silently dropped from the client's downstream synthesis, and the client reported task success. The observable symptom was not an error—it was **a completed task with a lossy artifact**, which is worse, because the loss is invisible to the orchestrator's success metric. A second variant surfaced under retry: because `client-A` marked the task `completed`, its checkpoint recorded the task as done. When a downstream auditor replayed the task from the checkpoint, the replayed artifact was the *stringified* version, not the structured one. Replay divergence between original and audit runs was 100% on the citation field. The checkpoint had captured the lossy projection, not the source artifact. ## Condition of Validity This failure requires all of the following to hold simultaneously: 1. The remote card uses `required: true` on at least one extension in `capabilities.extensions[]`. 2. The client's capability matcher evaluates only `defaultInputModes`/`defaultOutputModes` and treats `extensions[]` as non-binding. 3. The expected artifact type is only interpretable under that extension (i.e., the extension changes artifact *semantics*, not just envelope metadata). 4. The server's task-admission check validates input modes but not the client's declared extension support (there is no reciprocal handshake in the `message/send` payload by default). If (2) is false—the client honors `required: true`—the task is rejected at discovery with a clean `UnsupportedCapability` error and no tokens are spent. If (3) is false—the extension is purely cosmetic—the lossy-projection symptom does not occur. The dangerous quadrant is exactly (2) ∧ (3): a binding extension that the client treats as advisory on an artifact whose meaning collapses without it. ## Decision Boundary The correct boundary is: **extension support is a precondition of task creation, not a property of the artifact.** Concretely: - On discovery, for every extension in the remote card with `required: true`, the client MUST either (a) declare support for that exact `uri` (and, if `params.schema` is present, a compatible schema version), or (b) refuse to create the task. Partial support is not support. - `defaultOutputModes` is a *necessary but not sufficient* condition. The intersection check is a fast reject, never an accept. Acceptance requires the extension gate to pass in addition. - The client MUST send its declared extensions in the task-initiation message (A2A v1.0 `Message.metadata["a2a.extensions"]`), so the server can reject early if the client's declaration is stale relative to the card it read. This closes the TOCTOU window where the server's card changed between discovery and task creation. - On artifact receipt, if an artifact carries `metadata.extension` for a URI the client did not declare, the client MUST fail the task, not fall through to a generic decoder. Silent fallback is the mechanism that converts a negotiation bug into a data-loss bug. The boundary is sharp: there is no "best effort" mode. An agent that cannot honor a required extension is not a degraded peer of that server; it is an incompatible peer, and the correct action is refusal at discovery. ## Operational Effect Enforcing the gate at discovery moves the failure from *post-generation, silent, and replay-divergent* to *pre-generation, loud, and cheap*. In the observed incident, the cost of the wrong boundary was: 40 seconds of server generation, one lossy artifact, one poisoned checkpoint, and a 100% replay divergence on the citation field discovered only during audit—three days later, when the source task could no longer be re-run against the original server state. With the gate, the same interaction terminates in under 200 ms at the discovery step with a typed `UnsupportedCapability` error that the orchestrator can route to a fallback server. The secondary effect is on checkpoint integrity. Because the client now refuses at discovery, no task is created, so no checkpoint is written, so there is nothing for the auditor to replay against a lossy projection. The replay-divergence class of bug is eliminated not by fixing replay but by refusing to create the state that replay cannot faithfully reproduce. The guardrail is therefore a single predicate evaluated before `message/send`: `required_extensions(card) ⊆ declared_extensions(client)`, with schema-version compatibility checked inside the subset relation. Everything else—artifact decoding, checkpointing, replay—can assume the predicate held. ```python from dataclasses import dataclass, field from typing import Optional class ExtensionNegotiationError(RuntimeError): """Raised when a peer's required A2A extension cannot be honored.""" pass @dataclass class Extension: uri: str required: bool schema: Optional[str] = None @dataclass class AgentCard: default_input_modes: list[str] default_output_modes: list[str] extensions: list[Extension] = field(default_factory=list) @dataclass class ClientCapabilities: accepted_output_modes: list[str] declared_extensions: dict[str, Optional[str]] # uri -> supported schema (or None) def assert_task_admissible(card: AgentCard, client: ClientCapabilities) -> None: # Fast reject: no output-mode overlap at all. if not set(card.default_output_modes) & set(client.accepted_output_modes): raise ExtensionNegotiationError( f"No output-mode overlap: server={card.default_output_modes} " f"client={client.accepted_output_modes}" ) # Binding gate: every required extension must be mutually declared # with a compatible schema. Subset relation, not intersection. for ext in card.extensions: if not ext.required: continue if ext.uri not in client.declared_extensions: raise ExtensionNegotiationError( f"Server requires extension {ext.uri!r} (required=true) " f"but client did not declare support; refusing task creation" ) client_schema = client.declared_extensions[ext.uri] if ext.schema is not None and client_schema != ext.schema: raise ExtensionNegotiationError( f"Schema mismatch for {ext.uri!r}: " f"server={ext.schema!r} client={client_schema!r}" ) def decode_artifact(artifact: dict, client: ClientCapabilities) -> dict: ext_uri = artifact.get("metadata", {}).get("extension") if ext_uri is not None and ext_uri not in client.declared_extensions: # Do NOT fall through to a generic decoder; fail the task. raise ExtensionNegotiationError( f"Artifact carries undeclared extension {ext_uri!r}; " f"refusing lossy projection" ) return artifact.get("data", {}) ```