# When must an instance treat an A2A `Task.state` transition as authoritative across vendors, and when is it merely advisory? **Date of Record:** 2026 November 28 **Scope:** Applies to cross-vendor A2A v1.0 delegation where a delegating agent (client) subscribes to task state from a remote agent (server) discovered via an Agent Card, and where the client caches or acts on `Task.state`/`Task.status` transitions. Does not apply to same-vendor, same-process, or single-agent tool-call loops where state is read from local memory. ## Core Distinction The A2A v1.0 specification defines `Task.state` as a *declared* value in the server's response, not a *committed* value the client can treat as durable. The distinction that governs all downstream behavior is between **state as an observation** (a snapshot the server emitted at time T, valid only relative to the server's own lifecycle) and **state as a fact** (a value the client can use to release held resources, retry, or propagate to a third vendor). The spec's task lifecycle (`submitted → working → input-required → completed | failed | canceled`) is a *state machine on the server*, and the client has no protocol-level guarantee that the transition it observed is the transition the server is currently in. The boundary failure is treating observation as fact across a vendor boundary, because cross-vendor servers implement the lifecycle with different transition granularity, different terminal-state commit semantics, and different re-entrancy rules for `input-required`. ## What Was Observed A delegating orchestrator (vendor A) dispatched a task to a remote research agent (vendor B) discovered via B's Agent Card at `/.well-known/agent.json`. The card advertised `capabilities.streaming: true` and `skills[0].id: "deep_research"`. A sent `message/send`, received `Task.state: "working"`, then subscribed via `tasks/resubscribe` (SSE). B emitted `TaskStatusUpdateEvent` frames. After 41 seconds B emitted `state: "input-required"` with a `message` asking for a clarification ("which fiscal year?"). A's orchestrator treated `input-required` as a *soft* state, held the task open, and — critically — did **not** re-issue a `message/send` with the clarification because A's policy treated `input-required` as equivalent to `working` (a non-terminal "keep waiting" state) based on A's own internal agent's semantics, where `input-required` was a transient internal flag. Meanwhile B's server, per its own implementation, had a 60-second TTL on `input-required` tasks; on expiry it transitioned the task to `failed` with `reason: "clarification timeout"` and **stopped emitting events on the open SSE stream without sending a terminal `TaskStatusUpdateEvent`**. A's SSE connection stayed open (HTTP 200, no frames), A's orchestrator waited on a stream that would never close, and the parent task in A's DAG deadlocked for 14 minutes until a wall-clock supervisor killed it. The failure was not a network error, not a schema mismatch, and not a crash. It was a **semantic divergence in the meaning of a non-terminal state across vendor boundaries**, compounded by a **missing terminal-frame invariant**: B's server treated stream-close-without-terminal-event as a valid way to end a task; A's client treated stream-open-without-frames as "still working." Both were locally correct against their own state machines. The composition was a deadlock. A second, subtler observation from the same incident: A's Agent Card cache had B's card from 6 days earlier. B had since changed `skills[0].inputModes` from `["text/plain"]` to `["application/json"]`, and B's `input-required` handler now expected a structured clarification object. A's cached card said text was acceptable. A sent a plain-text clarification (in the runs where it sent one at all), which B rejected with `InvalidParams`, which B mapped to `failed` — but again without a terminal event on the still-open stream. The card cache staleness and the terminal-frame omission compounded: A had no way to distinguish "B rejected my input" from "B is still thinking." ## Condition of Validity A client may treat an observed `Task.state` as authoritative — i.e., may release held resources, mark the parent step terminal, or propagate the state to a third vendor — **only if all three of the following hold**: 1. **Terminal-frame invariant holds on the transport.** The client has received an explicit `TaskStatusUpdateEvent` with `final: true` (or a `Task` object whose `state` is terminal *and* which arrived as a response to a `tasks/get` poll issued *after* the last stream frame), OR the stream closed with an explicit terminal event. Stream close without a terminal event is *not* a terminal signal; it is an *indeterminate* signal and must be resolved by a `tasks/get` poll, not by inference. 2. **The card used to negotiate the task is not stale relative to the task's creation time.** The client cached the Agent Card at time T_card and created the task at T_task; if T_task − T_card exceeds the client's card-freshness bound (and there is no `etag`/`last-modified` revalidation on the card endpoint in A2A v1.0 — there is not, by default), the client must re-fetch the card before interpreting any `input-required` payload, because `inputModes` and skill schemas are the fields most likely to have changed. 3. **The client's local interpretation of each non-terminal state matches the server's declared semantics, not the client's own internal agent's semantics.** In A2A v1.0, `input-required` is a *blocking* state from the server's perspective: the server will not progress the task until it receives a follow-up `message/send` referencing the same `taskId` and `contextId`. A client that maps `input-required` to "keep waiting" (as A did, by analogy to its own internal flag) violates this. The mapping must be per-vendor, derived from the card's `capabilities` and from observed behavior, not from the client's own agent's lifecycle vocabulary. If any of the three fails, the observed state is **advisory only**: the client must not release resources, must not propagate the state, and must resolve the true state via `tasks/get` with a bounded retry, treating continued indeterminacy as a `DelegationIndeterminate` condition that escalates to the orchestrator rather than blocking. ## Decision Boundary The boundary is sharp and testable. Given an observed `Task.state = S` at time T from server V: - If `S` is terminal (`completed`, `failed`, `canceled`) **and** it arrived as a `final: true` event or as a `tasks/get` response issued after the last stream frame → **authoritative**. Release resources, propagate. - If `S` is `input-required` → **authoritative as a blocking signal** (the client *must* respond with a `message/send`), but **not authoritative as a progress signal** (the client must not assume the server will eventually time out gracefully; the client must impose its own timeout and, on expiry, issue `tasks/cancel` and then `tasks/get` to confirm the cancel took). - If `S` is `working` or `submitted` and the stream has been silent for longer than the client's `max_silence` bound → **indeterminate**. Issue `tasks/get`. If `tasks/get` returns a terminal state, treat as authoritative. If `tasks/get` returns non-terminal, the task is genuinely working; reset the silence timer. If `tasks/get` fails or returns a state inconsistent with the last stream frame (e.g., stream said `working`, poll says `completed` with no intervening event) → **the stream and the poll disagree**, which is a server-side consistency violation; treat the poll as more recent but flag the discrepancy, because the next event on the stream may be a stale replay. - If the card is stale (condition 2 above fails) → **all `input-required` payloads are advisory** until the card is re-fetched and the payload re-validated against the current `inputModes`. The non-obvious part: **`input-required` is the only non-terminal state that is simultaneously authoritative (as a demand) and non-authoritative (as a progress indicator).** Every other state falls cleanly on one side. Clients that treat `input-required` uniformly as either "authoritative" or "advisory" will either block forever (A's failure) or abandon tasks that were waiting on them (the inverse failure). ## Operational Effect The downstream effect of getting this boundary wrong is not a crash; it is a **silent DAG deadlock with a live TCP connection**. The orchestrator's supervisor sees an open SSE stream and a non-terminal task state, concludes "in progress," and does not escalate. The remote server has already moved on (its `input-required` TTL expired, task is `failed` server-side) but did not emit a terminal frame. The two state machines are each internally consistent and mutually invisible. Mean time to detection is bounded only by the wall-clock supervisor, and the failure is misclassified as "slow vendor" rather than "protocol invariant violation," so it does not generate an alert on the right signal. The architectural guardrail is a **state-authority gate** at the delegation boundary: every observed state passes through a function that classifies it as `AUTHORITATIVE`, `BLOCKING_DEMAND`, or `INDETERMINATE`, and only `AUTHORITATIVE` may release parent-DAG resources. `BLOCKING_DEMAND` triggers an immediate `message/send` with a client-side deadline. `INDETERMINATE` triggers a `tasks/get` poll and, on continued indeterminacy past the client's bound, a `tasks/cancel` + escalation. The gate must also revalidate the Agent Card when the task's age exceeds the card-freshness bound, because `input-required` payload schemas are the field most likely to have drifted. ```python import time from dataclasses import dataclass from enum import Enum from typing import Optional class StateAuthorityError(RuntimeError): """Raised when an observed A2A Task.state cannot be classified as authoritative and the caller attempted to act on it as if it were.""" pass class Authority(Enum): AUTHORITATIVE = "authoritative" # terminal, final-frame or post-frame poll BLOCKING_DEMAND = "blocking_demand" # input-required: must respond, must not wait INDETERMINATE = "indeterminate" # working/submitted past silence bound, or stream closed w/o terminal TERMINAL = {"completed", "failed", "canceled"} NON_TERMINAL = {"submitted", "working", "input-required"} @dataclass class ObservedState: state: str final_frame: bool # did a TaskStatusUpdateEvent with final:true arrive? stream_open: bool last_frame_ts: float now: float card_age_s: float card_freshness_bound_s: float def classify(obs: ObservedState, max_silence_s: float = 90.0) -> Authority: if obs.state not in TERMINAL | NON_TERMINAL: raise StateAuthorityError( f"unknown A2A state {obs.state!r}; refusing to classify" ) # Condition 1: terminal state is authoritative only with a final frame # or a post-frame poll (encoded here as final_frame=True). if obs.state in TERMINAL: if obs.final_frame: return Authority.AUTHORITATIVE # terminal state observed without final frame: could be a stale stream # replay or a poll; require explicit confirmation upstream. raise StateAuthorityError( f"terminal state {obs.state!r} observed without final:true frame; " "must be confirmed via tasks/get before releasing resources" ) # input-required is a blocking demand, never a progress signal. if obs.state == "input-required": if obs.card_age_s > obs.card_freshness_bound_s: # payload schema may have drifted; treat as advisory until re-fetch raise StateAuthorityError( "input-required received but Agent Card is stale " f"({obs.card_age_s:.0f}s > {obs.card_freshness_bound_s:.0f}s); " "re-fetch card before validating clarification payload" ) return Authority.BLOCKING_DEMAND # working / submitted silence = obs.now - obs.last_frame_ts if not obs.stream_open: # stream closed without terminal event -> indeterminate, not working return Authority.INDETERMINATE if silence > max_silence_s: return Authority.INDETERMINATE return Authority.INDETERMINATE # non-terminal is never authoritative for release def release_parent_step(obs: ObservedState) -> None: auth = classify(obs) if auth is not Authority.AUTHORITATIVE: raise StateAuthorityError( f"cannot release parent DAG step on state {obs.state!r} " f"with authority {auth.value}; resolve via tasks/get or tasks/cancel" ) # ... release held resources, propagate to downstream vendor ... ```