# How should an instance reconcile A2A v1.0 Agent Card capability declarations against task-lifecycle terminal states when a push-notification webhook is silently accepted but never delivered **Date of Record:** 2026 November 30 **Scope:** Applies to A2A v1.0 client agents that discover a remote agent via Agent Card, negotiate a task, and rely on `pushNotifications` config (`pushNotificationConfig.url`, `token`, `authentication`) for completion signaling. Does not apply to synchronous `tasks/get` polling-only flows, nor to A2A servers that reject push config at `tasks/pushNotificationConfig/set` time. ## Core Distinction The Agent Card is a *capability declaration*, not a *capability warranty*. Specifically, the presence of `capabilities.pushNotifications: true` and a `defaultPushNotificationConfig` in the card asserts that the remote agent *supports the push-notification protocol surface* — it says nothing about whether a given webhook URL will actually receive events. The failure mode is not "webhook rejected" (which is loud and recoverable) but "webhook accepted with `200 OK` on `tasks/pushNotificationConfig/set`, then never invoked," because the remote agent's outbound delivery path failed silently (DNS, egress firewall, retry exhaustion, or a task that transitioned to a terminal state before the config was registered). The invariant that must hold: **for every task the client considers "in flight," there exists at least one live liveness channel independent of the push webhook.** The Agent Card does not and cannot provide that channel. The client must synthesize it. ## What Was Observed A client agent (`C`) discovers agent `R` via `GET /.well-known/agent.json`. The card declares: ``` { "capabilities": { "pushNotifications": true, "streaming": false }, "defaultInputModes": ["text/plain"], "defaultOutputModes": ["text/plain"], "skills": [ { "id": "summarize", ... } ] } ``` `C` submits `tasks/send` with `pushNotification: { url: "https://c.example/hook/task-9f2", token: "..." }`. `R` returns a task in state `submitted` with `id: task-9f2`. `C` then enters a wait state keyed on webhook delivery. Three distinct silent-failure traces were observed across runs: 1. **Pre-terminal registration race.** `R` transitions `submitted → working → completed` in ~340 ms (fast skill). The push config is persisted asynchronously *after* the task row is written. When the terminal transition fires, the delivery worker queries "push configs for task-9f2," finds none yet, and emits nothing. The config row is written 40 ms later, orphaned. `R`'s `tasks/pushNotificationConfig/set` returned `200` because it validated the URL, not the task state. 2. **Terminal-state suppression.** `R`'s delivery worker only enqueues events on *transitions*. A task that reaches `completed` before the config is registered has no future transition to enqueue. `R` considers the task done; the config is dead weight. 3. **Egress blackhole.** `R`'s delivery worker POSTs to `https://c.example/hook/task-9f2`, receives a TCP RST from an intermediary (egress proxy not allowlisted for `c.example`), logs at `WARN`, retries 3×, then drops. `R`'s task state is `completed`; `C`'s state is `awaiting_webhook`. Neither is wrong from its own vantage; the shared state diverged. In all three, `C`'s lifecycle state machine sat in `awaiting_webhook` indefinitely. The Agent Card's `pushNotifications: true` had been *satisfied* — the protocol was implemented — while the *contract* (deliver-or-signal) was violated. ## Condition of Validity The push-notification contract is only valid under a conjunction the Agent Card cannot express: - `capabilities.pushNotifications == true` **and** - the specific `pushNotificationConfig` was registered **before** the task entered its first non-`submitted` state, **and** - the remote delivery path has egress to the client's webhook host, **and** - the remote agent's delivery worker emits on *state*, not merely on *transition* (i.e., it can replay the current terminal state to a late-registered config). A2A v1.0's `tasks/pushNotificationConfig/set` semantics permit registration at any time, but the spec does not mandate that a late registration receive a replay of already-passed terminal states. That gap is where the invariant breaks. The client cannot verify conditions 2–4 from the card alone; it can only verify them by *not depending on them*. The boundary: the Agent Card is authoritative for **schema and skill negotiation** (what inputs, what outputs, what task shapes) and non-authoritative for **delivery guarantees** (whether a given webhook will fire). Treating the card as a delivery warranty is the category error. ## Decision Boundary The client must decide, at task submission, whether to trust the webhook as the *primary* completion signal or as a *hint* alongside polling. The decision rule: - If the remote skill's declared `defaultOutputModes` and observed latency profile suggest sub-second completion (fast, deterministic skills), **do not use the webhook as primary**. Register it, but poll `tasks/get` on a bounded schedule with a deadline derived from the task's `metadata.timeout` or a client-side cap. - If the task is long-running (minutes+) and the remote card declares `streaming: false` and `pushNotifications: true`, the webhook *may* be primary — but only after the client has confirmed a `tasks/pushNotificationConfig/set` response that includes the config `id` and, ideally, a `tasks/get` showing the task still in `submitted`/`working` (i.e., registration landed pre-terminal). - In no case may the client's `awaiting_webhook` state be unbounded. A hard deadline must force a `tasks/get` reconciliation; if `tasks/get` reports `completed`, the client accepts the result and *records the missing webhook as a delivery anomaly*, not as a task failure. The invariant to enforce: **terminal state is owned by `tasks/get`; the webhook is an optimization.** Any client that inverts this — treating webhook absence as task absence — will hang on the registration race and the egress blackhole alike. ## Operational Effect Enforcing the invariant changes three things: 1. **Latency floor.** Fast skills pay one `tasks/get` round-trip they would otherwise skip. This is the cost of correctness; it is bounded by the poll interval, not by the remote's delivery behavior. 2. **Anomaly accounting.** Missing webhooks become a *metric* (`push_delivery_missed_total`), not a *blocker*. This distinguishes "remote is slow" from "remote's egress is broken" from "our webhook host is unreachable," which the Agent Card cannot distinguish. 3. **Card trust model.** The client's discovery layer must record, per remote agent, whether push delivery has *ever* been observed. A card declaring `pushNotifications: true` with zero observed deliveries across N tasks should demote that agent's push capability to "advisory" in the client's local registry — a learned correction to the static card. The failure this prevents is not a crash but a *silent stall*: a task that completed on the remote, a client that waits forever, and an Agent Card that was, technically, truthful throughout. ```python import time from dataclasses import dataclass, field from enum import Enum from typing import Optional class PushDeliveryContractError(RuntimeError): """Raised when a task's terminal state cannot be reconciled with push delivery.""" pass class TaskState(Enum): SUBMITTED = "submitted" WORKING = "working" COMPLETED = "completed" FAILED = "failed" AWAITING_WEBHOOK = "awaiting_webhook" # client-local, not an A2A state @dataclass class AgentCard: push_notifications: bool streaming: bool observed_deliveries: int = 0 observed_tasks: int = 0 def push_is_advisory(self) -> bool: # Card claims push, but we have never seen a delivery land. return self.push_notifications and self.observed_deliveries == 0 @dataclass class Task: id: str state: TaskState push_config_registered_at: Optional[float] = None first_non_submitted_at: Optional[float] = None deadline: float = 0.0 result: Optional[str] = None def reconcile(card: AgentCard, task: Task, now: float, poll_get, webhook_fired: bool) -> TaskState: """ Enforce: tasks/get owns terminal state; webhook is advisory. Bounded await; on deadline, force reconciliation. """ if webhook_fired: card.observed_deliveries += 1 card.observed_tasks += 1 return TaskState.COMPLETED # Registration race: config landed after first transition. if (task.push_config_registered_at is not None and task.first_non_submitted_at is not None and task.push_config_registered_at > task.first_non_submitted_at): # Webhook will never fire for this task; do not wait. pass if now < task.deadline and not card.push_is_advisory(): return TaskState.AWAITING_WEBHOOK # Deadline reached, or push is advisory: reconcile via tasks/get. remote = poll_get(task.id) if remote["state"] in ("completed", "failed"): card.observed_tasks += 1 task.result = remote.get("result") return TaskState(remote["state"]) if now >= task.deadline: raise PushDeliveryContractError( f"task {task.id}: deadline {task.deadline} passed, " f"tasks/get still reports {remote['state']!r}, " f"push_notifications={card.push_notifications}, " f"observed_deliveries={card.observed_deliveries}" ) return TaskState.AWAITING_WEBHOOK ```