# Where must an instance refuse a downgraded A2A extension profile before it silently forks its own execution semantics? **Date of Record:** 2026 November 20 **Scope:** Applies to any A2A v1.0 peer that negotiates capability via `AgentCard.extensions` and then executes a task whose semantics depend on an extension (e.g., streaming deltas, artifact versioning, structured tool-call envelopes). Does not apply to stateless request/response agents that declare no extensions and never persist peer capability state. ## Core Distinction The failure is not a handshake rejection. It is a **silent semantic fork**: the client agent reads the remote `AgentCard`, finds the extension it wants is *absent or version-mismatched*, but because A2A v1.0 treats `extensions` as an advisory map rather than a hard capability contract, the client proceeds under its *local* interpretation of the base protocol. The two agents then run different state machines against the same task ID. The base protocol says "task accepted." The extension said "task accepted *with delta-ordered artifact streaming and monotonic sequence numbers*." The client gets a base-compliant `TaskStatusUpdateEvent` and assumes ordering guarantees that the server never promised. From that instant, every downstream reasoning step operates on a falsely-typed event stream. The invariant that must hold: **an agent's execution semantics are a function of the intersection of declared extensions, not the union of its own assumptions.** When the intersection is strictly smaller than the set of extensions the agent's planner requires, the agent must hard-fail the negotiation, not degrade. ## What Was Observed A client agent (`planner`) built a task plan that required three extension capabilities: `a2a.ext.streaming.v1` (incremental token deltas), `a2a.ext.artifact.versioning.v1` (monotonic artifact revisions), and `a2a.ext.toolcall.structured.v1` (typed tool-call envelopes). It fetched the remote `AgentCard` and matched on extension *name* only, not on `version` or `required` flags — a common bug because the v1.0 schema puts `version` and `required` inside each extension object but many SDKs surface only the key. The remote declared `a2a.ext.streaming.v1` with `required: false` and `version: "1.0.0"`, but **omitted** `artifact.versioning` and declared `toolcall.structured` at `version: "0.9.0"` (a pre-release whose envelope schema differs in two fields). The client's matcher accepted the card because the *names* it saw were a superset of what it needed — except it never checked versions and never noticed `required: false` meant the server could *drop* the extension at runtime. Execution proceeded. At step 4, the server emitted a `TaskArtifactUpdateEvent` with `append: false` (base-protocol legal) where the client's planner had assumed `append: true` semantics from the versioning extension. The client's artifact assembler overwrote a prior revision instead of appending, silently losing a tool-call record. The planner's next reasoning step read the truncated artifact, concluded the tool had not been invoked, and re-invoked it. The server, which had no idempotency key (that lived in the structured tool-call envelope the client had downgraded), executed the side effect twice. The trace is a clean **capability-assumption divergence**: `client_required_extensions ⊄ server_declared_extensions_at_matching_version`. The gap was two version fields and one `required` flag. ## Condition of Validity This failure is only possible when three conditions co-occur: 1. The extension is **semantically load-bearing** — the client's plan cannot be correctly executed without it. Streaming-only extensions are usually safe to degrade; artifact-ordering, idempotency-key, and envelope-typing extensions are not. 2. The negotiation surface is **name-keyed, not version-keyed**. If the matcher compares `(name, version, required)` tuples, the failure is caught at handshake. 3. The server is permitted to **omit or downgrade** a `required: false` extension at runtime. A2A v1.0 allows this; the client must treat `required: false` as "may vanish mid-task," which means the client's plan must have a defined behavior for the extension disappearing between `message/send` and `tasks/get`. When any one condition is absent — the extension is cosmetic, or the matcher is version-strict, or the server guarantees extension stability for the task lifetime — the failure does not manifest. The dangerous zone is exactly the intersection: **load-bearing extension, name-only matcher, droppable declaration.** ## Decision Boundary The boundary is not "reject if extension missing." That over-rejects on cosmetic extensions and breaks interop with older peers. The boundary is: > **If the planner's execution graph contains a node whose correctness predicate references an extension, that extension must be present at a version-compatible range and must be `required: true` (or the client must have a proven-equivalent local fallback). Otherwise the negotiation must raise before the first `message/send`.** Concretely, the client must compute, per extension, a three-way classification: - **Hard-required**: no fallback exists; version must match within declared range; `required` must be `true` on the server card. Absence → abort negotiation. - **Soft-required**: a deterministic fallback exists (e.g., poll `tasks/get` instead of streaming). Absence → record the degradation in task metadata and switch the plan node to the fallback path *before* sending. - **Advisory**: no execution dependency. Absence is ignored. The failure above occurred because `artifact.versioning` was treated as advisory when it was hard-required, and `toolcall.structured` was version-matched on name only. The guardrail is to **fail closed on hard-required extensions and to log the exact `(name, declared_version, required_flag)` triple that caused the abort**, so the operator can distinguish a genuinely incapable peer from a misconfigured card. ## Operational Effect The downstream effect is **duplicate side effects under a base-compliant trace**. Because every individual event the server emitted was legal A2A v1.0, no protocol validator flags the run. The corruption is only visible when you correlate the client's artifact revisions against the server's actual tool invocations — which requires the very idempotency envelope that was downgraded. This is the operational trap: the audit mechanism and the failure mechanism are the same extension. The bounded fix is to make negotiation a **pre-execution gate with a typed refusal**, not a best-effort matcher. The gate returns either a fully-resolved capability set (every hard-required extension confirmed at a compatible version with `required: true`) or raises, and the raise carries the full mismatch detail. The planner is never allowed to start with a partially-resolved set. This converts a silent semantic fork into a loud, attributable handshake failure — which is the only recoverable form, because a forked execution cannot be reconciled after the fact. ```python from dataclasses import dataclass from typing import Mapping class CapabilityNegotiationError(RuntimeError): """Raised when a hard-required A2A extension cannot be satisfied.""" pass @dataclass(frozen=True) class ExtensionDecl: name: str version: str required: bool # server's flag: may the extension vanish mid-task? # What the planner's execution graph actually depends on. HARD_REQUIRED = { "a2a.ext.streaming.v1": ">=1.0.0,<2.0.0", "a2a.ext.artifact.versioning.v1": ">=1.0.0,<2.0.0", "a2a.ext.toolcall.structured.v1": ">=1.0.0,<2.0.0", } def _version_in_range(version: str, spec: str) -> bool: # Simplified: real impl uses packaging.specifiers. lo = spec.split(",")[0].lstrip(">=") hi = spec.split(",")[1].lstrip("<") return lo <= version < hi def negotiate(server_card_extensions: Mapping[str, ExtensionDecl]) -> dict[str, str]: resolved: dict[str, str] = {} for name, spec in HARD_REQUIRED.items(): decl = server_card_extensions.get(name) if decl is None: raise CapabilityNegotiationError( f"hard-required extension {name!r} absent from AgentCard; " f"planner cannot execute without it" ) if not decl.required: raise CapabilityNegotiationError( f"extension {name!r} declared required=false on server; " f"it may vanish mid-task and fork execution semantics" ) if not _version_in_range(decl.version, spec): raise CapabilityNegotiationError( f"extension {name!r} version {decl.version!r} outside " f"required range {spec!r}; envelope schema may differ" ) resolved[name] = decl.version return resolved def start_task(server_card_extensions: Mapping[str, ExtensionDecl]) -> None: caps = negotiate(server_card_extensions) # raises before any message/send # Only reached with a fully-resolved, version-pinned capability set. _ = caps ```