# Under what conditions must an instance treat an A2A v1.0 Agent Card's declared `pushNotifications` capability as non-binding at task-acceptance time **Date of Record:** 2026 November 26 **Scope:** Applies to A2A v1.0 client agents that discover a remote Agent Card, negotiate a task lifecycle (`tasks/send`, `tasks/get`, `tasks/cancel`), and bind a push-notification webhook via `pushNotificationConfig` on a task. Does not cover pure synchronous request/response A2A calls with no webhook binding, nor MCP tool invocation, nor intra-process agent state. ## Core Distinction The Agent Card is a *capability advertisement*, not a *commitment contract*. A2A v1.0 separates three things that practitioners routinely conflate: 1. The **card-level declaration** `capabilities.pushNotifications: true`, which asserts the remote agent *can* accept a `pushNotificationConfig` object. 2. The **task-level binding** returned by `tasks/send` or `tasks/pushNotificationConfig/set`, which is the actual authenticated, addressable webhook registration with a server-assigned `id` and `token`. 3. The **delivery guarantee**, which A2A v1.0 does *not* specify beyond "the server SHOULD attempt delivery and retry on failure." The boundary failure lives in the gap between (1) and (2). An instance that reads `pushNotifications: true` from the card and then schedules its own lifecycle around "I will be notified" has made an inference the protocol never licensed. The card says the remote *accepts* a registration; it does not say the registration will succeed, that the URL will be reachable from the server's egress, that the server's retry budget survives your task's duration, or that the `token` will be presented on every delivery. The binding is the only thing that is real, and the binding can be refused, downgraded, or silently expired after the card was fetched. ## What Was Observed A client instance (caller) fetched an Agent Card from a peer at `https://peer.example/.well-known/agent.json`. The card declared: ```json { "name": "longhorizon-planner", "capabilities": { "streaming": true, "pushNotifications": true }, "defaultInputModes": ["text/plain"], "skills": [{ "id": "plan", "name": "plan", "description": "multi-hour plan synthesis" }] } ``` The caller issued `tasks/send` with a `pushNotificationConfig` embedded: ```json { "id": "task-7f3a", "message": { "role": "user", "parts": [{"type":"text","text":"..."}] }, "pushNotificationConfig": { "url": "https://caller.example/a2a/hook/task-7f3a", "token": "bearer-abc123", "authentication": { "schemes": ["Bearer"] } } } ``` The peer responded `200` with a `Task` in state `submitted` and a `pushNotificationConfig` object echoing the URL but with a *server-assigned* `id: "cfg_991"` and a *rotated* `token: "srv-xyz"`. The caller's instance did not re-read the returned config; it kept its own `bearer-abc123` in its expectation state and transitioned to `awaiting_notification`. It then dropped the task from its active poll set, because "push is enabled." Three hours later the task had not completed. The caller's recovery logic fired a `tasks/get` and found the task in `working` — the peer had been executing the whole time. The webhook had never been invoked. Root cause, reconstructed from the peer's logs: the peer's egress proxy refused outbound POSTs to `caller.example` because the caller's hook host resolved to an RFC1918 address from the peer's network namespace. The peer had logged `push_delivery_failed` with `attempt=1..N` and then, per its own retry budget (max 5 attempts over 60s), *gave up silently*. No `TaskStatusUpdateEvent` was queued. No error was surfaced on `tasks/get`. The task remained `working` and would eventually complete, but the caller had no path to learn that except polling — which it had disabled on the strength of the card's `pushNotifications: true`. The invariant violated: **the caller treated card-level capability as a task-level delivery guarantee, and it did so without confirming that the returned `pushNotificationConfig` was addressable from the peer's egress and without retaining a polling fallback keyed to the binding's server-assigned `id`.** ## Condition of Validity The card's `pushNotifications: true` is *operationally binding* on the caller only when all of the following hold at the moment of task acceptance: - The `tasks/send` response contains a `pushNotificationConfig` object whose `id` is non-null and server-assigned, and whose `url` matches the caller's hook (or the caller has explicitly accepted a redirect). - The caller has performed an **egress-reachability probe**: a synthetic `POST` to its own hook URL from a network position equivalent to the peer's egress (or the peer exposes a `pushNotificationConfig/verify` endpoint and returns `200`). Absent a probe, the card is *advisory*. - The caller retains a **binding-scoped poll schedule** (`tasks/get` at a cadence derived from the task's declared `deadline` or a default backoff) that is *not disabled* by the presence of push. Push is an optimization over polling, never a replacement. - The caller records the server-assigned `token` and rejects any inbound webhook whose `Authorization` header does not present it — because the peer may rotate the token on re-registration, and a caller that pins its own token will reject valid deliveries or accept forged ones. If any of these is false, the card's `pushNotifications` field must be treated as a hint about the peer's *software version*, not a property of *this task's* execution. The task lifecycle must then be driven by polling, and the caller must not enter a state where it has no active `tasks/get` outstanding for a non-terminal task. ## Decision Boundary The decision the instance must make at `tasks/send` response time is binary and must be made on the *response*, not the *card*: - **Bind, if and only if** the response's `pushNotificationConfig.id` is present, the URL is reachable from the peer's egress (probed or verified), and the caller has stored the server-assigned `token`. In this branch the caller may reduce poll frequency but must keep at least one `tasks/get` in flight per non-terminal task per `poll_floor` interval (default 300s) as a liveness backstop. - **Do not bind, otherwise.** Transition to `polling_only`, log the reason (`card_push_unsupported_at_task`, `egress_unreachable`, `token_absent`), and schedule `tasks/get` at the task's declared cadence. Do not retry `pushNotificationConfig/set` more than once; a peer that refused the binding once will refuse it again within the same task. The boundary is *not* "did the card say true." It is "did the response contain a live, reachable, token-authenticated binding." A caller that crosses this boundary on card evidence alone has accepted an unverified delivery obligation and, in the observed case, lost three hours of task visibility. A second, subtler boundary: **re-binding after token rotation**. If a `TaskStatusUpdateEvent` arrives with a `pushNotificationConfig` whose `id` differs from the stored one, the caller must treat the old binding as revoked and the new one as authoritative — but only after verifying the new `token` via the same probe. A caller that merges configs by URL will accept deliveries signed with a stale token and reject the peer's current ones. The rule: `id` is the identity of the binding; `url` is not. ## Operational Effect The caller in the observed case paid three hours of wall-clock latency and one wasted `tasks/get` recovery cycle. The fix is not "poll more" — it is to make the push binding a *verified state transition* rather than a *card-derived assumption*. Concretely: 1. On `tasks/send` response, extract `pushNotificationConfig.id` and `token`. If either is absent, do not enter `awaiting_notification`. 2. Probe egress reachability once, with a 2s timeout, before committing to push-only wait. On failure, fall through to polling. 3. Maintain a per-task `poll_floor` timer that survives push binding; it fires `tasks/get` regardless of whether a webhook has been received. This is the liveness invariant: *no non-terminal task may have zero outstanding `tasks/get` calls for longer than `poll_floor`.* 4. On any inbound webhook, validate the `Authorization` header against the *server-assigned* token, not the caller-supplied one. On mismatch, reject with `401` and log `webhook_token_mismatch`; do not transition task state. 5. On `tasks/get` returning a terminal state while a webhook was expected but never received, emit `push_delivery_lost` with the binding `id` — this is the signal that the peer's retry budget was exhausted and the caller's fallback saved the task. The general invariant: **an A2A caller's task lifecycle must be driven by the task's own state machine, not by the peer's advertised capabilities.** The card is a discovery artifact; the binding is the contract; polling is the invariant that holds when the contract is silently broken. ```python import time from dataclasses import dataclass, field from typing import Optional class PushBindingUnverified(RuntimeError): """Raised when a caller attempts to enter awaiting_notification without a live, reachable, token-authenticated pushNotificationConfig binding.""" pass class PollFloorExceeded(RuntimeError): """Raised when a non-terminal task has had no outstanding tasks/get for longer than poll_floor seconds, violating the liveness invariant.""" pass @dataclass class Binding: id: str url: str token: str verified_at: Optional[float] = None egress_reachable: bool = False @dataclass class TaskState: task_id: str status: str = "submitted" # submitted|working|completed|failed|canceled binding: Optional[Binding] = None last_poll_at: float = field(default_factory=time.time) poll_floor: float = 300.0 def accept_task(card_capabilities: dict, send_response: dict, egress_probe, now: Optional[float] = None) -> TaskState: """Decide whether to bind push or fall back to polling. The card's pushNotifications flag is deliberately NOT consulted for the binding decision; only the send response and the egress probe are.""" now = now if now is not None else time.time() ts = TaskState(task_id=send_response["id"], status=send_response["status"]) cfg = send_response.get("pushNotificationConfig") if not cfg or not cfg.get("id") or not cfg.get("token"): # Card may say true; response says no binding. Poll. ts.binding = None ts.last_poll_at = now return ts binding = Binding(id=cfg["id"], url=cfg["url"], token=cfg["token"]) binding.egress_reachable = bool(egress_probe(cfg["url"])) binding.verified_at = now if binding.egress_reachable else None if not binding.egress_reachable: # Peer accepted the registration but cannot reach us. Treat as # unbound; polling is the only liveness path. ts.binding = None ts.last_poll_at = now return ts ts.binding = binding ts.last_poll_at = now return ts def enter_awaiting_notification(ts: TaskState, now: Optional[float] = None) -> None: now = now if now is not None else time.time() if ts.binding is None or not ts.binding.egress_reachable or not ts.binding.token: raise PushBindingUnverified( f"task {ts.task_id}: cannot enter awaiting_notification without a " f"verified binding (id={getattr(ts.binding,'id',None)}, " f"reachable={getattr(ts.binding,'egress_reachable',False)}); " f"card capability is not sufficient evidence" ) ts.status = "awaiting_notification" def check_poll_floor(ts: TaskState, now: Optional[float] = None) -> None: now = now if now is not None else time.time() if ts.status in ("completed", "failed", "canceled"): return if now - ts.last_poll_at > ts.poll_floor: raise PollFloorExceeded( f"task {ts.task_id}: {now - ts.last_poll_at:.0f}s since last " f"tasks/get exceeds poll_floor={ts.poll_floor}s; push binding " f"{getattr(ts.binding,'id',None)} did not deliver and no fallback " f"poll was issued" ) def validate_webhook(ts: TaskState, authorization_header: str) -> None: if ts.binding is None: raise PushBindingUnverified(f"task {ts.task_id}: webhook arrived with no binding") presented = authorization_header.removeprefix("Bearer ").strip() if presented != ts.binding.token: # Server rotated token on re-registration; caller must re-probe. raise PushBindingUnverified( f"task {ts.task_id}: webhook token mismatch for binding " f"{ts.binding.id}; re-verify pushNotificationConfig before " f"accepting delivery" ) ```