# What structural signals indicate terminal-state divergence in A2A v1.0 task lifecycle negotiation across vendor boundaries **Date of Record:** 2026 November 18 **Scope:** Applies to A2A v1.0 agent-to-agent delegation where the caller and callee are operated by different vendors and the callee's task transitions through `submitted → working → terminal`. Does not apply to intra-vendor delegation, to streaming-only `message/stream` sessions without a persisted task object, or to A2A versions prior to 1.0 where `TaskState` lacked the `rejected`/`auth-required` split. ## Core Distinction The failure is not "the remote agent returned an error." It is that the **agent card's declared capabilities and the task's actual lifecycle state can disagree in a way that is locally consistent on each side**. The caller sees a `working` task that never terminates; the callee has already moved the task to a terminal state it considers final but which the caller's state machine cannot name. The structural signal is a *mismatch between the card's `capabilities.streaming`/`pushNotifications` flags and the transport the task actually settled on*, combined with a terminal state the caller's enum does not recognize. This is distinct from a timeout or a network partition. In a timeout, both sides agree the task is unresolved. Here, one side believes the task is done and the other believes it is running. The disagreement is *semantic*, not *temporal*. ## What Was Observed A delegation from a caller (vendor A) to a callee (vendor B) over JSON-RPC. The callee's agent card advertised: - `capabilities.streaming: false` - `capabilities.pushNotifications: true` - `defaultInputModes: ["text/plain"]`, `defaultOutputModes: ["text/plain"]` The caller, seeing `streaming: false`, issued `tasks/send` (synchronous) and waited for a terminal response. The callee, because `pushNotifications: true` was set, accepted the task, returned a `Task` object in state `working`, and *deferred* completion to a push notification to a webhook the caller had not registered (the caller's card negotiation step had read `pushNotifications` as "supported," not "required for completion"). Three structural signals preceded the divergence: 1. **The returned `Task.status.state` was `working` on a non-streaming `tasks/send`.** A synchronous send that returns a non-terminal state is the primary tell: the callee has committed to an out-of-band completion path. Per the spec this is legal only if the callee will drive the task to terminal via push or polling, but the caller's synchronous code path had no polling loop because `streaming: false` read as "synchronous and terminal." 2. **The agent card's `skills[].inputModes` omitted `text/plain` for the matched skill**, even though `defaultInputModes` included it. The skill-level override was the effective contract; the default was a decoy. The caller matched on skill ID and negotiated on defaults. 3. **The callee's `Task.status.message` carried a `role: "agent"` part with a `kind: "data"` payload containing a `pushConfigRequired` marker** — a vendor extension not in the A2A schema. The caller's strict schema validation dropped unknown fields, so the marker vanished before it reached the state machine. The task sat in `working` on the caller's side for 72 hours. On the callee's side it had reached `completed` within four minutes and been garbage-collected after its retention window. A later `tasks/get` returned `-32001 TaskNotFound`, which the caller's error handler classified as a transient transport error and retried — indefinitely. ## Condition of Validity The divergence is *reachable* only when all of the following hold: - The callee advertises any out-of-band completion capability (`pushNotifications: true`) while advertising `streaming: false`. These two flags are not mutually exclusive in the spec, and vendors routinely set `pushNotifications` to mean "we can" rather than "we will." - The caller treats `streaming: false` as an implicit guarantee of synchronous terminality. This is the caller-side bug, and it is extremely common because the two flags are documented in separate sections. - The callee's terminal state is either a vendor extension or a spec state the caller's enum does not cover (e.g., `rejected` introduced in 1.0, or a custom `state: "escalated"`). - The caller performs strict schema validation that strips unknown fields from `Task.status.message` before the state machine inspects them. Remove any one condition and the divergence collapses into a clean error. The dangerous configuration is the *intersection*: out-of-band completion advertised, synchronous expectation inferred, extension state used, unknown fields stripped. ## Decision Boundary Do not treat `capabilities.streaming: false` as a promise of synchronous terminality. Treat it as "no incremental delivery." The correct inference from the card is: - If `streaming: false` AND `pushNotifications: false`, a `tasks/send` returning `working` is a protocol violation — fail fast. - If `streaming: false` AND `pushNotifications: true`, a `tasks/send` returning `working` means **you must poll `tasks/get` or you will orphan the task**. The card has told you the callee can complete out of band; it has not told you it will call you. - Never negotiate input/output modes from `defaultInputModes` when a `skills[]` entry matched. The skill-level modes are the binding contract. The boundary is this: **a non-terminal state returned from a synchronous send is a structural signal that the caller must switch to polling, regardless of what the card's streaming flag suggested.** If your caller code has no polling path for `streaming: false` callees, that is the defect, not the callee's behavior. Additionally, when `tasks/get` returns `TaskNotFound` for a task you believe is `working`, do not retry. `TaskNotFound` on a previously-acknowledged task ID means the callee reached terminal and expired it. Escalate to reconciliation, not retry. ## Operational Effect Callers that adopt the corrected inference (poll on non-terminal synchronous return) convert a 72-hour silent orphan into a bounded polling loop that terminates within the callee's retention window. The reconciliation step — on `TaskNotFound`, mark the local task `unknown-terminal` and require human or supervisor review rather than retry — prevents the infinite-retry amplification that turned one orphaned task into a sustained request storm against the callee's `tasks/get` endpoint. The structural lesson: in cross-vendor A2A, **the agent card describes capabilities, not commitments**. The only commitment is the state of the `Task` object you actually received. Read the returned state, not the advertised flags, and treat any non-terminal synchronous return as an instruction to poll. ```python from enum import Enum class TaskState(Enum): SUBMITTED = "submitted" WORKING = "working" COMPLETED = "completed" FAILED = "failed" CANCELED = "canceled" REJECTED = "rejected" UNKNOWN_TERMINAL = "unknown-terminal" class LifecycleDivergenceError(RuntimeError): """Raised when a synchronous send returns non-terminal state without a polling path, or when a previously-acknowledged task vanishes (terminal + expired on callee side).""" def classify_send_response(card: dict, task: dict) -> str: """Decide the caller's next action from the returned Task, not the card flags.""" state = task.get("status", {}).get("state") streaming = card.get("capabilities", {}).get("streaming", False) push = card.get("capabilities", {}).get("pushNotifications", False) if state in ("completed", "failed", "canceled", "rejected"): return "terminal" if state in ("submitted", "working"): if not streaming and not push: # Synchronous send promised terminality; callee violated it. raise LifecycleDivergenceError( f"non-terminal state {state!r} returned from tasks/send with " f"streaming=False and pushNotifications=False; no completion path exists" ) # Out-of-band completion is possible: caller MUST poll. return "poll" # Vendor extension state the caller cannot name. raise LifecycleDivergenceError( f"unrecognized task state {state!r}; caller enum cannot represent it. " f"Reconcile via tasks/get before retrying." ) def reconcile_get_response(task_id: str, rpc_error: dict) -> TaskState: """A TaskNotFound on a previously-acknowledged task means terminal + expired.""" if rpc_error.get("code") == -32001: return TaskState.UNKNOWN_TERMINAL raise LifecycleDivergenceError( f"unexpected tasks/get error for {task_id}: {rpc_error!r}" ) ```