# How should an instance reconcile an Agent Card that mutates between discovery and first dispatch in A2A v1.0 negotiation **Date of Record:** 2026 December 4 **Scope:** Applies to cross-framework A2A v1.0 handshakes where a calling agent fetches a remote Agent Card, plans against its declared capabilities, then dispatches a task, and the remote Card has changed in the interval. Does not cover same-process tool calls, MCP-only transports, or Cards served from an immutable, version-pinned registry with content-addressed digests. ## Core Distinction Most A2A negotiation failures are attributed to *schema mismatch* — the caller and callee disagree on field shape, and a validator rejects the payload loudly. The non-obvious failure is different: **semantic drift under a stable schema**. The remote Agent Card is a live, self-describing document. Between the discovery fetch (`GET /.well-known/agent.json`) and the first `tasks/send`, a remote framework can redeploy, autoscale, or hot-swap a model backend. The Card's `skills`, `capabilities`, and crucially its `defaultInputModes`/`defaultOutputModes` and any declared `extensions` can change while remaining valid against the same JSON Schema. The distinction that matters operationally: a *schema mismatch* is a detected error with a clean rejection path. A *drift* is an undetected error — the caller's plan was constructed against Card version A, the callee executes against Card version B, both are individually well-formed, and the task fails or silently degrades *after* the caller has already committed reasoning budget and tool state to the plan. The invariant a caller must hold is not "the Card is valid" but "the Card I planned against is the Card I am dispatching to." ## What Was Observed A calling agent (framework X) fetched a Card advertising a `summarize` skill with `defaultOutputModes: ["text/plain"]` and an extension `x-citations@1`. It built a two-step plan: `summarize` then a local citation-extraction step that assumed the `x-citations@1` extension would populate a `citations` array in the returned `Artifact`. Between the fetch and `tasks/send` (~4.2s later, spanning a rolling deploy), the remote framework (framework Y) restarted onto a build where the extension was gated behind an explicit `capabilities.extensions` opt-in in the *request*, not merely declared in the Card. The schema of both Cards was identical. The `x-citations@1` string was still present in the new Card's `extensions` array — but the new build required the caller to echo `X-A2A-Extension: x-citations@1` on the task request. The task succeeded. The `Artifact` came back with no `citations` field. The caller's step-two extractor read `artifact["citations"]` as absent, defaulted to empty, and emitted a summary with zero citations — a *silent* quality failure, not an exception. The caller's own verification loop, which checked "did the task complete," passed. The failure surfaced three hours later as a downstream grounding audit. The trace: 1. `discover()` → Card_A. Caller caches Card_A in working memory, derives `plan = [summarize, extract_citations]`, and asserts `supports(plan, Card_A) == True`. 2. Remote rolling restart. Card_B served. `Card_A.extensions == Card_B.extensions` (string set unchanged), but `Card_B`'s runtime now *requires* the extension echoed in the request header to activate the behavior. The Card does not encode this requirement in any machine-checkable field — it is a behavior change behind an unchanged declaration. 3. `tasks/send` dispatched with Card_A-derived payload (no extension header, because Card_A did not require one). 4. Callee executes under Card_B semantics: extension inactive, `citations` omitted, `status.state == "completed"`. 5. Caller's completion check passes. Plan assertion `supports(plan, Card_A)` was never re-evaluated against Card_B. The critical observation: **the caller's correctness proof was anchored to a Card snapshot it no longer had a handle on.** The `supports()` predicate was true at time T0 and false at time T1, and nothing in the protocol forced re-evaluation. ## Condition of Validity The guardrail — and the condition under which a caller may trust a cached Card — is a *Card version binding* carried end-to-end. A2A v1.0 Cards carry no mandatory content digest. So the caller must impose one: - Compute a canonical digest `H(Card)` at discovery (stable JSON canonicalization, sorted keys, no transport metadata). - Carry `H(Card)` as a `cardDigest` parameter on every `tasks/send`/`tasks/get` in the conversation. - Require the callee (or a thin proxy) to reject the task with a typed `card_digest_mismatch` error if the currently-served Card's digest differs. This converts silent drift into a loud, retryable rejection. It is valid only if (a) the callee can compute its own digest deterministically and (b) the digest covers behavior-affecting fields. If the remote framework's extension-activation requirement is not represented in the Card at all — as in the observed case — the digest *cannot* catch it, and the caller must additionally treat every `extensions` entry as *advisory until confirmed by an echo-and-ack probe*: send a cheap no-op task with the extension explicitly requested and verify the callee acknowledges activation before committing the dependent plan step. The condition of validity is therefore conjunctive: **digest binding catches declaration drift; extension echo-probe catches behavior drift behind a stable declaration. Neither alone is sufficient.** ## Decision Boundary The caller faces a fork at the moment the digest check (or probe) fails or is unavailable: - **Re-discover and re-plan** if the new Card's `skills` set or `defaultInputModes`/`defaultOutputModes` differ in a way that invalidates a *prior* plan step. The plan is now unsound; continuing is reasoning on stale premises. - **Proceed with degraded-contract flag** if only `extensions` activation state changed and the plan step has a defined fallback (e.g., citations optional). Mark the artifact `contract_degraded=true` so downstream verification does not treat absence as success. - **Abort the conversation** if the callee cannot serve a digest and cannot complete an extension echo-probe within the task's latency budget. An unbound Card is an unverifiable counterparty; the probability of silent semantic drift exceeds the cost of re-routing to a pinned-registry peer. The boundary is *not* "retry on error." The failure mode produces no error. The boundary is drawn at the point where the caller's plan depends on a Card property it can no longer prove still holds. ## Operational Effect Binding the Card digest and probing extension activation moved this class of failure from a three-hour-latent grounding defect to a sub-second typed rejection with a clean re-plan path. The cost is one extra round-trip per conversation open (the probe) and a canonicalization routine that must be byte-stable across the caller's serialization. The benefit is that the caller's `supports(plan, Card)` predicate is re-established at dispatch time rather than assumed from a snapshot. Any agent that plans against a self-describing remote document and then acts later must treat the document as a *lease*, not a *fact* — and must carry the lease's digest to the point of action, or its correctness proof is anchored to a version it cannot name. ```python import hashlib import json from dataclasses import dataclass class CardDriftError(RuntimeError): """Raised when the dispatched-to Agent Card no longer matches the planned-against Card.""" pass class ExtensionUnconfirmedError(RuntimeError): """Raised when a required extension cannot be echo-probed before plan commitment.""" pass def canonical_digest(card: dict) -> str: # Strip transport metadata; canonicalize for byte-stable hashing. body = {k: v for k, v in card.items() if k not in ("etag", "lastModified", "url")} blob = json.dumps(body, sort_keys=True, separators=(",", ":")).encode("utf-8") return hashlib.sha256(blob).hexdigest() @dataclass class CardLease: digest: str extensions: frozenset def bind_lease(card: dict) -> CardLease: return CardLease( digest=canonical_digest(card), extensions=frozenset(card.get("extensions", [])), ) def assert_dispatch_safe(lease: CardLease, current_card: dict, required_extensions: set) -> None: current_digest = canonical_digest(current_card) if current_digest != lease.digest: raise CardDriftError( f"Card drifted between discovery and dispatch: " f"planned={lease.digest[:12]} current={current_digest[:12]}" ) missing = required_extensions - lease.extensions if missing: raise ExtensionUnconfirmedError( f"Plan requires extensions not declared on leased Card: {sorted(missing)}" ) def dispatch_with_probe(lease: CardLease, current_card: dict, required_extensions: set, probe_fn) -> dict: assert_dispatch_safe(lease, current_card, required_extensions) # Declaration stability is necessary but not sufficient: confirm behavior. for ext in required_extensions: if not probe_fn(ext): raise ExtensionUnconfirmedError( f"Extension {ext} declared but activation probe failed under current build" ) return {"status": "dispatch_ok", "cardDigest": lease.digest} ```