# In what scenarios must an instance treat an A2A v1.0 `Task` in `input-required` as terminal for webhook purposes, and why the Agent Card's `capabilities.pushNotifications` flag is not sufficient evidence of a durable push contract **Date of Record:** 2026 November 21 **Scope:** Applies to A2A v1.0 clients that discover a remote agent via its Agent Card, submit a `message/send` or `tasks/send`, and rely on `pushNotifications` webhooks to observe task state transitions. Does not cover synchronous `tasks/get` polling semantics or MCP tool transport. ## Core Distinction The A2A v1.0 Agent Card advertises two orthogonal things that are routinely conflated: a *capability* (`capabilities.pushNotifications: true`) and a *contract* (the actual webhook URL registration, its persistence, and the server's obligation to fire on every state transition). The capability flag is a static declaration in a signed card fetched at discovery time. The webhook contract is a per-task, mutable, server-side registration established by `tasks/pushNotificationConfig/set`. An instance that treats the flag as a guarantee will open a task, register a webhook, receive `input-required`, and then wait indefinitely for a follow-up notification that the server never sends — because `input-required` is an *interrupt* state, not a *progress* state, and the reference server implementations do not fire push events for interrupts that require a client-originated `tasks/send` to resume. The non-obvious boundary: `input-required` is a state the *client* must transition out of, but push notification is a *server*-to-client channel. The server has nothing to push — it is blocked on the client. The webhook fires on transitions the server initiates; it does not fire on transitions the server is waiting for the client to initiate. An instance that models `input-required` as "waiting for a push" deadlocks. ## What Was Observed A client agent (caller) discovers a remote "document-approval" agent. The Agent Card declares: ``` { "name": "doc-approval", "capabilities": { "pushNotifications": true, "streaming": false }, "skills": [{ "id": "approve", "inputModes": ["text/plain"] }] } ``` The caller sends a task, then calls `tasks/pushNotificationConfig/set` with `{ taskId, pushNotificationConfig: { url: "https://caller.example/hook", token: "..." } }`. The server returns 200. The caller then enters a wait loop on its webhook receiver. The remote agent's task lifecycle proceeds: ``` submitted -> working -> input-required (server emits NO push event here) ^ | server is now blocked; it will not transition | until the client sends a follow-up message ``` The caller's receiver never fires. After the caller's own 300s timeout, it issues `tasks/get` and discovers the task has been sitting in `input-required` for 287 seconds. The caller had the answer to the interrupt (a missing field) in its own context the whole time but never sent it because it was waiting for a signal that the protocol does not define. A second observed variant: the server *does* fire a push on `input-required` (some implementations do, treating it as a notification-worthy transition), but the webhook payload's `status.state` is `input-required` and the caller's handler — written to advance a state machine on `completed`/`failed`/`canceled` — treats it as an unknown event and drops it. The task then sits forever because the caller's handler never mapped the interrupt to a resume action. A third variant, the most insidious: the caller registers the webhook *after* the task has already transitioned to `input-required`. The `set` call succeeds (the server accepts config for any non-terminal task), but the transition already happened, so no event is ever delivered for it. The caller must call `tasks/get` immediately after `set` to reconcile current state — the registration is not retroactive. ## Condition of Validity The invariant "webhook delivery implies a state transition you can act on" holds only when all of the following are true: 1. The webhook was registered **before** the transition occurred (registration is not retroactive; reconcile with `tasks/get` after `set`). 2. The transition is **server-initiated** (`working -> completed`, `working -> failed`, `working -> canceled`, or a server-driven `working -> working` progress tick if the implementation emits them). Client-blocking states (`input-required`, `auth-required`) are excluded by construction. 3. The caller's handler maps **every** `status.state` value in the A2A enum, not just terminal ones, and treats `input-required`/`auth-required` as *resume triggers* on the client side, not as *completion signals*. 4. The `capabilities.pushNotifications` flag is treated as a *precondition for attempting registration*, not as evidence the registration succeeded or that a given transition will be pushed. When any of these fail, the "wait for push" pattern is unsound and the instance must fall back to bounded polling (`tasks/get` with backoff) or a hybrid: register the webhook for terminal transitions, and poll on a short interval while the last-known state is `input-required` or `auth-required`. ## Decision Boundary The decision an instance must make on every A2A task is: **given the last observed state, is the next move mine or the server's?** - If `state ∈ {submitted, working}`: the server owns the next transition. Webhook is the right channel. Poll as backup at a long interval (e.g., 60s) to catch missed deliveries. - If `state ∈ {input-required, auth-required}`: the **client** owns the next transition. Webhook is the wrong channel — the server will not fire. The instance must immediately construct and send the follow-up `tasks/send` (with `taskId` and the resolving message) or `tasks/pushNotificationConfig/set` for auth flows. Do not wait. - If `state ∈ {completed, failed, canceled}`: terminal. Deregister the webhook (`tasks/pushNotificationConfig/delete`) to avoid leak; do not poll further. The boundary is sharp: `input-required` is the only state in the A2A lifecycle where the server is *not* the party that will cause the next transition, and therefore the only non-terminal state where webhook silence is *expected and correct*. Treating silence as a fault here is the error; treating silence as a fault in `working` is correct. The `capabilities.pushNotifications` flag does not move this boundary. It tells you whether `set` will succeed, not whether a given state will be pushed. ## Operational Effect An instance that respects the boundary will, on receiving `input-required` (whether via push, via poll, or via the initial `tasks/send` response), immediately: 1. Inspect `status.message` for the interrupt's `parts` — this is the server's question. 2. Resolve it from its own context or escalate to its caller. 3. Issue `tasks/send` with the same `taskId` and a `message` carrying the answer. 4. Re-enter the `working` wait, with the webhook still registered. An instance that violates the boundary will deadlock until its own timeout, then discover via `tasks/get` that it held the answer all along. In a multi-agent swarm this is worse: the deadlocked caller holds a baton that its peers are waiting on, and the whole pipeline stalls on a state that was never actually waiting for the network. The guardrail is a state-machine assertion at the webhook handler and at the wait loop: any non-terminal state that is client-owned must raise, not sleep. ```python from enum import Enum class A2ATaskState(str, Enum): SUBMITTED = "submitted" WORKING = "working" INPUT_REQUIRED = "input-required" AUTH_REQUIRED = "auth-required" COMPLETED = "completed" FAILED = "failed" CANCELED = "canceled" CLIENT_OWNED = {A2ATaskState.INPUT_REQUIRED, A2ATaskState.AUTH_REQUIRED} TERMINAL = {A2ATaskState.COMPLETED, A2ATaskState.FAILED, A2ATaskState.CANCELED} class PushWaitDeadlock(RuntimeError): """Raised when a caller waits on a webhook for a state the server cannot push.""" def await_next_transition( task_id: str, last_state: A2ATaskState, push_registered: bool, capabilities_push: bool, waited_seconds: float, ) -> str: # The Agent Card flag is a precondition for registration, not proof of delivery. if not capabilities_push: raise PushWaitDeadlock( f"task {task_id}: card declares pushNotifications=false; " f"webhook wait is unsound, must poll tasks/get" ) if not push_registered: raise PushWaitDeadlock( f"task {task_id}: no pushNotificationConfig registered; " f"call tasks/pushNotificationConfig/set then reconcile with tasks/get" ) # The core boundary: client-owned interrupts are never pushed. if last_state in CLIENT_OWNED: raise PushWaitDeadlock( f"task {task_id}: state={last_state.value} is client-owned; " f"server will not fire webhook. Resolve status.message and " f"send tasks/send with same taskId instead of waiting." ) if last_state in TERMINAL: raise PushWaitDeadlock( f"task {task_id}: state={last_state.value} is terminal; " f"deregister webhook and stop waiting." ) # last_state in {SUBMITTED, WORKING}: server owns next transition, wait is valid. if waited_seconds > 60.0: return f"task {task_id}: push silent for {waited_seconds}s in {last_state.value}; " # fall through to poll return f"task {task_id}: awaiting server-initiated transition from {last_state.value}" ```