# What structural signals indicate an A2A v1.0 Task is unrecoverable after a push-notification signature mismatch **Date of Record:** 2026 November 30 **Scope:** Applies to A2A v1.0 task lifecycles where the caller relies on signed push-notification webhooks to observe terminal task states (`completed`, `failed`, `canceled`) rather than synchronous polling or streaming. Does not apply to pull-only clients, nor to streaming `message/stream` transports where the SSE channel itself carries the terminal event. ## Core Distinction The non-obvious boundary here is that a push-notification signature failure is **not** a delivery failure. It is a **state-observation failure** that is silently indistinguishable, from the caller's perspective, from a task that is still legitimately running. In A2A v1.0 the task lifecycle state machine is authoritative on the *server* (the remote agent), and the webhook is a best-effort projection of state transitions onto a caller-controlled endpoint. When the JWS signature over the notification payload fails verification—because of clock skew in the `iat`/`exp` claims, a rotated signing key the caller has not yet fetched from the agent card's `pushNotifications.jwksUri`, or a body-mutating intermediary—the caller MUST reject the notification. The task on the server, however, has already transitioned to a terminal state. There is no retransmission contract that guarantees the caller will ever see that terminal transition again. The distinguishing signal is that the server-side task state and the caller-side observed state have diverged, but the caller has no in-band way to detect the divergence. The only structural evidence is the *absence* of a terminal webhook correlated with a task ID the caller knows it dispatched—and absence is exactly the signal that a still-running task also produces. ## What Was Observed A caller agent dispatched `tasks/send` to a remote A2A agent with `pushNotification.url` set and `pushNotification.authentication.schemes: ["jws"]`. The remote agent accepted the task, returned a `Task` object in state `submitted`, and began work. The caller registered a 90-second soft deadline for the task and a 300-second hard deadline. At T+41s the remote agent completed the task and fired the webhook. The caller's verification path checked the detached JWS against the key fetched from the agent card's JWKS at dispatch time (T+0s). Between T+0s and T+41s the remote agent had rotated its signing key and published the new key at the same `jwksUri`. The notification was signed with the new key. Verification failed. The caller's handler returned HTTP 401 with a structured error body, which the remote agent's push sender logged but did not retry—A2A v1.0 specifies that a 4xx response to a push notification is a permanent delivery failure and MUST NOT be retried. The caller's task record stayed in `working` until the 300-second hard deadline, at which point the caller issued `tasks/get`. The server returned the task in state `completed` with the result artifact. The work was done at T+41s; the caller learned of it at T+300s. During the intervening 259 seconds the caller's orchestrator had already re-dispatched the task to a fallback agent under the assumption that the primary was stalled, producing duplicate side effects downstream. The signature failure itself was correct behavior. The failure was that no structural signal existed to tell the caller "you have a state-observation gap" versus "the task is still running." ## Condition of Validity This failure mode requires all of the following to hold simultaneously: 1. The caller relies on push notifications as the *sole* terminal-state channel—no concurrent `tasks/get` polling, no `message/stream` subscription. 2. The remote agent enforces JWS verification on its outbound notifications and treats a 4xx from the caller as permanent. 3. A signing-key rotation, clock-skew drift, or intermediary body mutation occurs between task dispatch and terminal transition. 4. The caller's hard deadline is materially longer than the task's actual runtime, so the divergence window is non-trivial. If the caller polls `tasks/get` on any interval shorter than the task's expected runtime, the divergence is bounded by the poll interval and the failure degrades to a latency problem, not a correctness problem. If the remote agent retries on 4xx (non-conformant to v1.0 but common), the failure may self-heal on the next attempt—unless the retry uses the same now-rejected key. If the caller's hard deadline equals the task's expected runtime, the caller will cancel and re-dispatch, which is a different (and often worse) failure. The invariant that fails is: **the caller's observed task state is a monotone, eventually-correct projection of the server's authoritative state.** It is monotone but not eventually-correct, because the projection channel can permanently drop a terminal transition. ## Decision Boundary The caller must decide, on each hard-deadline expiry, whether to (a) treat the task as failed and re-dispatch, (b) extend the deadline and issue `tasks/get`, or (c) treat the task as indeterminate and escalate. The decision boundary is whether the caller has positive evidence of a state-observation gap. Absence of a terminal webhook is *not* positive evidence—it is consistent with both "still running" and "terminal but unobserved." The only way to manufacture positive evidence is to make the observation channel redundant. The architectural guardrail is a **reconciliation poller**: on any task whose last observed state is non-terminal and whose last webhook receipt is older than a threshold derived from the task's expected runtime, issue `tasks/get` regardless of deadline. This converts the push channel from authoritative to advisory and bounds the divergence window by the reconciliation interval rather than by the hard deadline. A second guardrail is key-rotation tolerance: on JWS verification failure, the caller MUST re-fetch the JWKS from the agent card before rejecting the notification, and MUST distinguish "signature invalid against current keys" (reject, permanent) from "signature invalid against cached keys" (re-fetch, retry verification). Conflating these two is what turned a recoverable key-rotation event into a permanent observation gap. ## Operational Effect The operational consequence is that push-notification-based A2A integrations cannot treat the webhook as a reliable terminal-state signal in isolation. The push channel is a *latency optimization* over polling, not a *correctness mechanism*. Any caller that removes its reconciliation poller on the grounds that "we have push notifications now" has reintroduced the exact failure mode this record documents, and will rediscover it on the next key rotation. The second operational effect is on duplicate side effects. When the caller re-dispatches on deadline expiry without first reconciling, it produces duplicate work that the remote agent has already completed. The remote agent has no idempotency key contract in A2A v1.0 that would let it dedupe the re-dispatch against the original—the `taskId` is caller-assigned but the spec does not require the remote agent to reject a new `tasks/send` whose parameters match a recently-completed task. The caller must therefore reconcile *before* re-dispatching, not after. ```python import time from dataclasses import dataclass, field from typing import Optional class PushObservationGapError(RuntimeError): """Raised when a task's terminal state cannot be observed via push notifications and the caller has no positive evidence of the gap.""" pass class SignatureKeyStaleError(PushObservationGapError): """Raised when JWS verification fails against cached keys but the caller has not yet re-fetched the agent card's JWKS.""" pass @dataclass class TaskObservation: task_id: str last_observed_state: str = "submitted" last_webhook_at: Optional[float] = None dispatched_at: float = field(default_factory=time.time) expected_runtime_s: float = 60.0 reconciliation_interval_s: float = 15.0 def verify_push_notification( obs: TaskObservation, jws_valid_against_cached: bool, jws_valid_against_fresh: Optional[bool], ) -> bool: if jws_valid_against_cached: return True if jws_valid_against_fresh is None: # We have not re-fetched JWKS. This is a recoverable key-rotation # event, not a permanent rejection. Do NOT return False yet. raise SignatureKeyStaleError( f"task {obs.task_id}: JWS failed against cached keys; " f"re-fetch JWKS from agent card before rejecting" ) if not jws_valid_against_fresh: # Invalid even against fresh keys: permanent, but now we KNOW # we have an observation gap and must reconcile. raise PushObservationGapError( f"task {obs.task_id}: notification permanently unverifiable; " f"reconciliation poll required" ) return True def reconcile_or_redispatch(obs: TaskObservation) -> str: now = time.time() last_signal = obs.last_webhook_at or obs.dispatched_at gap = now - last_signal if obs.last_observed_state in ("completed", "failed", "canceled"): return obs.last_observed_state if gap > obs.reconciliation_interval_s: # Positive evidence of a possible observation gap: reconcile # via tasks/get BEFORE any re-dispatch decision. return "reconcile" if gap > obs.expected_runtime_s * 2: # No webhook, no reconciliation result, past 2x expected runtime. # We cannot distinguish stalled from unobserved-terminal. raise PushObservationGapError( f"task {obs.task_id}: state indeterminate after {gap:.0f}s; " f"refusing to re-dispatch without tasks/get reconciliation" ) return "continue" ```