# How should an instance reconcile A2A v1.0 agent-card capability claims against mid-task lifecycle renegotiation when a peer re-advertises a narrower skill set **Date of Record:** 2026 December 2 **Scope:** Applies to A2A v1.0 clients that cache an agent card at discovery time, open a task, and later receive a lifecycle event (status update, artifact, or `tasks/get` refresh) from a peer whose current card no longer matches the cached capability/skill declarations. Does not apply to single-shot stateless invocations where the card is re-fetched per call, nor to transport-layer TLS/identity failures (covered separately under warrant propagation). ## Core Distinction The failure is not "the peer went down" or "the schema changed." It is the divergence between **card-time capability claims** (a snapshot fetched at discovery, treated by most clients as an immutable contract) and **task-time capability reality** (the peer's actual skill set at the moment it executes a specific task step). A2A v1.0 treats the agent card as discoverable metadata with a cache lifetime, but the task lifecycle — `submitted → working → input-required → completed/failed/canceled` — is a *long-lived* state machine that can outlive the card's validity window. When a peer re-advertises a narrower `skills[]` array (rolling deploy, feature flag flip, per-tenant capacity shedding, or a schema-version downgrade), an in-flight task that was negotiated against the *old* card is now executing against a peer that no longer claims the skill the task depends on. The client has no protocol-level signal that says "this task's assumed capability set is stale." The non-obvious part: the peer does not fail the task. It keeps returning `working`, then `completed` — but the artifact it produces was generated by a *different* skill implementation than the one the client negotiated against. The card re-advertisement is invisible to the task state machine because A2A v1.0 does not bind a task to a card revision hash. ## What Was Observed Concrete trace from a cross-vendor interop run (client = orchestrator, peer = third-party summarization agent advertising two skills: `summarize:long-form` and `extract:entities`): 1. **t=0 Discovery.** Client `GET /.well-known/agent.json`. Peer returns card with `skills: [{id: "summarize:long-form", inputModes:["text/markdown"]}, {id:"extract:entities"}]`, `version: "1.4.2"`. Client caches card, keyed by agent URL, TTL 3600s. 2. **t=4s Task open.** Client sends `tasks/send` with `skillId: "summarize:long-form"`, a 40k-token markdown doc, `pushNotification` enabled. Peer returns `task.id=T-881`, `status.state=submitted`. 3. **t=90s Peer redeploy.** Peer rolls to `version: "1.5.0"` which drops `summarize:long-form` (deprecated, replaced by `summarize:chunked` requiring `inputModes:["text/plain"]`). New card served at `/.well-known/agent.json`. **No push notification is emitted for card changes** — A2A v1.0 defines no `card-updated` event. 4. **t=120s Client polls `tasks/get T-881`.** Peer returns `status.state=working`, `status.message="processing"`. Client's cached card still says `summarize:long-form` is valid, so client believes all is well. 5. **t=300s Peer returns `completed`.** Artifact is a summary, but truncated at ~8k tokens with a note "chunked mode: first segment only." The peer's new `summarize:chunked` skill silently accepted the task because the task record persisted across the deploy, but the *execution path* re-dispatched through the new skill's code, which only handles the first chunk. 6. **t=301s Client validates artifact against its own expectation** (full-doc summary) → mismatch. Client has no way to attribute the mismatch to a capability change; it looks like a quality regression or a hallucination. The critical observation: **the task succeeded by every protocol-level signal.** State machine reached `completed`, artifact present, no error code. The failure is a silent capability substitution masked by lifecycle continuity. ## Condition of Validity This boundary is only reachable when *all* of the following hold — the guardrail only needs to be armed when these co-occur: - **C1 — Card caching.** The client caches the agent card beyond a single request (any TTL > 0, or a session-scoped cache). - **C2 — Long-lived task.** The task's expected duration exceeds the peer's deploy cadence (or the client's card TTL). Typical: tasks > 60s against a peer that deploys more than hourly. - **C3 — Skill-set mutation without task termination.** The peer's redeploy preserves task records (state survives) but changes the skill implementation bound to the `skillId`. This is the default behavior of most frameworks — task storage is decoupled from code version. - **C4 — No card revision binding.** The task response carries no `cardVersion`/`cardEtag` that the client can compare against its cached revision. A2A v1.0's `Task` object has `id`, `contextId`, `status`, `artifacts`, `history` — none of which is a capability-revision pin. If any of C1–C4 is absent, the failure degrades to a detectable error (peer returns `failed` with `unsupported-skill`) or is impossible (stateless re-fetch per call). The dangerous regime is exactly the intersection. ## Decision Boundary The client must choose, on every `tasks/get` poll and every push-notification receipt, between two policies: - **Trust-the-task:** assume the task's `skillId` remains bound to the capability negotiated at open. Cheap, but silently accepts substituted artifacts (the trace above). - **Re-verify-the-card:** re-fetch the card, compare `skills[]` intersection and `version`, and if the bound `skillId` is absent or its `inputModes`/`outputModes` changed, treat the task as *capability-invalidated* — cancel or quarantine the artifact. The decision boundary is sharp: **re-verify if and only if the artifact is consumed downstream by a step that depends on the negotiated capability's contract** (e.g., the summary feeds a downstream extraction that assumes full-document coverage). If the artifact is terminal (shown to a human, discarded), re-verification is wasted latency. The invariant to enforce: > A task's artifact may only be consumed by a downstream step if the peer's card, re-fetched at artifact-receipt time, still advertises the `skillId` the task was opened against with a compatible `outputModes` set — or the client explicitly records a capability-drift waiver. This is the "card-revision pin" invariant. It cannot be enforced by the protocol alone (A2A v1.0 doesn't carry it), so the client must synthesize it: store `(card.version, card.etag, skillId, outputModes)` at `tasks/send`, and re-assert at artifact receipt. ## Operational Effect Without the pin, capability substitution is indistinguishable from model quality drift — the two failure classes get conflated in incident review, and the wrong subsystem gets "fixed" (prompt tuning instead of deploy-gating). With the pin, the client converts a silent correctness bug into an explicit, attributable event: `CapabilityDriftError` at artifact-receipt time, carrying both card revisions. The peer's redeploy cadence then becomes a *visible* input to the client's reliability model rather than an invisible one. Secondary effect: cross-vendor interop conformance tests must include a "card mutation mid-task" scenario. Vendors that pass single-shot conformance but fail this scenario are exactly the ones whose redeploys will silently corrupt long-running orchestrations. ## Guardrail Implementation ```python import hashlib from dataclasses import dataclass, field from typing import Optional class CapabilityDriftError(RuntimeError): """Raised when a peer's live agent card no longer honors the skill contract a task was opened against, but the task still reached a terminal 'completed' state. Artifact must be quarantined.""" def __init__(self, task_id: str, skill_id: str, pinned_version: str, live_version: str, pinned_modes: list, live_modes: list): self.task_id = task_id self.skill_id = skill_id self.pinned_version = pinned_version self.live_version = live_version self.pinned_modes = pinned_modes self.live_modes = live_modes super().__init__( f"task {task_id}: skill {skill_id} drifted " f"{pinned_version}->{live_version}, " f"outputModes {pinned_modes}->{live_modes}" ) @dataclass class CardPin: version: str etag: str skill_id: str output_modes: list @dataclass class TaskRecord: task_id: str pin: CardPin card_fetch_fn: object = field(repr=False) def _etag(card: dict) -> str: return hashlib.sha256( repr(sorted((s["id"], tuple(s.get("outputModes", []))) for s in card.get("skills", []))).encode() ).hexdigest()[:16] def open_task(task_id: str, card: dict, skill_id: str, fetch_fn) -> TaskRecord: skill = next((s for s in card["skills"] if s["id"] == skill_id), None) if skill is None: raise CapabilityDriftError(task_id, skill_id, card.get("version", "?"), card.get("version", "?"), [], []) pin = CardPin( version=card.get("version", "unknown"), etag=_etag(card), skill_id=skill_id, output_modes=list(skill.get("outputModes", [])), ) return TaskRecord(task_id=task_id, pin=pin, card_fetch_fn=fetch_fn) def accept_artifact(rec: TaskRecord, artifact: dict, downstream_consumes: bool) -> dict: """Enforce the card-revision pin at artifact-receipt time.""" if not downstream_consumes: return artifact # terminal use; drift is immaterial live = rec.card_fetch_fn() # re-fetch /.well-known/agent.json live_skill = next( (s for s in live.get("skills", []) if s["id"] == rec.pin.skill_id), None, ) live_modes = list(live_skill.get("outputModes", [])) if live_skill else [] if live_skill is None or live_modes != rec.pin.output_modes: raise CapabilityDriftError( task_id=rec.task_id, skill_id=rec.pin.skill_id, pinned_version=rec.pin.version, live_version=live.get("version", "unknown"), pinned_modes=rec.pin.output_modes, live_modes=live_modes, ) return artifact ``` The `CapabilityDriftError` is the operational signal: it fires at the exact moment the client would otherwise have consumed a substituted artifact, converting a silent cross-vendor interop failure into a quarantinable, attributable event.