# In what scenarios must an instance treat an A2A Agent Card's `pushNotifications.accepted` flag as non-transferable across task lifecycle extensions **Date of Record:** 2026 November 21 **Scope:** Applies to A2A v1.0 peers that bind webhook push-notification callbacks to a task and then extend or renegotiate that task's lifecycle (e.g., `tasks/resubscribe`, `tasks/pushNotificationConfig/set`, or a continuation turn on an existing `taskId`). Does not apply to fire-and-forget synchronous `message/send` calls where no callback is registered, nor to transport-level retries handled inside a single HTTP exchange. ## Core Distinction The Agent Card is a *capability advertisement*, not a *per-task warrant*. A2A v1.0 lets an agent publish `capabilities.pushNotifications: true` and an `AgentCard`-level default, but the actual webhook binding is negotiated per task via `TaskPushNotificationConfig`, and the server may independently accept, reject, or silently ignore the `pushNotifications` extension on any subsequent lifecycle transition. The failure mode is treating the card's static `pushNotifications` declaration as a durable, transferable authorization that survives task extension — so the client stops polling after registering a callback, while the server has quietly dropped the binding on the extension turn. The task then runs to completion with no observer: the client believes it is push-subscribed, the server believes the task is unobserved, and the result is a silent result-loss window bounded only by task TTL. The invariant that must hold: **a push binding is valid only for the exact `(taskId, pushConfigId, lifecycle epoch)` triple it was registered under, and any lifecycle extension must be treated as a re-registration event until the server explicitly echoes the binding back.** ## What Was Observed A2A v1.0 client `C` discovers server `S` via `GET /.well-known/agent.json`. `S` advertises: ```json { "capabilities": { "pushNotifications": true, "streaming": false }, "defaultInputModes": ["text/plain"], "skills": [{ "id": "long-audit", "name": "Long Audit" }] } ``` `C` issues `message/send` with a `pushNotificationConfig` (webhook URL, token, auth scheme). `S` returns a `Task` in state `submitted` with `pushNotificationConfig` echoed and a `pushConfigId`. `C` records the binding, stops polling, and waits for webhook callbacks. Mid-task, `S` emits an `input-required` interrupt. `C` responds with `message/send` carrying the same `taskId` and a continuation message — this is a *lifecycle extension*. On this path, the reference server re-materializes the task handler from a persisted snapshot and constructs a fresh `PushNotificationSender` from the *card-level* defaults rather than the per-task `TaskPushNotificationConfig`. Because the card-level default in this deployment had no webhook URL (only `pushNotifications: true`), the sender is constructed with an empty config and the push channel is disabled for the remainder of the task. No error is surfaced — `tasks/pushNotificationConfig/get` still returns the original config, because it reads the persisted record, not the live sender. `C` waits on a webhook that will never fire. `S` completes the task at `T+340s`. `C`'s next `tasks/get` (triggered only by its own 600s safety poll) returns `completed` with output — but only because `C` happened to have a fallback poll. Instances without that fallback lose the result entirely once the task TTL expires. The non-obvious part: `tasks/pushNotificationConfig/get` returning the config is *not* evidence the binding is live. The get endpoint is a record read; the binding is a runtime object. They diverge precisely at the lifecycle-extension boundary. ## Condition of Validity The card's `pushNotifications` capability is a valid basis for *attempting* a binding only when all of the following hold: 1. The binding was established in the same task lifecycle epoch as the current state. Any transition that re-enters the server's task handler (continuation `message/send`, `tasks/resubscribe`, an `input-required` round-trip, or server-side task resumption after `working` → `input-required` → `working`) starts a new epoch. 2. The server echoed the `pushConfigId` in the *response to the extension turn*, not merely in the original task creation response. 3. The client holds a liveness signal independent of the webhook — a bounded fallback poll, a `tasks/get` heartbeat, or a streaming subscription — whose interval is shorter than the task TTL minus the expected completion time. If any of (1)–(3) is unmet, the card flag is not a warrant and the client must not enter a "callback-only" wait state. This condition is *not* satisfied by trusting `capabilities.pushNotifications: true` at discovery time, and it is *not* satisfied by a successful `tasks/pushNotificationConfig/get` after the extension. ## Decision Boundary The boundary is between two client postures at the moment of lifecycle extension: - **Trust-the-card posture:** on extension, assume the binding persists because the card said `pushNotifications: true` and the original registration succeeded. This is the failure posture. It is only safe when the server is known to re-hydrate per-task push config across handler reconstruction — which is a server implementation property not expressed anywhere in the A2A v1.0 card schema. - **Re-warrant posture:** on extension, treat the binding as *provisionally revoked*. Re-issue `tasks/pushNotificationConfig/set` (idempotent on `pushConfigId`) and require an echo, or keep the fallback poll armed until the echo arrives. This is the safe posture and costs one round-trip per extension. The decision is forced by an asymmetry in the protocol: the card schema has no field that says "push config survives handler reconstruction," and the server has no obligation to error when it drops a binding. Absent a positive echo on the extension turn, the only correct inference is that the binding is dead. The card flag answers "can this server do push at all," never "is my binding live right now." ## Operational Effect Concretely, an instance that adopts the re-warrant posture changes three behaviors: 1. **Extension turns become binding-renewal turns.** Every continuation `message/send` on an existing `taskId` carries the `pushNotificationConfig` again, and the client asserts the returned `pushConfigId` matches the prior one; a mismatch is a hard signal that the server re-keyed the binding and the old webhook is orphaned. 2. **`tasks/pushNotificationConfig/get` is demoted from liveness proof to record inspection.** It is used only to detect config drift, never to justify disarming the fallback poll. 3. **The fallback poll is armed at registration and disarmed only on a received webhook callback for the current epoch** — not on task state, not on config echo. This bounds the silent-loss window to one poll interval rather than the task TTL. The residual risk is a server that accepts `tasks/pushNotificationConfig/set` and echoes a `pushConfigId` but still does not deliver — a "lying echo." That is out of scope for this record; it is bounded by the same fallback poll and is a distinct failure (delivery vs. binding). ```python from dataclasses import dataclass, field from typing import Optional class PushBindingLostError(RuntimeError): """Raised when a task lifecycle extension invalidates a push binding without the server explicitly re-warranting it for the new epoch.""" @dataclass class PushBinding: task_id: str push_config_id: str epoch: int live: bool = True @dataclass class TaskClient: bindings: dict[str, PushBinding] = field(default_factory=dict) fallback_poll_armed: dict[str, bool] = field(default_factory=dict) def register(self, task_id: str, push_config_id: str) -> PushBinding: b = PushBinding(task_id=task_id, push_config_id=push_config_id, epoch=0) self.bindings[task_id] = b # Arm fallback poll at registration; disarm ONLY on real callback. self.fallback_poll_armed[task_id] = True return b def extend_lifecycle(self, task_id: str, echoed_config_id: Optional[str]) -> PushBinding: """Called on any continuation message/send, resubscribe, or input-required round-trip. The card's pushNotifications flag is NOT consulted here — only the per-epoch echo is.""" b = self.bindings.get(task_id) if b is None: raise PushBindingLostError(f"no binding for task {task_id}") # New epoch: old binding is provisionally revoked until echoed back. b.live = False b.epoch += 1 if echoed_config_id is None: # Server dropped the binding on handler reconstruction. # Keep fallback poll armed; do NOT enter callback-only wait. self.fallback_poll_armed[task_id] = True raise PushBindingLostError( f"task {task_id} epoch {b.epoch}: extension turn returned no " f"pushConfigId echo; prior binding {b.push_config_id} is dead. " f"Fallback poll remains armed." ) if echoed_config_id != b.push_config_id: # Server re-keyed the binding; old webhook is orphaned. self.fallback_poll_armed[task_id] = True raise PushBindingLostError( f"task {task_id} epoch {b.epoch}: pushConfigId changed " f"{b.push_config_id} -> {echoed_config_id}; old webhook orphaned." ) b.live = True return b def on_webhook_callback(self, task_id: str, callback_epoch: int) -> None: b = self.bindings.get(task_id) if b is None or not b.live: # Callback for a dead/unknown binding: ignore, do not disarm poll. return if callback_epoch != b.epoch: # Stale-epoch callback from a prior binding; do not disarm poll. return self.fallback_poll_armed[task_id] = False ```