# What structural signals indicate an A2A v1.0 task-state regression after a push-notification webhook 410 Gone **Date of Record:** 2026 November 26 **Scope:** Applies to A2A v1.0 (Agent2Agent) client agents that register push-notification webhooks against a remote server agent's task lifecycle, and whose task-state machine is driven by webhook callbacks rather than by polling `tasks/get`. Does not apply to synchronous request/response A2A calls, nor to webhook contracts that use signed replayable event streams with monotonic sequence numbers. ## Core Distinction The A2A v1.0 task lifecycle is a directed state machine — `submitted → working → (input-required ⇄ working) → completed | failed | canceled` — and the spec treats these as terminal-or-transient states, not as a log. Push notifications are *edge-triggered deltas*: each webhook POST carries one `TaskStatusUpdateEvent` or `TaskArtifactUpdateEvent` describing a transition. The invariant most client agents silently assume is that webhook delivery is at-least-once and that a `410 Gone` on the registered callback URL is a *transport* failure to be retried. It is not. A `410 Gone` from the client's own webhook receiver (or the intermediary in front of it) is a *contract-level* signal that the registration is dead, and the correct A2A response is `tasks/pushNotificationConfig/delete` followed by re-registration — not retry. The non-obvious failure is that a client which retries on 410 keeps receiving no events, its local task state machine stalls in `working` forever, and when it finally does re-register, the server replays the *current* state as a single event, collapsing the intermediate transitions the client needed to reconcile its artifact ledger. The structural signal that distinguishes a stalled-but-alive task from a genuinely terminal one is the absence of a *terminal event* paired with the presence of a *live, acked registration* — and 410 breaks exactly that pairing. ## What Was Observed A client agent dispatched a long-running `tasks/send` to a remote server agent and registered a webhook at `https://client.example/a2a/hook/{taskId}`. The server returned `TaskState.working` with a `pushNotificationConfig` id. The client's local state machine entered `working` and set a 30-minute stall timer. At T+8min the client's edge proxy rotated and began returning `410 Gone` for the old hook path (the taskId-scoped route was re-provisioned under a new path prefix). The server agent, per its own retry policy, attempted delivery of a `TaskStatusUpdateEvent(state=input-required, message="need clarification on field X")`. It received 410, retried three times with exponential backoff, then — correctly per the server's interpretation of 410 as permanent — marked the `pushNotificationConfig` as `failed` internally and *stopped delivering*, but did **not** transition the task itself. The task remained in `working` on the server, waiting for an input that would never be requested of the client. Three structural signals were present and were initially misread: 1. **No terminal event, no stall-timer expiry.** The client's 30-minute timer fired at T+30min, but the client's stall handler treated "no event received" as "server still working" and re-armed the timer. This is the classic edge-triggered-delivery assumption: absence of a delta is read as absence of change, when in fact it is absence of *delivery*. 2. **`tasks/get` returned `working` with a `status.timestamp` frozen at T+8min.** The server's task state was genuinely unchanged — the server was blocked on `input-required` but had no way to *tell* the client. The frozen timestamp was the tell: a task legitimately in `working` for 22 minutes with no artifact updates and no status timestamp advance is not "slow," it is "unreachable." 3. **The `pushNotificationConfig` id was still present in the task's `pushNotificationConfigs` list on the server.** This is the trap. The registration object existed; its *delivery* was dead. The spec does not require the server to delete a config on delivery failure, only to stop using it. So the client's liveness check ("is my config still registered?") returned true while the delivery channel was gone. When the client finally re-registered at T+41min (new path, new config id), the server, on the next delivery attempt, sent a single `TaskStatusUpdateEvent(state=input-required)`. The client's state machine had been in `working` and accepted the transition — but the intermediate events the client had expected (the artifact partial updates the server had emitted during the 8-minute window before the proxy rotation) were never delivered and were never replayed. The client's artifact ledger was missing three partial chunks. The task completed, but the assembled artifact was truncated, and the client's verifier flagged a checksum mismatch against the server's `final` artifact event — a *verification replay discrepancy* that surfaced only at `completed`. ## Condition of Validity This analysis holds only when all of the following are true: - The client drives its task state machine from webhook events and does not independently poll `tasks/get` on a cadence shorter than the server's event cadence. - The server treats `410 Gone` as permanent (per RFC 9110 §15.5.11) and stops delivery without transitioning the task or deleting the config. - The A2A binding in use does not define a monotonic `eventSequence` or `lastEventId` on `TaskStatusUpdateEvent` / `TaskArtifactUpdateEvent` that the client can use to detect gaps. (A2A v1.0 does not mandate one; some server implementations add it as an extension.) - The client's webhook receiver path is mutable (proxy rotation, blue/green deploy, taskId-scoped routing) such that a previously-valid URL can return 410 without the client's application layer knowing. It does **not** hold when the client polls, when the server replays full state on re-registration (some do, as a `Task` snapshot rather than a delta), or when the transport is a persistent SSE stream where 410 is a stream-level error the client observes directly. ## Decision Boundary The boundary is between two interpretations of "no event received": | Signal | Interpretation A (retry) | Interpretation B (re-register + reconcile) | |---|---|---| | `tasks/get` state == `working`, `status.timestamp` frozen > 2× expected event interval | Server slow | Delivery channel dead — **act** | | `pushNotificationConfig` id present in `tasks/get` | Registration alive | Registration object alive, delivery dead — **act** | | Last received event was non-terminal | Task in progress | Task state unknown past last event — **act** | | Re-registration returns same config id | Idempotent, fine | Server deduped; delivery may still be broken — **verify with a probe event** | The decision rule the client should have applied: **a non-terminal task whose `status.timestamp` has not advanced across two consecutive `tasks/get` polls, while a `pushNotificationConfig` is registered, is in an *unknown* state, not a *working* state.** The correct response is not to re-arm the stall timer but to (a) delete the config, (b) re-register, (c) issue a `tasks/get` to snapshot current state, and (d) reconcile the local artifact ledger against the snapshot's `artifacts` array, treating any local partial chunks not present in the snapshot as *suspect* and requiring a full-artifact refetch before `completed` is accepted. The invariant required to bound this: **the client must never transition to `completed` on the basis of a single terminal event if any prior event was missed.** Missed-event detection requires either a server-supplied sequence number (preferred) or, absent that, a snapshot-reconcile step on every re-registration. Without one of these, the terminal event is not a proof of continuity — it is a claim the client cannot verify. ## Operational Effect The observable effect of getting this wrong is not a crash. It is a **silent state regression**: the task completes, the client reports success, and the artifact is wrong. The failure surfaces downstream — in a verifier, in a consumer of the artifact, or in a checksum mismatch at a later stage — long after the A2A task is closed and the trace is cold. Because the server's task state was never wrong (it was `working`, then `input-required`, then `completed`), server-side logs show a clean lifecycle. Because the client's state machine never saw an invalid transition (it went `working → input-required → completed`), client-side logs show a clean lifecycle. The gap is invisible in both traces; it exists only in the *delivery* layer between them. The operational guardrail is to treat the push-notification registration as a first-class resource with its own liveness, not as a fire-and-forget side effect of `tasks/send`. That means: a heartbeat probe event on registration, a `status.timestamp`-based staleness detector independent of event receipt, and a mandatory snapshot-reconcile on any re-registration. The code below encodes the detector and the reconcile gate. ```python import time from dataclasses import dataclass, field from typing import Optional class A2AStateRegressionError(RuntimeError): """Raised when a task's local state machine would accept a terminal event without proof that no intermediate events were missed.""" @dataclass class TaskWatch: task_id: str config_id: Optional[str] last_event_seq: Optional[int] # None if server provides no sequence last_status_ts: float # server's status.timestamp, epoch secs last_event_recv: float # client clock, epoch secs local_artifact_chunks: dict = field(default_factory=dict) expected_event_interval: float = 60.0 stall_polls: int = 0 def detect_delivery_death(watch: TaskWatch, now: Optional[float] = None) -> bool: """Structural signal: config registered, non-terminal state, but status.timestamp has not advanced across two polls.""" now = now or time.time() stale = (now - watch.last_status_ts) > 2 * watch.expected_event_interval no_recent_event = (now - watch.last_event_recv) > 2 * watch.expected_event_interval return bool(watch.config_id) and stale and no_recent_event def reconcile_on_reregister( watch: TaskWatch, snapshot_artifacts: dict, incoming_terminal_event: dict, ) -> None: """Gate terminal transitions on snapshot-reconcile after re-registration. snapshot_artifacts: the `artifacts` array from tasks/get, keyed by chunk id. incoming_terminal_event: the event that would move us to completed/failed. """ if incoming_terminal_event.get("state") not in ("completed", "failed", "canceled"): return # non-terminal transitions are always safe to apply # If the server supplies a sequence number, we can prove continuity. if watch.last_event_seq is not None and "sequence" in incoming_terminal_event: if incoming_terminal_event["sequence"] != watch.last_event_seq + 1: raise A2AStateRegressionError( f"task {watch.task_id}: terminal event seq " f"{incoming_terminal_event['sequence']} does not follow " f"last seen seq {watch.last_event_seq}; events were missed " f"between delivery death and re-registration" ) return # No sequence number: fall back to snapshot reconciliation. # Any local chunk not present in the snapshot is suspect and must be # refetched before we can trust the terminal event. suspect = set(watch.local_artifact_chunks) - set(snapshot_artifacts) if suspect: raise A2AStateRegressionError( f"task {watch.task_id}: {len(suspect)} local artifact chunk(s) " f"{sorted(suspect)} absent from server snapshot after " f"re-registration; terminal event is not proof of continuity. " f"Refetch full artifact before accepting completion." ) # Even with no suspect chunks, if we re-registered mid-task we cannot # prove we saw every intermediate status transition. Require an # explicit snapshot-ack from the server before closing. if watch.config_id and watch.stall_polls >= 2: raise A2AStateRegressionError( f"task {watch.task_id}: terminal event accepted after " f"re-registration with no sequence number and no snapshot-ack; " f"state regression cannot be ruled out" ) def on_webhook_post(watch: TaskWatch, event: dict) -> None: """Entry point for a webhook delivery. 410 is handled upstream by the receiver; this function only sees events that arrived.""" watch.last_event_recv = time.time() if "sequence" in event: watch.last_event_seq = event["sequence"] if event.get("state") == "working": watch.stall_polls = 0 reconcile_on_reregister(watch, event.get("snapshot", {}), event) # apply transition only after reconcile gate passes watch.local_artifact_chunks.update(event.get("artifacts", {})) ```