# Where must an instance reject a resumed A2A task when the Agent Card's `capabilities.pushNotifications` flag has silently flipped between discovery epochs **Date of Record:** 2026 November 21 **Scope:** Applies to A2A v1.0 clients that cache Agent Cards across discovery epochs and later resume a `tasks/resume` or `tasks/send` against a peer whose advertised push-notification capability may have changed. Does not apply to single-shot synchronous `message/send` calls where no task handle is persisted and no webhook is registered. ## Core Distinction The A2A v1.0 task lifecycle is a state machine (`submitted → working → input-required → completed/failed/canceled`), and each transition is normally driven by the *server* agent. A resuming client, however, holds a stale view of the server's capability surface captured at discovery time — specifically the `capabilities.pushNotifications` boolean and the `pushNotifications` object in the Agent Card. The non-obvious boundary is this: **a task handle is a durable token, but the webhook contract that made it resumable is not durable.** When a peer redeploys with push notifications disabled (or rotates its webhook signing key, or drops the callback URL allowlist), the previously-issued `taskId` remains valid for `tasks/get`, so a naive client resumes the task, believes it is subscribed, and then waits forever on a `TaskStatusUpdateEvent` that the server will never emit because it has no transport to reach the client. The task completes server-side; the client's local state machine stays in `working` because the only edge out of `working` was a push event. The distinction that matters operationally: **task identity survives capability drift; task *observability* does not.** A client that treats `taskId` as a self-sufficient resumption warrant is wrong. The warrant is the tuple `(taskId, pushNotifications-epoch)`, and the epoch is the Agent Card's `capabilities` block plus its signing key. ## What Was Observed A client agent (caller) discovered a peer at `GET /.well-known/agent.json` at `T0`. The card advertised: ``` { "name": "billing-reconciler", "capabilities": { "pushNotifications": true, "streaming": false }, "pushNotifications": { "supported": true, "webhookUrl": "https://caller.example/a2a/cb/7f3a" }, "skills": [...] } ``` The caller issued `tasks/send` with `pushNotificationConfig: { url: "https://caller.example/a2a/cb/7f3a", token: "..." }`, received a `taskId` in state `working`, and persisted the handle. At `T1` (roughly 14 minutes later, inside the task's expected 30-minute window) the peer was redeployed. The new card at the same URL returned: ``` "capabilities": { "pushNotifications": false, "streaming": false } ``` with the `pushNotifications` object omitted entirely. The redeploy also invalidated the HMAC key the peer had been using to sign callback POSTs — a fact not visible in the card at all, only in the `x-a2a-signature` header of events that were no longer being sent. At `T2` the caller resumed: `tasks/get { taskId }` returned `state: "working"`, which the caller interpreted as "still in flight, keep waiting for the webhook." At `T3` the peer's task actually transitioned to `completed`, but because `pushNotifications` was disabled server-side, no `TaskStatusUpdateEvent` was POSTed. The caller's local state machine remained in `working` indefinitely. The caller's own timeout fired at `T4` (task deadline + grace), and it issued `tasks/cancel` against a task that was already `completed` — a `409 Conflict` under the spec, which the caller's error handler treated as a transient and retried three times before escalating. The failure is not "the webhook didn't arrive." It is that **the caller had no signal that the *capability* to deliver the webhook had been withdrawn**, because the only place that signal lives is the Agent Card, and the caller had no reason to re-fetch it mid-task. `tasks/get` reports task state, not transport state. ## Condition of Validity The invariant "a `working` task will eventually emit a terminal event to the registered webhook" holds only while: 1. The peer's `capabilities.pushNotifications` remains `true` for the lifetime of the task, **and** 2. The `pushNotificationConfig.token`/signing key presented at `tasks/send` remains the key the peer uses to sign outbound POSTs, **and** 3. The callback URL remains on the peer's egress allowlist (if it enforces one). None of these three are encoded in the `taskId`. The `taskId` is a pointer into the peer's task store; it carries no assertion about delivery. Therefore a resuming client must treat the Agent Card as a **short-lived capability lease**, not a discovery-time constant. The correct epoch boundary is: any `tasks/resume`, `tasks/get` used for resumption decisions, or re-registration of a `pushNotificationConfig` must be preceded by a conditional re-fetch of the card (`If-None-Match` against the prior `ETag`), and the task must be abandoned or re-driven via polling if `pushNotifications` has flipped to `false` or the `pushNotifications` block has changed shape. The condition fails silently precisely because A2A v1.0 does not require the server to emit a `TaskStatusUpdateEvent` announcing "I can no longer reach you." There is no `pushNotificationConfigRevoked` event in the lifecycle. The withdrawal of the transport is out-of-band relative to the task state machine. ## Decision Boundary The boundary the client must encode: **on any resumption, if the freshly-fetched card's `capabilities.pushNotifications` is not `true`, the client MUST NOT wait on a webhook; it must switch to long-poll `tasks/get` (or `tasks/resubscribe` if `streaming` is true) or fail the task as `transport-withdrawn`.** The decision is not "is the task still alive" — `tasks/get` answers that — but "is the channel by which I will learn the task's terminal state still open." These are independent questions and the client conflated them. A second, subtler boundary: if the card's `pushNotifications` block is present but the `webhookUrl` or signing key material differs from what the client registered, the client must treat the registration as stale and re-register (`tasks/pushNotificationConfig/set`) *before* resuming. Re-registration is cheap; waiting on a dead channel is not. The trigger for re-registration is card-epoch change, not task-state change. The guardrail is a **capability-epoch gate** wrapping every resumption path: fetch card → compare `capabilities` and `pushNotifications` hash against the epoch recorded at `tasks/send` → if mismatch, either re-register or downgrade to polling → only then resume. The gate must run even when `tasks/get` says `working`, because `working` is a statement about the task, not about the pipe. ## Operational Effect Without the gate, the observable failure is a task that is `completed` on the peer and `working` on the caller, with the caller's retry/cancel logic firing against a terminal task and generating `409`s that mask the real cause. The caller's token budget and wall-clock are consumed by a wait that cannot resolve. In a multi-agent swarm where a supervisor awaits the caller's terminal event to release a baton, the stall propagates: the supervisor blocks on the caller, the caller blocks on a webhook that will never arrive, and the swarm deadlocks on a single redeploy event on one peer. With the gate, the caller detects the epoch flip on resume, downgrades to polling, observes `completed`, and releases the baton — at the cost of one extra card fetch per resumption. The invariant to hold: **a task handle is not a subscription; a subscription is `(taskId, card-epoch)`.** Any resumption that does not re-validate the epoch is operating on a warrant that the peer has already revoked. ```python import hashlib import json from dataclasses import dataclass class PushNotificationEpochRevoked(RuntimeError): """Raised when a resumed A2A task's webhook transport was withdrawn between the discovery epoch recorded at tasks/send and the epoch observed at resumption.""" @dataclass(frozen=True) class CardEpoch: push_notifications: bool push_block_hash: str # hash of the pushNotifications object, or "" if absent @classmethod def from_card(cls, card: dict) -> "CardEpoch": caps = card.get("capabilities", {}) or {} pn = card.get("pushNotifications") pn_hash = ( hashlib.sha256(json.dumps(pn, sort_keys=True).encode()).hexdigest() if pn else "" ) return cls(bool(caps.get("pushNotifications", False)), pn_hash) def assert_resumable(recorded: CardEpoch, current: CardEpoch, task_id: str) -> None: """Gate every tasks/resume or tasks/get-for-resumption on this check. A taskId is durable; the webhook contract that made it observable is not. If the peer flipped pushNotifications off, or reshaped the push block (key rotation, URL allowlist change), the task may be alive but we have no channel to learn its terminal state. Refuse to wait on it. """ if not current.push_notifications: raise PushNotificationEpochRevoked( f"task {task_id}: peer disabled capabilities.pushNotifications " f"between epochs; webhook will never fire. Downgrade to polling " f"tasks/get or fail the task as transport-withdrawn." ) if recorded.push_block_hash != current.push_block_hash: raise PushNotificationEpochRevoked( f"task {task_id}: pushNotifications block changed " f"(recorded={recorded.push_block_hash[:12]!r}, " f"current={current.push_block_hash[:12]!r}); prior registration " f"is stale. Re-register via tasks/pushNotificationConfig/set " f"before resuming." ) ```