# How does an instance detect a silently revoked A2A push-notification binding when the peer's task lifecycle continues to advance **Date of Record:** 2026 November 19 **Scope:** Applies to A2A task lifecycles where the caller (client agent) has registered a push-notification webhook with a remote agent server and relies on webhook delivery, rather than polling, to learn about `TaskStatusUpdate` and `TaskArtifactUpdate` events. Does not apply to purely synchronous request/response A2A calls or to streaming-only (SSE) task subscriptions where the connection itself carries liveness signal. ## Core Distinction An A2A task lifecycle is authoritative on the *server* side; the client's view of it is a projection reconstructed from two independent channels: (a) the response to `tasks/get` (pull), and (b) push-notification webhooks (push). The common failure assumption is that these two channels are redundant and mutually confirming. They are not. The webhook binding is a *separate, independently revocable resource* attached to the task, and the server is permitted to advance the task through `working → completed` while the binding has been silently dropped — because the task's lifecycle state machine and the notification binding's lifecycle state machine are not coupled by any invariant in the A2A spec. The non-obvious consequence: **a client that treats "no webhook received" as "task not yet progressed" will hang indefinitely on a task that has already completed**, and the hang is indistinguishable, from the client's vantage point, from a slow task. The distinguishing signal is not the absence of a webhook; it is the *divergence between the locally cached lifecycle state and the state reported by an independent `tasks/get` probe*. ## What Was Observed Trace from a deployment where a client orchestrator delegated a long-running document-analysis task to a remote A2A server and registered a webhook at `https://client.example/a2a/push/{taskId}`. 1. `tasks/send` returns a `Task` with `status.state = "submitted"` and `pushNotificationConfig` echoed back with the client's URL. Client records `lastKnownState = submitted`, `lastEventAt = T0`. 2. Server transitions the task to `working`, emits a `TaskStatusUpdate` webhook. Client receives it at `T0+2s`, updates `lastKnownState = working`. 3. At `T0+40s` the server's task-execution worker completes the task and transitions `working → completed`. The server's *notification dispatcher* attempts to POST the `completed` event to the registered URL. 4. The POST fails at the transport layer — in the observed case, an intermediate WAF returned `403` on the server's egress IP because the client rotated its ingress allowlist during a deploy. The dispatcher applies its retry policy (three attempts, exponential backoff), exhausts it, and — per the A2A reference server's behavior — **marks the push binding `failed` and stops dispatching, but does not alter the task's `status.state`** and does not surface the binding failure to the client through any channel the client is subscribed to. 5. The client's webhook endpoint never sees the `completed` event. `lastKnownState` remains `working`. The client's task supervisor has a 900-second wall-clock timeout and does not fire until `T0+900s`, at which point it emits a spurious "task stalled" alert and re-delegates the *already completed* task, producing a duplicate artifact. The critical observation: at step 4 the task was `completed` and the binding was `failed`. Both were true simultaneously. There is no field in the `Task` object the client can poll that reports the binding's health. `tasks/get` returns `status.state = "completed"` — the divergence is only visible if the client *polls despite having registered a webhook*, which most implementations are explicitly designed not to do. A second observed variant: the server evicted the binding during a restart because the binding store was in-memory while the task store was durable. Post-restart, `tasks/get` reported `completed`; the binding was simply gone, with no `failed` marker at all. The client had no way to distinguish "binding never existed" from "binding revoked." ## Condition of Validity The divergence-detection invariant holds only under the following conditions, and the guardrail below is unsound outside them: - The client must be able to issue `tasks/get` for the task ID independently of the webhook channel, and the server must honor it for terminal tasks (retention ≥ the client's supervisor horizon). - The client must maintain a *monotonic* local lifecycle state — states may only advance along the A2A ordering (`submitted < working < completed|failed|canceled`). Regressions in `tasks/get` responses (a stale replica returning `working` after a `completed` was observed) must be treated as replica lag, not as a real transition backward. - The webhook endpoint must be able to record receipt time per `taskId` durably, so that "no event since `lastEventAt`" is a queryable fact rather than an in-memory assumption. - This does **not** hold when the peer server does not implement `tasks/get` for terminal tasks, or when the client's only permitted interaction mode is push (some enterprise A2A gateways disable pull for cost reasons). In that mode the invariant must be replaced by a binding-liveness heartbeat negotiated out of band, which is outside this record's scope. ## Decision Boundary The boundary is a single comparison, evaluated on a cadence, not on webhook arrival: > **If `now - lastEventAt > silence_threshold` AND `tasks/get(taskId).status.state` has advanced beyond `lastKnownState`, then the webhook binding is presumed dead and the client must transition to pull-based supervision for this task.** `silence_threshold` must be derived from the *server-declared* expected event cadence for the task, not a global constant. A task whose last update was `working` with an `estimatedCompletion` of 10 minutes has a legitimate silence window of ~10 minutes; a task that declared `working` with sub-second tool-call granularity does not. Using a single global threshold is the most common cause of both false-positive re-delegation (threshold too short) and the original hang (threshold too long). The decision is *not* "webhook failed → error out." It is "webhook presumed dead → fall back to pull, reconcile state, and only then decide whether the task is actually stuck." The distinction matters because the overwhelmingly common case is that the task is fine and only the notification path broke; treating the binding failure as a task failure is what produces duplicate work. A second, harder boundary: the client must **not** re-register the webhook (`tasks/pushNotificationConfig/set`) as its first response to silence. Re-registration on a task that already reached a terminal state is a no-op at best and, on servers that re-emit the terminal event on binding creation, a duplicate-delivery source at worst. Reconcile via `tasks/get` first; re-register only if the task is still non-terminal. ## Operational Effect With the divergence probe in place, the observed failure mode changes from "900-second hang plus duplicate artifact" to "detected at `silence_threshold` plus one probe interval, task reconciled to `completed`, no re-delegation." The cost is a bounded increase in `tasks/get` traffic proportional to the number of in-flight tasks divided by the probe cadence — in the observed deployment, roughly 1 probe per in-flight task per 60 seconds, which was negligible against the webhook traffic it replaced during normal operation. The invariant the guardrail enforces is: **local lifecycle state is only ever advanced by a *confirmed* source (webhook receipt or `tasks/get` response), and the absence of a webhook is never interpreted as the absence of a transition.** This is the A2A-layer analogue of a lease with a liveness check: the binding is a hint, the `tasks/get` response is the truth, and silence is a signal to go ask — never a signal to wait longer. The residual risk after the guardrail is replica lag on `tasks/get` producing a stale `working` while the task is actually `completed`; this is bounded by requiring two consecutive probes to agree before declaring the task stuck, at the cost of one extra probe interval of latency before the stall alert fires. ```python import time from dataclasses import dataclass from enum import IntEnum class LifecycleState(IntEnum): SUBMITTED = 0 WORKING = 1 COMPLETED = 2 FAILED = 3 CANCELED = 4 @property def terminal(self) -> bool: return self in (LifecycleState.COMPLETED, LifecycleState.FAILED, LifecycleState.CANCELED) class PushBindingPresumedDead(RuntimeError): """Raised when silence + independent state divergence proves the A2A push-notification binding is no longer delivering, while the task itself continues to advance on the server side.""" @dataclass class TaskView: task_id: str last_known_state: LifecycleState last_event_at: float # monotonic seconds, webhook receipt declared_cadence_s: float # server-declared expected event interval def reconcile( view: TaskView, probe_state: LifecycleState, now: float, cadence_slack: float = 3.0, ) -> LifecycleState: """Called on a cadence. Returns the state the client should adopt. Invariant: local state advances only on confirmed sources. Silence alone never advances state; it only triggers a probe whose result may advance it. If the probe shows advancement the client has not seen via webhook, the binding is dead and pull-supervision must take over. """ if probe_state < view.last_known_state: # Replica lag: never regress local monotonic state. return view.last_known_state silence = now - view.last_event_at silence_threshold = view.declared_cadence_s * cadence_slack if silence > silence_threshold and probe_state > view.last_known_state: raise PushBindingPresumedDead( f"task {view.task_id}: binding silent {silence:.1f}s " f"(threshold {silence_threshold:.1f}s) while server state " f"advanced {view.last_known_state.name} -> {probe_state.name}; " f"switch to pull-based supervision" ) if probe_state.terminal and probe_state > view.last_known_state: # Terminal transition observed via probe; adopt it and stop # expecting webhooks for this task. return probe_state return view.last_known_state ```