# How should an instance reconcile an A2A v1.0 Agent Card whose declared `capabilities.pushNotifications` and `defaultInputModes` diverge from the live task's `TaskStatus` transitions after a webhook 410 Gone rebinds to a stale endpoint **Date of Record:** 2026 November 24 **Scope:** Applies to A2A v1.0 client instances that discover a remote Agent Card, negotiate a task, and register a push-notification webhook for long-running `working`/`input-required` states. Does not cover synchronous `message/send` request/response flows that complete within a single round trip, nor MCP tool-invocation transport. ## Core Distinction The Agent Card is a *declaration*, not a *contract witness*. When a client registers a webhook via `tasks/pushNotificationConfig/set`, the card's `capabilities.pushNotifications: true` is treated by most SDKs as a static capability grant. But the card is a snapshot fetched at discovery time; the push binding is a *stateful lease* that the remote server re-evaluates on every `TaskStatus` transition. The failure mode is the gap between these two: the card says push is supported, the task's lifecycle says the current endpoint binding is dead, and the client has no invariant tying the two together. An instance that treats card capability as durable authorization will silently drop `input-required` notifications and deadlock the task in a state only the server can advance. ## What Was Observed A client instance discovered an Agent Card at `/.well-known/agent.json` with: ``` capabilities: { pushNotifications: true, stateTransitionHistory: true } defaultInputModes: ["text/plain", "application/json"] ``` It submitted `message/send` and received a `Task` in `submitted`, then registered a webhook via `tasks/pushNotificationConfig/set` pointing at `https://client.example/hooks/task-9f2a`. The task transitioned `submitted → working`. After 47 seconds the remote server's egress proxy returned `410 Gone` on the webhook POST (the endpoint path had been recycled by an unrelated deploy). The server, per A2A spec, marked the push config as `failed` and — critically — *did not* transition the task; it stayed `working`, waiting for an `input-required` notification that could never be delivered. The client, polling `tasks/get` every 30s, saw `working` indefinitely. Its local state machine had `working → input-required` as a *push-only* transition (it assumed the card's `pushNotifications: true` meant it would be notified of state changes rather than polling for them). The task hung for 22 minutes until a manual `tasks/cancel`. The non-obvious part: the server *did* honor `stateTransitionHistory` and the client *could* have polled `tasks/get` and seen the `input-required` state — but the client's local FSM had no polling fallback for that edge because the card had advertised push. The card's capability declaration had been silently upgraded into a *replacement* for polling, not a *supplement* to it. A second observation, on the same run: when the client re-registered the webhook with a fresh endpoint via `tasks/pushNotificationConfig/set`, the server accepted the new config but the task's `status.message` still referenced the old webhook ID in its `metadata.pushConfigId`. The client's reconciliation logic matched on `pushConfigId` and concluded the rebind had failed, triggering a spurious cancel. ## Condition of Validity The invariant that bounds this failure: **A2A push notification is a delivery optimization, never a liveness dependency.** The Agent Card's `capabilities.pushNotifications` grants *permission to register a webhook*, not *guarantee of delivery*. Therefore: 1. Every `TaskStatus` transition that the client's FSM marks as `push-only` must have a corresponding poll-based edge with a bounded interval. The card does not exempt you from polling. 2. Webhook rebind acknowledgment is authoritative only via `tasks/get` returning the new `pushConfigId` in `Task.metadata`, not via the `set` response's `200 OK`. The `set` call is idempotent-on-write but the task's metadata projection may lag by one transition. 3. `410 Gone`, `404`, and `5xx` on webhook delivery must be treated as *binding invalidation*, not transient retry. The server will not auto-retry a `410`; it marks the config `failed` and stops. When these conditions do not hold — e.g., a server that advertises `pushNotifications: true` but never emits `input-required` via `tasks/get` polling — the client cannot bound the failure and must rely on `tasks/cancel` as the terminal escape. ## Decision Boundary The boundary between "push is sufficient" and "push must be backed by poll" is drawn at the *first* webhook delivery failure, not at card discovery. Before any failure, the client may treat push as the primary channel. After the first `4xx` (excluding `429`) or `410`, the client MUST: - Demote push to best-effort for that task. - Enable a poll loop at `min(2 * expected_transition_interval, 30s)` on `tasks/get` for the remainder of the task lifecycle. - Reconcile `pushConfigId` from `tasks/get` metadata before issuing any further `set` calls. The decision to *cancel* rather than *poll* is drawn when the poll loop observes no `TaskStatus` change across `N=3` consecutive intervals AND the last known status is `working` or `input-required` with no `status.message` progress. At that point the remote agent is presumed stuck server-side and `tasks/cancel` is the correct terminal action. ## Operational Effect The practical effect is that A2A clients must implement a *push-with-poll-fallback* FSM, and the fallback transition must be armed by webhook delivery failure rather than by card capability inspection. Concretely, the client's state store needs a `push_binding_health` field per task (`healthy | degraded | failed`), and the FSM transition table must include `working --[push_failed]--> polling_working` and `input-required --[push_failed]--> polling_input_required`. The card's `capabilities` object is read exactly once at discovery to validate that registration is *permitted*; after that, the task's own `TaskStatus` stream is the only source of truth for liveness. Instances that conflate the two — treating the card as a durable delivery guarantee — will hang tasks in `working` until a human or timeout intervenes, and the hang is indistinguishable from a slow remote agent unless the client tracks webhook delivery outcomes separately from task state. ```python import time from dataclasses import dataclass, field from enum import Enum from typing import Optional class PushBindingInvariantError(RuntimeError): """Raised when a client treats Agent Card push capability as a delivery guarantee and has no poll fallback armed for a task whose webhook binding has failed.""" class PushHealth(Enum): HEALTHY = "healthy" DEGRADED = "degraded" FAILED = "failed" class TaskStatus(Enum): SUBMITTED = "submitted" WORKING = "working" INPUT_REQUIRED = "input-required" COMPLETED = "completed" CANCELED = "canceled" @dataclass class AgentCard: push_notifications: bool state_transition_history: bool @dataclass class TaskRecord: task_id: str status: TaskStatus push_config_id: Optional[str] push_health: PushHealth = PushHealth.HEALTHY last_status_change: float = field(default_factory=time.time) poll_fallback_armed: bool = False def on_webhook_delivery_failure(task: TaskRecord, http_status: int) -> TaskRecord: """Handle a webhook POST failure per A2A v1.0 semantics. A 410 Gone (or any non-429 4xx) invalidates the binding; the server will not retry. The client MUST arm a poll fallback or it will deadlock in 'working'. """ if http_status == 429: # Rate-limited: transient, server will retry. Do not demote. return task if http_status == 410 or 400 <= http_status < 500: task.push_health = PushHealth.FAILED task.push_config_id = None # Invariant: a failed binding on a non-terminal task requires a poll fallback. if task.status in (TaskStatus.WORKING, TaskStatus.INPUT_REQUIRED): if not task.poll_fallback_armed: raise PushBindingInvariantError( f"task {task.task_id} in {task.status.value} with webhook " f"HTTP {http_status}: push binding invalidated but no poll " f"fallback armed. Card capability pushNotifications=true is " f"not a delivery guarantee; arm polling before continuing." ) return task if 500 <= http_status < 600: task.push_health = PushHealth.DEGRADED return task raise PushBindingInvariantError( f"unexpected webhook status {http_status} for task {task.task_id}" ) def reconcile_rebind(task: TaskRecord, get_response_push_config_id: Optional[str]) -> TaskRecord: """After a pushNotificationConfig/set, reconcile against tasks/get metadata. The 'set' 200 OK is not authoritative; Task.metadata.pushConfigId from tasks/get is. Matching on the pre-rebind ID will produce a spurious cancel. """ if task.push_health == PushHealth.FAILED and get_response_push_config_id is None: raise PushBindingInvariantError( f"task {task.task_id}: rebind acknowledged by set but tasks/get " f"still reports no pushConfigId; do not cancel on stale-ID mismatch" ) task.push_config_id = get_response_push_config_id task.push_health = PushHealth.HEALTHY task.poll_fallback_armed = True # keep fallback armed even after rebind return task ```