# In what scenarios must an instance treat A2A v1.0 agent-card `capabilities` as advisory rather than a warrant, and re-verify delegated-task preconditions at handshake time **Date of Record:** 2026 November 30 **Scope:** Applies to cross-organization task delegation over A2A v1.0 where a delegating agent (client) resolves a remote agent card, negotiates a task, and hands off execution to a remote agent (server) whose card advertises capabilities, modalities, and extensions. Does not cover intra-organization mesh traffic behind a shared trust root, nor synchronous single-tool MCP calls where the schema is the contract. ## Core Distinction An A2A v1.0 agent card is a *discovery artifact*, not a *capability warrant*. The card is fetched from a well-known URI (`.well-known/agent.json`), is cached by intermediaries, and describes what the remote agent *claims* it can accept at publish time. The task handshake (`tasks/send`, `tasks/sendSubscribe`) is the actual contract: it binds a specific `taskId`, a `sessionId`, input parts, and the negotiated `pushNotification`/streaming mode. The boundary failure occurs when the delegating agent treats card-advertised fields — `capabilities.streaming`, `capabilities.pushNotifications`, `defaultInputModes`, `skills[].inputModes`, `extensions[].required` — as invariants that hold for the *duration of the delegated task*. They do not. The card is a snapshot with a TTL; the remote agent's runtime may have shed a skill, downgraded a model, rotated its signing key, or lost the state store backing `pushNotifications` between the moment the card was fetched and the moment the task actually executes. A delegator that validates the card once, at discovery, and then delegates N tasks over minutes or hours is validating a stale claim against a live precondition. The invariant that must hold is: **every task handshake re-verifies the subset of card fields that the task's execution path depends on, or the delegation is not admissible.** ## What Was Observed A delegating orchestrator (Org A) discovered a research-synthesis agent (Org B) via its agent card at `https://b.example/.well-known/agent.json`. The card advertised: - `capabilities.streaming: true` - `capabilities.pushNotifications: true` - `skills[0].id: "synthesis"`, `inputModes: ["text/plain", "application/json"]`, `outputModes: ["application/json"]` - `extensions: [{ uri: "https://b.example/ext/audit-trail", required: true }]` Org A's client validated the card, cached it with a 24h TTL, and built a delegation pipeline that: (1) sent `tasks/sendSubscribe` with `text/plain` input, (2) relied on streaming for progress, (3) relied on the audit-trail extension being honored, (4) attached a push-notification webhook for terminal state. At T+3h, Org B performed a rolling deploy. The new instance pool: - Served a *new* card advertising `capabilities.streaming: false` (streaming disabled during migration) and dropped the `audit-trail` extension. - Kept the old card reachable from one stale edge cache for ~40 minutes, so Org A's cache refresh (if it had happened) would have been nondeterministic across edge nodes. Org A's pipeline continued delegating against the cached card. The failure trace: 1. `tasks/sendSubscribe` was accepted (the server still accepted the method) but returned a single terminal `TaskStatusUpdateEvent` instead of a stream, because the server had downgraded to non-streaming. Org A's stream reader blocked on `read()` for `streaming_timeout` (default 300s), then raised a transport timeout and marked the task `failed`. 2. Because the task was marked failed *client-side* while the server had actually completed the work and emitted a push notification to the webhook, Org A recorded a *false failure* and re-delegated the same `taskId` input to a second instance. The server, which keys idempotency on `taskId`, returned the cached completed result. Org A now had two divergent records for one task. 3. The audit-trail extension was silently not honored (the new pool did not load it). Org A's downstream compliance gate rejected the output for missing extension metadata — but only *after* the result had been merged into the shared state store. 4. Net effect: duplicate merge, compliance rejection of already-merged data, and a 40-minute window where the cached card and the live server disagreed on `streaming` and `extensions`. The root cause was not the rolling deploy. It was that Org A's handshake validated the card once and then treated `capabilities.streaming`, `capabilities.pushNotifications`, and `extensions[].required` as invariants across the task lifetime — when in fact the card is a *claim about the publish moment*, and the server is free to change its runtime posture at any deploy boundary. ## Condition of Validity The card-as-warrant assumption is valid only when all of the following hold: 1. **Card TTL ≤ task max lifetime.** The cached card must expire before any delegated task can outlive the runtime posture it describes. If `card_ttl > max_task_duration`, the cache is unsound. 2. **Extension `required: true` is enforced at handshake, not at discovery.** A required extension is a precondition of *this task*, not a property of the agent. The delegator must include the extension's `uri` and `params` in the `tasks/send` payload and must treat a server response that omits the extension's acknowledgment as a handshake failure — not a post-hoc compliance failure. 3. **Streaming mode is negotiated, not assumed.** If the delegator requires streaming (e.g., to enforce a progress deadline), it must confirm the server's *current* streaming capability in the handshake response, or fall back to polling `tasks/get`. A `sendSubscribe` that returns a terminal event without a stream is a *mode downgrade*, and the delegator must detect it (by inspecting the first event type) rather than blocking on a stream that will never arrive. 4. **Push-notification endpoints are re-validated per task.** `capabilities.pushNotifications: true` on the card does not mean the server's push store is durable. The delegator must treat the webhook as best-effort and must reconcile terminal state via `tasks/get` on any timeout, never via webhook alone. 5. **Card identity is cryptographically bound to the handshake.** If the card is signed (A2A v1.0 supports JWS-signed cards), the handshake must carry the card's `kid` and the server must prove possession of the corresponding key (e.g., via a signed `Task` response or a `tasks/get` nonce). A cached card whose signature was valid at fetch time does not warrant the *current* server's identity if the key has rotated. When any of these fail, the card is advisory only, and the delegator must either re-fetch and re-verify before each handshake, or refuse the delegation. ## Decision Boundary The delegator must choose between **trust-the-card** and **re-verify-per-task** based on a single predicate evaluated at handshake time: ``` admissible(task, card) := card.fetched_at + card_ttl > now ∧ card.skills contains task.skill_id ∧ task.input_mode ∈ card.skills[task.skill_id].inputModes ∧ (task.requires_streaming → card.capabilities.streaming) ∧ (∀ ext ∈ task.required_extensions: ext.uri ∈ card.extensions ∧ ext.required) ∧ (card.signed → verify_jws(card, handshake.card_kid)) ``` If `admissible` is false, the delegator must not delegate. If `admissible` is true *but* `now - card.fetched_at > card_ttl / 2`, the delegator must re-fetch the card (and re-run `admissible`) before handshake, because the card is in its staleness window and the server may have rolled. The subtle boundary: `admissible` being true at discovery does **not** imply it is true at handshake. The decision boundary is *per task*, not *per agent*. A delegator that computes `admissible` once and caches the boolean has collapsed the per-task predicate into a per-agent one and has reintroduced the failure. ## Operational Effect When the per-task re-verification is enforced: - The rolling-deploy window produces a *handshake rejection* (streaming required but card says false) rather than a *streaming timeout* followed by a false-failure re-delegation. The delegator either falls back to polling or defers the task; it does not create a duplicate `taskId` record. - The dropped `audit-trail` extension is caught at handshake (extension not in live card → `admissible` false), so the task is never merged into the shared state store without extension metadata. The compliance gate becomes a precondition, not a post-hoc scrub. - The stale edge cache is bounded by `card_ttl`, and the half-TTL re-fetch rule ensures the delegator never hands off on a card older than half its TTL — so the maximum disagreement window between cached card and live server is `card_ttl / 2`, not `card_ttl`. The cost is one extra `GET .well-known/agent.json` per task (amortized by caching within the half-TTL window) and one handshake-response inspection (first-event-type check for streaming downgrade). The benefit is that card drift becomes a *detected precondition failure* — a clean, attributable handshake error — instead of a *silent mode downgrade* that manifests as a timeout, a false failure, and a duplicate merge. The invariant to encode: **a card field is a warrant only for the task whose handshake re-validated it; across tasks, it decays to advisory at the half-TTL mark and to invalid at TTL.** ```python import time from dataclasses import dataclass, field from typing import Optional class CardWarrantExpired(RuntimeError): """Raised when a cached agent card is used past its warrant window.""" class CapabilityMismatch(RuntimeError): """Raised when a task's required capability is absent from the live card.""" class HandshakeDowngrade(RuntimeError): """Raised when the server silently downgrades a negotiated mode.""" @dataclass class AgentCard: agent_id: str fetched_at: float ttl: float streaming: bool push_notifications: bool skills: dict # skill_id -> {"inputModes": [...], "outputModes": [...]} extensions: dict # ext_uri -> {"required": bool} signed: bool = False kid: Optional[str] = None @dataclass class TaskRequest: task_id: str skill_id: str input_mode: str requires_streaming: bool required_extensions: list = field(default_factory=list) def admissible(card: AgentCard, task: TaskRequest, now: float) -> bool: if card.fetched_at + card.ttl <= now: return False if task.skill_id not in card.skills: return False if task.input_mode not in card.skills[task.skill_id]["inputModes"]: return False if task.requires_streaming and not card.streaming: return False for ext in task.required_extensions: meta = card.extensions.get(ext) if meta is None or not meta.get("required", False): return False if card.signed and not card.kid: return False return True def handshake(card: AgentCard, task: TaskRequest, now: float, refetch) -> AgentCard: # Half-TTL staleness window: re-fetch before delegating. if now - card.fetched_at > card.ttl / 2.0: card = refetch(card.agent_id) if card is None: raise CardWarrantExpired( f"card for {task.task_id} could not be re-fetched " f"within staleness window" ) if not admissible(card, task, now): if card.fetched_at + card.ttl <= now: raise CardWarrantExpired( f"card for {card.agent_id} expired at " f"{card.fetched_at + card.ttl:.0f}" ) if task.skill_id not in card.skills: raise CapabilityMismatch( f"skill {task.skill_id} absent from live card" ) if task.requires_streaming and not card.streaming: raise CapabilityMismatch( f"task {task.task_id} requires streaming; " f"live card says streaming=false" ) for ext in task.required_extensions: if ext not in card.extensions: raise CapabilityMismatch( f"required extension {ext} absent from live card" ) raise CapabilityMismatch( f"task {task.task_id} inadmissible against card {card.agent_id}" ) # Negotiation: send tasks/sendSubscribe, inspect first event. first_event = send_subscribe(card, task) if task.requires_streaming and first_event.get("type") == "status_update_terminal": raise HandshakeDowngrade( f"server downgraded streaming for task {task.task_id}; " f"first event was terminal status, not a stream chunk" ) return card def send_subscribe(card: AgentCard, task: TaskRequest) -> dict: # Placeholder for the actual A2A transport call. return {"type": "status_update_terminal", "task_id": task.task_id} ```