# In what scenarios must an instance reject an A2A v1.0 agent card that advertises a task-state transition the receiving lifecycle machine cannot honor, and how is that divergence detected before the first task is dispatched? **Date of Record:** 2026 November 27 **Scope:** Applies to A2A v1.0 peers that negotiate capabilities via agent card exchange and then drive a task lifecycle state machine (`submitted → working → input-required → completed/failed/canceled`). Does not apply to stateless request/response tool calls (MCP-style) or to card exchange where no task lifecycle is delegated. ## Core Distinction The A2A v1.0 agent card is a *declarative* capability document. The task lifecycle is an *imperative* state machine. Most integration failures are not caused by a peer lying about a capability — they are caused by the card advertising a state the receiver's machine has no legal transition for, or advertising a transition the receiver will never emit. The card says "I support `input-required`"; the receiving orchestrator has no edge from `working` back to `input-required` and no re-entry handler. Negotiation succeeds, the first task dispatches, and the divergence surfaces only when the peer transitions into a state the orchestrator cannot represent — at which point the task is silently orphaned in `working` until a timeout fires. The non-obvious invariant: **card conformance is a property of the intersection of two state machines, not of either card in isolation.** A card is only valid for a given receiver if every state it can emit is a reachable, handled node in the receiver's machine, and every transition the receiver expects to observe is one the peer will actually perform. ## What Was Observed A supervisor agent negotiated with a worker advertising: ``` capabilities: { streaming: true, pushNotifications: true } task_states: ["submitted","working","input-required","completed","failed"] ``` The supervisor's lifecycle machine modeled `input-required` as a terminal-adjacent pause that required an out-of-band human reply channel it did not have wired for this tenant. Card validation passed because the validator only checked that advertised states were a *subset* of a known vocabulary — a set-membership check, not a graph-reachability check against the receiver's own transitions. The task ran for 40 minutes. At minute 12 the worker emitted `input-required` with a clarifying question. The supervisor had no edge from `working` to `input-required`, so its transition handler threw, the event was dropped by the dispatcher's catch-all, and the task sat in `working`. The worker, correctly, waited. Neither side errored. The task was reclaimed by a lease timeout at minute 40 and re-dispatched from scratch — producing a duplicate side effect, because the worker had already partially executed. The failure trace: 1. `negotiate()` → card accepted (subset check passed). 2. `dispatch(task)` → worker enters `working`. 3. Worker → `input-required` event over the stream. 4. Supervisor transition table: no `(working, input-required)` edge → handler raises → swallowed. 5. Supervisor state remains `working`; no timeout scheduled for this path. 6. Lease expiry → re-dispatch → duplicate execution. The second, quieter failure: the worker also advertised `canceled` implicitly by omitting it from `task_states` while its runtime could still emit it on internal shutdown. Omission was read as "cannot happen." It happened. ## Condition of Validity A card is *conformant for a receiver* if and only if all three hold: 1. **Emit-reachability:** every state the peer can emit is a node the receiver's machine can enter. The peer's true emit-set is a superset of its advertised set (omission is not prohibition), so the receiver must either obtain an explicit closed-world declaration or treat the advertised set as a lower bound and require a `canceled`/`failed` fallback edge from every non-terminal node. 2. **Transition-legality:** for every advertised state `s`, the receiver has a defined edge into `s` from every state in which the peer may legally be when it emits `s`. `input-required` is only meaningful if the receiver has `(working → input-required)` *and* a resume edge `(input-required → working)` plus a reply channel. 3. **Liveness bound:** every advertised non-terminal state has a receiver-side deadline. A state the receiver cannot advance must have a timeout that transitions to `failed`, not a lease that re-dispatches. The check must be graph-based. Set-membership validation is insufficient and is the specific defect that let the above through. ## Decision Boundary Reject the card at negotiation — before any task dispatch — when any of the following is true: - The peer advertises `input-required` and the receiver lacks both a resume edge and a reply transport. (Reject rather than degrade: degrading to "ignore the question" produces silent orphaning, as observed.) - The peer advertises `streaming: true` but the receiver's transition table has no handler for partial-update events that do not change state; these will be treated as no-ops and mask stalls. - The peer's advertised state set omits `canceled` or `failed` without an explicit `closed_world: true` flag; treat omission as "may still emit" and require fallback edges. - The peer advertises `pushNotifications: true` but the receiver has no idempotency key on inbound notifications; replay of a `completed` push after a lease reclaim will double-apply. Accept with a downgrade only when the receiver can *provably* map the peer's emit-set into its own machine with a total function — including a catch-all `failed` sink for unmapped states. A partial map is not a downgrade; it is a latent orphan. ## Operational Effect Enforcing intersection-conformance at negotiation converts a class of silent, timeout-mediated, duplicate-side-effect failures into a synchronous, pre-dispatch rejection with a precise diagnostic ("card emits `input-required`; receiver has no resume edge"). The cost is that some peers that would have worked in practice are rejected on paper — acceptable, because the alternative is a 40-minute orphan plus a duplicate write. The invariant to carry forward: **never dispatch a task to a peer whose emit-set is not totally mapped into your transition graph, and never infer prohibition from omission.** ```python from dataclasses import dataclass, field from typing import Set, Tuple class CardConformanceError(RuntimeError): """Raised when an A2A agent card is not conformant for this receiver.""" pass @dataclass class ReceiverMachine: states: Set[str] edges: Set[Tuple[str, str]] has_reply_channel: bool has_idempotency: bool def can_enter(self, state: str) -> bool: return state in self.states def has_edge(self, src: str, dst: str) -> bool: return (src, dst) in self.edges @dataclass class AgentCard: advertised_states: Set[str] streaming: bool = False push_notifications: bool = False closed_world: bool = False # If closed_world is False, omission is NOT prohibition. implied_states: Set[str] = field(default_factory=lambda: {"failed", "canceled"}) def validate_card_for_receiver(card: AgentCard, recv: ReceiverMachine) -> None: # Effective emit-set: advertised is a lower bound unless closed_world. emit_set = set(card.advertised_states) if not card.closed_world: emit_set |= card.implied_states # 1. Emit-reachability: every emittable state must be enterable. unmapped = {s for s in emit_set if not recv.can_enter(s)} if unmapped: raise CardConformanceError( f"peer can emit states receiver cannot enter: {sorted(unmapped)}" ) # 2. Transition-legality: input-required needs a resume edge + reply channel. if "input-required" in emit_set: if not recv.has_edge("working", "input-required"): raise CardConformanceError( "peer emits 'input-required' but receiver has no " "(working -> input-required) edge" ) if not recv.has_edge("input-required", "working"): raise CardConformanceError( "peer emits 'input-required' but receiver has no resume edge " "(input-required -> working)" ) if not recv.has_reply_channel: raise CardConformanceError( "peer emits 'input-required' but receiver has no reply transport" ) # 3. Streaming without partial-update handling masks stalls. if card.streaming and not recv.has_edge("working", "working"): raise CardConformanceError( "peer advertises streaming but receiver has no partial-update " "self-loop on 'working'" ) # 4. Push notifications require idempotency on inbound replay. if card.push_notifications and not recv.has_idempotency: raise CardConformanceError( "peer advertises pushNotifications but receiver lacks idempotency " "keys; replayed 'completed' will double-apply" ) def negotiate(card: AgentCard, recv: ReceiverMachine) -> bool: validate_card_for_receiver(card, recv) return True ```