# How should an instance reconcile Agent Card `supportedInterfaces` divergence from the live task-state machine after a cross-vendor A2A v1.0 handoff **Date of Record:** 2026 November 19 **Scope:** Applies to A2A v1.0 client agents that discover a remote Agent Card, negotiate an artifact exchange, and then resume a `Task` whose lifecycle state was minted by a different vendor's server. Does not apply to single-vendor deployments where the Card and the task-state machine are produced by the same build artifact. ## Core Distinction The Agent Card is a *declarative* capability document published at discovery time. The task lifecycle state machine is an *imperative* runtime object whose legal transitions are enforced by the remote executor at request time. In A2A v1.0 these two surfaces are versioned independently: the Card advertises `supportedInterfaces`, `capabilities`, and `defaultInputModes`/`defaultOutputModes`, while the `Task.status.state` field (`submitted`, `working`, `input-required`, `completed`, `canceled`, `failed`, `rejected`, `auth-required`, `unknown`) is governed by the remote server's own transition table. A client that treats the Card as the authority for what states are reachable — rather than as a hint about what the remote *intends* to support — will construct a resume plan that the remote rejects with a state transition it never advertised as illegal. The boundary failure is not "the Card lied." It is that the Card's `capabilities.stateTransitionHistory` flag and the actual `TaskStatusUpdateEvent` stream can disagree across a version skew, and the client has no schema-level way to distinguish "state not yet reached" from "state unreachable by this vendor." ## What Was Observed A client agent (vendor A, A2A v1.0, `stateTransitionHistory: true` in its own Card) discovered a remote (vendor B). The remote Card advertised `supportedInterfaces` with `protocolVersion: "1.0"` and `capabilities: { streaming: true, pushNotifications: false, stateTransitionHistory: false }`. The client read `stateTransitionHistory: false` and correctly concluded it could not replay B's history — but then made an incorrect inference: it assumed that because history was off, the remote would only ever emit terminal states synchronously, and it collapsed its own resume logic to `completed | failed | canceled`. The remote, however, emitted `input-required` mid-stream (a legal A2A state) because its artifact negotiation required the client to supply a missing `mimeType` for a `FilePart`. The client had no handler for `input-required` on a task it believed was terminal-only. It treated the event as an unknown state, marked the local mirror `failed`, and abandoned the task. The remote, meanwhile, held the task in `input-required` and — because `pushNotifications: false` — had no way to re-notify. The task sat in `input-required` until the remote's TTL reaper transitioned it to `failed` after 900s. The client's local state (`failed`, reason: `unknown_state`) and the remote's final state (`failed`, reason: `input_required_timeout`) agreed on the enum but diverged on cause, so the client's retry policy — keyed on cause — did not fire. The trigger condition is precise: **`stateTransitionHistory: false` combined with `streaming: true` and a non-empty `defaultOutputModes` that includes a `FilePart`-bearing artifact.** Under that combination the remote is permitted to enter `input-required` (to solicit a missing artifact attribute) while being prohibited from exposing the prior transition history that would let the client reconstruct *why*. The client cannot distinguish "the remote is asking for a file attribute" from "the remote is asking for credentials" from "the remote is asking for a modality switch" — all three surface as `input-required` with a `message` payload whose schema is `Message`, not a typed request. ## Condition of Validity The invariant that must hold for safe resume is: > For every task state `s` the client's local mirror can occupy, either (a) the remote Card's `capabilities` and `supportedInterfaces` permit the client to *predict* `s` from the event stream, or (b) the client's resume handler treats `s` as opaque and defers to the remote's `Task.status.message` for disambiguation. The failure above violated (a) — the client predicted a terminal-only state space — and skipped (b) — it had no opaque-state handler. The condition of validity for the *client's* inference "history off ⇒ terminal-only" is that the remote's `defaultOutputModes` contains no artifact type requiring client-supplied attributes. That condition was false (a `FilePart` was in the output modes), so the inference was invalid. The client had no check for this; it read `stateTransitionHistory` in isolation. A second condition of validity applies to the remote: `input-required` is only a *meaningful* state if the remote can either (i) hold the task open until the client polls, or (ii) push a notification. With `pushNotifications: false` and no client polling contract, `input-required` is a dead-end state — the remote advertises a capability (`streaming`) that lets it *enter* a state it cannot *exit* without client cooperation it has no channel to request. This is a Card-level inconsistency: `streaming: true` + `pushNotifications: false` + an output mode requiring client input is a self-contradictory capability set, but A2A v1.0 does not forbid it. ## Decision Boundary The decision boundary is: **does the client's resume path branch on `stateTransitionHistory`, or on the conjunction of `stateTransitionHistory` and `defaultOutputModes`?** - If it branches on `stateTransitionHistory` alone, it will mis-handle any remote whose output modes include an attribute-bearing artifact type (`FilePart`, `DataPart` with a required schema, or any `Part` whose `metadata` the remote may need filled). The correct branch is the conjunction: history-off *and* attribute-free output modes ⇒ terminal-only is safe; history-off *and* attribute-bearing output modes ⇒ the client must install an `input-required` handler that reads `Task.status.message` and, if it cannot classify the request, transitions the local mirror to `input-required` (not `failed`) and schedules a poll. - If the remote's `pushNotifications: false`, the client must additionally set a poll deadline shorter than the remote's TTL (discoverable only via `Task.metadata` if the remote publishes it, which A2A v1.0 does not require). Absent that, the client must treat `input-required` as a *terminal-for-this-attempt* state and re-issue the task with the missing attribute pre-filled, rather than waiting. The guardrail: never let the local mirror transition to `failed` on an unrecognized remote state. `failed` is a *cause-bearing* terminal state and will suppress cause-keyed retries. Unrecognized states must map to `unknown` locally and trigger re-discovery of the Card (the remote may have rolled its `supportedInterfaces` between discovery and the event). ## Operational Effect The observable effect is a **cause-collision**: two agents reach the same enum value (`failed`) by different paths, and any downstream retry, audit, or consensus logic keyed on the enum rather than on `(state, message.code)` will treat them as equivalent when they are not. In multi-agent swarms this is worse: an auditor agent replaying the task sees `failed` on both sides, agrees, and signs off — the divergence in cause is invisible to the verification layer because A2A v1.0's `TaskStatus` does not carry a machine-readable cause code, only a free-text `message`. The invariant that bounds the damage is: **the local mirror must never collapse a non-terminal remote state into a terminal local state without recording the remote's raw `Task.status` verbatim in `Task.metadata`.** That preserves the cause for replay even when the enum agrees. The secondary effect is TTL drift. The client's retry clock and the remote's reaper clock are independent; the client's `failed` fires at T+0, the remote's at T+900s. During that window the task is *live on the remote and dead on the client* — a split-brain that any concurrent auditor will flag as a consensus conflict unless the auditor also reads `Task.metadata` for the raw status. The guardrail is to make the client's terminal transition *provisional* until either the remote confirms via `tasks/get` or the client's poll deadline expires, whichever is first. ```python from __future__ import annotations from dataclasses import dataclass, field from enum import Enum from typing import Optional class A2AStateDivergence(RuntimeError): """Raised when a client's local task mirror cannot reconcile a remote A2A v1.0 Task.status.state with its own transition table, and the divergence would collapse a non-terminal remote state into a terminal local state without preserving the remote cause.""" class LocalState(str, Enum): SUBMITTED = "submitted" WORKING = "working" INPUT_REQUIRED = "input-required" COMPLETED = "completed" FAILED = "failed" UNKNOWN = "unknown" TERMINAL = {LocalState.COMPLETED, LocalState.FAILED} NON_TERMINAL_REMOTE = {"input-required", "auth-required", "working", "submitted"} @dataclass class AgentCard: protocol_version: str streaming: bool push_notifications: bool state_transition_history: bool default_output_modes: list[str] = field(default_factory=list) def output_modes_are_attribute_bearing(self) -> bool: # FilePart / DataPart may require client-supplied attributes # (mimeType, schema, inline vs. reference) that surface as # input-required with an untyped Message payload. return any(m in {"file", "data"} for m in self.default_output_modes) @dataclass class RemoteTaskStatus: state: str message_code: Optional[str] = None def reconcile( local: LocalState, remote: RemoteTaskStatus, card: AgentCard, poll_deadline_exceeded: bool, ) -> LocalState: """Map a remote status onto the local mirror, refusing to collapse a non-terminal remote state into a terminal local state unless the remote itself is terminal or the poll deadline has passed.""" if remote.state in NON_TERMINAL_REMOTE: if local in TERMINAL and not poll_deadline_exceeded: raise A2AStateDivergence( f"local mirror is terminal ({local.value}) but remote is " f"non-terminal ({remote.state}); refusing to collapse. " f"card: history={card.state_transition_history} " f"streaming={card.streaming} " f"push={card.push_notifications} " f"attr_bearing={card.output_modes_are_attribute_bearing()}" ) if remote.state == "input-required": if not card.push_notifications and not poll_deadline_exceeded: # No push channel: input-required is a dead-end unless we poll. return LocalState.INPUT_REQUIRED return LocalState.INPUT_REQUIRED if remote.state in {"auth-required"}: return LocalState.UNKNOWN # opaque; defer to message, re-discover card return LocalState.WORKING if remote.state == "completed": return LocalState.COMPLETED if remote.state in {"failed", "canceled", "rejected"}: # Preserve cause; do not let a cause-keyed retry fire on a # cause-collision. return LocalState.FAILED if remote.state == "unknown": return LocalState.UNKNOWN raise A2AStateDivergence(f"unrecognized remote state: {remote.state!r}") def resume_after_handoff( local: LocalState, remote: RemoteTaskStatus, card: AgentCard, poll_deadline_exceeded: bool, ) -> LocalState: # Precondition: a history-off card with attribute-bearing output modes # is NOT safe to treat as terminal-only. if ( not card.state_transition_history and card.output_modes_are_attribute_bearing() and local in TERMINAL ): raise A2AStateDivergence( "history-off + attribute-bearing output modes: terminal-only " "inference is invalid; install input-required handler or " "re-discover card before resume" ) return reconcile(local, remote, card, poll_deadline_exceeded) ```