# When must an instance reject a peer's Agent Card: schema-version skew and the delegation-warrant continuity invariant in A2A v1.0 discovery **Date of Record:** 2026 November 22 **Scope:** Applies to cross-vendor task delegation where a client agent resolves a remote peer via an A2A v1.0 Agent Card (`/.well-known/agent.json`) and constructs a `tasks/send` or `tasks/sendSubscribe` envelope from that card's declared `skills`, `capabilities`, and `securitySchemes`. Does not cover intra-vendor delegation where client and server share a card registry and schema version, nor does it cover transport-layer TLS failures. ## Core Distinction The distinction that matters is between **card-parseable** and **card-delegable**. An Agent Card can be syntactically valid JSON, pass a permissive schema validator, and still describe a delegation contract the client cannot honor — because the card's `protocolVersion`, its `capabilities.streaming`/`pushNotifications` flags, and its `skills[].inputModes`/`outputModes` are *assertions about the server's runtime*, not invariants the client can verify before dispatch. The failure mode is not a malformed card. It is a **well-formed card whose declared contract silently diverges from the runtime contract at the moment of dispatch**, producing a delegation that the client believes is warranted and the server executes under different assumptions. The invariant to preserve is *delegation-warrant continuity*: every field the client relies on to construct the task envelope must be either (a) re-asserted by the server in the response, or (b) treated as advisory and renegotiated before the task is marked in-flight. ## What Was Observed A client agent (vendor A, A2A v1.0, schema draft `2024-11`) resolved a peer card from vendor B advertising `protocolVersion: "1.0"`, `capabilities.streaming: true`, and a single skill `summarize-document` with `inputModes: ["text/plain"]`, `outputModes: ["text/plain"]`. The client constructed a `TaskSendParams` with a `Message` whose `parts` contained one `TextPart`, opened an SSE subscription via `tasks/sendSubscribe`, and awaited `TaskStatusUpdateEvent` frames. Three divergences appeared in sequence: 1. **Capability flag drift.** The server's actual runtime had `streaming` disabled (feature-flagged off for that tenant) but the card was served from a static CDN cache with a 24h TTL. The client's `sendSubscribe` received a `200` with `Content-Type: application/json` and a single terminal `Task` object rather than an event stream. The client's SSE parser treated the non-`text/event-stream` response as an empty stream and blocked on `await` until its own 90s timeout, then emitted a `Task` in `submitted` state that the server had already completed and garbage-collected. 2. **Input-mode mismatch under normalization.** The client sent `text/plain`. The server's skill handler expected `text/markdown` and applied a lossy plaintext-to-markdown normalizer that stripped numbered-list structure before the summarizer ran. The output was schema-valid `text/plain` and the task reported `completed`. The client accepted it. The semantic loss was invisible at the protocol layer. 3. **Security-scheme re-binding.** The card declared `securitySchemes: { "oauth2": { flows: { clientCredentials: { tokenUrl: "https://b.example/token", scopes: { "tasks:write": "..." }}}}}`. Mid-delegation, vendor B rotated its token endpoint to a regional host and the original `tokenUrl` began returning `403`. The client's cached card still pointed at the dead endpoint; its retry loop re-fetched a token, failed, and re-issued the *same* task id — which the server, having already executed the first attempt, rejected as a duplicate idempotency key with `-32602 Invalid params`. The client interpreted `-32602` as a schema error and re-validated its (correct) envelope, looping. The trace shows the compound failure: **the card is a snapshot of a contract, but delegation is a transaction against a live contract.** Every field the client used to build the envelope was true when the card was fetched and false, or differently-scoped, when the task executed. The client had no mechanism to distinguish "server rejected my envelope" from "server's card lied." ## Condition of Validity The following invariant must hold for a client to treat a resolved card as delegation-warranting: > For every field `f` in the card that the client reads to construct the task envelope, either `f` is re-asserted in the server's first response frame (a `Task` or `TaskStatusUpdateEvent` that echoes the negotiated `protocolVersion`, `acceptedOutputModes`, and the security context under which the task runs), **or** the client must treat `f` as advisory and perform an explicit capability-negotiation round-trip (`tasks/get` on a probe task, or a card re-fetch with `Cache-Control: no-cache` and an `ETag`/`If-None-Match` check) before transitioning the task to `working`. This condition fails — and the client must refuse delegation — when any of the following hold: - The card's `protocolVersion` major differs from the client's, *even if* a lenient semver comparator accepts it. A2A v1.0's `capabilities` object is not forward-compatible across majors: unknown capability keys are not ignorable, because a client that ignores an unknown `capabilities.*` key may construct an envelope that violates a server-side precondition. - The card was served with a cache TTL exceeding the client's task timeout, and the client has no re-validation path. A card with `max-age` greater than the delegation window is a stale-contract hazard. - The card declares `securitySchemes` whose `tokenUrl`/`authorizationUrl` are not on the same origin as the card's `url`, and the client cannot re-fetch the card on a `401`/`403` before retrying. Cross-origin security endpoints are the highest-drift field in practice. - `skills[].inputModes` and the client's `Message.parts` media types intersect only under a normalization the client did not request. Overlap is not compatibility; the client must require exact media-type match or an explicit `acceptedOutputModes` echo. ## Decision Boundary The boundary is between **optimistic delegation** (fetch card once, dispatch, trust the response) and **warranted delegation** (fetch card, dispatch a probe or re-validate on first divergence, bind the task to the server's echoed contract). The decision rule: ``` if card.protocolVersion.major != client.protocolVersion.major: reject (no delegation) elif card.cache_max_age > client.task_timeout: require re-validation before dispatch elif not exact_media_type_match(card.skills[task.skill].inputModes, envelope.parts): reject or renegotiate elif card.securitySchemes.tokenUrl.origin != card.url.origin: require card re-fetch on 401/403 before retry else: dispatch, and bind task state to server's first response frame ``` The critical, non-obvious clause is the **cache-TTL vs. task-timeout comparison**. Most implementations validate the card at fetch time and never again. But the card's authority to warrant delegation expires at `fetch_time + max_age`, and if that instant precedes `fetch_time + task_timeout`, the client is delegating against a contract that may have changed before the task completes. The guardrail is to treat card freshness as a *lease* that must outlive the task, or to force re-validation. A card whose `Cache-Control: max-age=86400` is used to warrant a 120s task is fine only if the client re-checks on any divergence signal; a card used to warrant a 3600s task is not, because the server may rotate its token endpoint, flip a capability flag, or redeploy a skill handler mid-task. ## Operational Effect The observable consequence of missing this boundary is **silent semantic corruption plus retry storms**. The client receives `completed` tasks whose outputs were produced under a different contract than the one it warranted, and it has no signal to distinguish these from correct completions — the protocol layer reports success. When the drift surfaces as an error (`-32602`, `401`, timeout), the client's retry logic re-issues against the stale card, producing duplicate-idempotency rejections and, in the streaming case, orphaned tasks the server has already reaped. The fix is not a better schema validator; it is to make the card a *negotiable* artifact: re-fetch on divergence, bind task state to the server's echoed contract, and treat every card field the client did not see re-asserted in the first response frame as advisory. The invariant that bounds the failure is delegation-warrant continuity — a task may only be marked `working` once the server has confirmed, in-band, the contract the client used to build it. ```python import time from dataclasses import dataclass from typing import Optional class DelegationWarrantError(RuntimeError): """Raised when a resolved Agent Card cannot warrant a task delegation.""" pass @dataclass class AgentCard: protocol_version: str # e.g. "1.0" url: str cache_max_age: int # seconds, from Cache-Control streaming: bool input_modes: list[str] token_url: str fetched_at: float # monotonic seconds @dataclass class TaskEnvelope: skill: str parts_media_types: list[str] task_timeout: int # seconds def major(version: str) -> int: return int(version.split(".")[0]) def assert_warrantable( card: AgentCard, envelope: TaskEnvelope, client_protocol_version: str, now: Optional[float] = None, ) -> None: """ Enforce delegation-warrant continuity before dispatching a task. Raises DelegationWarrantError on any condition that voids the warrant. """ now = now if now is not None else time.monotonic() if major(card.protocol_version) != major(client_protocol_version): raise DelegationWarrantError( f"protocol major skew: card={card.protocol_version} " f"client={client_protocol_version}; capabilities are not " f"forward-compatible across majors" ) if card.cache_max_age > envelope.task_timeout: # Card lease expires before task could complete; require re-validation. raise DelegationWarrantError( f"card lease {card.cache_max_age}s exceeds task timeout " f"{envelope.task_timeout}s; re-fetch with ETag before dispatch" ) if not set(card.input_modes) & set(envelope.parts_media_types): raise DelegationWarrantError( f"no exact media-type overlap: card={card.input_modes} " f"envelope={envelope.parts_media_types}" ) card_origin = card.url.split("/")[0:3] token_origin = card.token_url.split("/")[0:3] if card_origin != token_origin: raise DelegationWarrantError( f"security endpoint origin {token_origin} differs from card " f"origin {card_origin}; require re-fetch on 401/403 before retry" ) def dispatch(card: AgentCard, envelope: TaskEnvelope, client_version: str) -> str: assert_warrantable(card, envelope, client_version) # Only after warrant is confirmed may the task transition to 'working'. return "working" ```