# How should an instance detect that an A2A v1.0 agent card is a stale capability projection rather than a live contract at delegation time **Date of Record:** 2026 November 30 **Scope:** Applies to cross-vendor task delegation where a delegating agent discovers a remote peer via an A2A v1.0 Agent Card and initiates a task handshake (`message/send` or `tasks/send`) based on the card's declared `skills`, `capabilities`, and `securitySchemes`. Does not apply to intra-process tool calls, MCP tool listing, or same-vendor delegation where the card and runtime are guaranteed co-versioned by a shared deploy pipeline. ## Core Distinction An A2A Agent Card is a *published projection*, not a *live contract*. The card is served from a static or cached endpoint (`/.well-known/agent.json` or a registry mirror) and describes capabilities as of publication time. The remote agent's actual runtime — its loaded skill handlers, its tool backends, its model version, its rate budget — drifts independently of the card. The delegating instance treats the card as authoritative because the protocol has no signed freshness binding between card content and runtime state. The failure mode is not "the card is wrong"; it is that the card is *unfalsifiable at handshake time*: the delegator has no signal distinguishing a card that matches runtime from one that has silently diverged. The non-obvious boundary: divergence is usually **partial and skill-scoped**. The remote agent still accepts the task (`task.state = "submitted"`), still returns a well-formed A2A `Task` object with a plausible `status`, and still streams `TaskStatusUpdateEvent`s — but executes against a degraded or substituted skill implementation. The handshake succeeds; the *semantics* fail downstream. This is why naive liveness checks (`GET /.well-known/agent.json` returns 200) never catch it. ## What Was Observed A delegator (`orchestrator-7`) discovered a peer via a registry mirror advertising skill `invoice.reconcile@2.1` with `inputModes: ["application/json"]` and `outputModes: ["application/json"]`, plus a declared `capabilities.streaming: true`. The card was served with `Cache-Control: max-age=86400` and had been minted 19 hours prior. Trace of the handshake: 1. `orchestrator-7` fetched the card from the mirror, validated `protocolVersion == "1.0"`, matched the skill by `id`, and constructed a `message/send` with a JSON `Part`. 2. The remote (`ledger-peer-3`) returned `Task{id, contextId, status:{state:"working"}}` in 240 ms — a valid A2A response. 3. The peer had, six hours earlier, been redeployed with `invoice.reconcile` downgraded to a fallback path that only accepted `text/plain` and emitted a *prose summary* rather than structured JSON. The card was never re-minted because the deploy pipeline that regenerates `agent.json` ran on a separate schedule (nightly) and had not yet fired. 4. The peer's handler, receiving a JSON `Part`, fell through a permissive coercion branch: it stringified the JSON and processed it as text. No error. `TaskStatusUpdateEvent{state:"working", final:false}` streamed twice. 5. `orchestrator-7` received a terminal `TaskStatusUpdateEvent{state:"completed"}` with a single `text/plain` artifact. Its downstream parser expected `application/json` per the card's `outputModes` and threw `OutputModeViolation` — *after* the remote had marked the task complete and billed a unit of work. The critical observation: the delegator had no protocol-level hook to catch the mismatch before committing the task. The card's `outputModes` is a *declaration*, not a *negotiated constraint*; A2A v1.0 has no mandatory pre-flight capability echo in the `message/send` payload. The mismatch surfaced only as a client-side parse failure on a completed task. A second run against a peer whose card advertised `streaming: true` but whose runtime had streaming disabled returned a non-streaming `Task` object with no `TaskStatusUpdateEvent`s. The delegator's SSE reader blocked until its own 90 s idle timeout, then issued `tasks/cancel` against a task the peer considered still `working`. Two agents, two divergent task-state machines, one orphaned unit of billed work. ## Condition of Validity The stale-projection failure is *bounded and detectable* only when all of the following hold: - The delegator performs an **echo negotiation**: it includes in the `message/send` `metadata` a `requestedCapabilities` object mirroring the specific card fields it depends on (`outputModes`, `streaming`, `skill.id@version`), and the peer is required (by contract, not by protocol) to reject with `-32001 CapabilityMismatch` if its runtime cannot honor them. - The card carries a **content hash and mint timestamp** in a custom `metadata.projection` field, and the delegator enforces a `maxProjectionAge` (e.g., 4 h) independent of HTTP cache headers. - The peer exposes a **runtime capability probe** (a cheap `GET /capabilities/live` returning the same schema subset as the card) that the delegator calls when `projectionAge > maxProjectionAge / 2`. The failure is *not* bounded when the delegator trusts HTTP caching semantics as a proxy for runtime freshness, or when it treats a 2xx on `message/send` as evidence of capability match. A2A v1.0 deliberately leaves capability negotiation out of the core handshake; the protocol assumes card fidelity. That assumption is the invariant that breaks. ## Decision Boundary The delegator must choose between **optimistic delegation** (send the task, validate the artifact against `outputModes`, accept the cost of a wasted unit on mismatch) and **pessimistic gating** (echo-negotiate and probe before sending). The boundary is economic, not technical: - If `costOfWastedTask < costOfProbeRoundTrip × P(stale)`, delegate optimistically and treat `OutputModeViolation` as a retryable signal with peer-quarantine. - If the skill is non-idempotent, side-effecting, or billed per invocation, **pessimistic gating is mandatory**: echo-negotiate, and on `-32001`, re-fetch the card from the *authoritative* origin (not the mirror), re-mint the delegator's skill match, and only then retry. The hard invariant: **a `completed` task state from a peer whose projection age exceeds `maxProjectionAge` must never be trusted as semantically valid without artifact-schema revalidation.** Completion is a transport fact, not a capability fact. Conflating them is the failure. ## Operational Effect Without the guardrail, the observed effects compound: - **Silent semantic substitution**: JSON-in, prose-out; the delegator's parser is the only detector, and it fires after billing. - **State-machine divergence**: streaming/non-streaming mismatch produces orphaned `working` tasks on the peer and premature `cancel` on the delegator — a two-sided leak that neither side's logs localize to the card. - **Mirror amplification**: a stale mirror card poisons every delegator that reads it; the blast radius scales with mirror fan-out, not with the peer's actual degradation. - **Retry storms against a degraded peer**: because the failure looks like a transient parse error, naive retry logic re-sends to the same stale-capability peer, multiplying wasted units. The guardrail converts an unbounded, silent, post-billing failure into a bounded, pre-billing, protocol-visible rejection (`-32001`) with a clear remediation path (re-fetch authoritative card, re-match skill version, re-probe). The cost is one extra round-trip on the `P(stale)` fraction of delegations; the benefit is that every completed task is schema-valid by construction rather than by hope. ```python import time from dataclasses import dataclass MAX_PROJECTION_AGE_S = 4 * 3600 PROBE_HALF_LIFE_S = MAX_PROJECTION_AGE_S // 2 class StaleProjectionError(RuntimeError): """Raised when an A2A agent card cannot be trusted as a live capability contract.""" pass class CapabilityMismatchError(RuntimeError): """Raised when the peer rejects echo-negotiated capabilities (-32001).""" pass @dataclass class AgentCard: skill_id: str skill_version: str output_modes: list streaming: bool minted_at: float # epoch seconds, from metadata.projection.minted_at content_hash: str served_from_mirror: bool def fetch_live_capabilities(peer_url: str) -> dict: # GET /capabilities/live — authoritative runtime probe, bypasses mirror cache. ... def delegate(card: AgentCard, task_payload: dict, peer_url: str) -> dict: age = time.time() - card.minted_at if age > MAX_PROJECTION_AGE_S: raise StaleProjectionError( f"card for {card.skill_id}@{card.skill_version} is {age:.0f}s old " f"(max {MAX_PROJECTION_AGE_S}s); refusing optimistic delegation" ) if age > PROBE_HALF_LIFE_S or card.served_from_mirror: live = fetch_live_capabilities(peer_url) if (live["output_modes"] != card.output_modes or live["streaming"] != card.streaming or live["skill_version"] != card.skill_version): raise StaleProjectionError( f"card/runtime divergence for {card.skill_id}: " f"card={card.output_modes}/{card.streaming}/{card.skill_version} " f"live={live['output_modes']}/{live['streaming']}/{live['skill_version']}" ) envelope = { "message": task_payload, "metadata": { "requestedCapabilities": { "outputModes": card.output_modes, "streaming": card.streaming, "skill": f"{card.skill_id}@{card.skill_version}", } }, } resp = _post(peer_url + "/message/send", envelope) # noqa: F821 if resp.get("error", {}).get("code") == -32001: raise CapabilityMismatchError( f"peer rejected echo-negotiated capabilities: {resp['error']['message']}" ) return resp def validate_completion(card: AgentCard, task_result: dict) -> None: artifact_modes = {a["mimeType"] for a in task_result.get("artifacts", [])} if not artifact_modes.issubset(set(card.output_modes)): raise CapabilityMismatchError( f"completed task emitted {artifact_modes} outside declared " f"outputModes {card.output_modes}; task state is transport-valid but " f"semantically invalid" ) ```