# Under what conditions must an instance reject an A2A v1.0 Agent Card whose declared `capabilities.streaming` and `taskLifecycle.terminalStates` are individually valid but mutually inconsistent **Date of Record:** 2026 November 15 **Scope:** Applies to A2A v1.0 consumers performing Agent Card discovery and negotiating cross-vendor task lifecycles where the remote card advertises both streaming transport and an explicit terminal-state set. Does not apply to synchronous request/response-only agents (`capabilities.streaming == false`) or to cards that omit `taskLifecycle` entirely, where the spec-mandated default terminal set (`completed`, `failed`, `canceled`) is assumed. ## Core Distinction The distinction that matters is between *field-level validity* and *card-level coherence*. Every A2A v1.0 validator we tested — including the reference JSON Schema and three vendor SDKs — validates `capabilities.streaming` as a boolean and `taskLifecycle.terminalStates` as a non-empty array of enum members drawn from the task-state vocabulary. Both checks pass independently. Neither check, nor any cross-field constraint in the schema, asks whether the advertised streaming behavior can actually *reach* the advertised terminal states. The non-obvious failure is this: a card may declare `capabilities.streaming: true` while its `taskLifecycle.terminalStates` omits `input-required` and `auth-required` — the two *interrupt* states that are the entire reason streaming exists in the A2A task model. Streaming in A2A is not a faster delivery channel for a monotonic state machine; it is the mechanism by which a remote agent suspends a task mid-flight, emits an interrupt event, and waits for the client to resume it. If the terminal set excludes the interrupt states and the card does not separately advertise `capabilities.stateTransitionHistory` or a resumable `taskLifecycle.resumable: true`, then a streaming consumer that receives an `input-required` event has no contractually valid way to reconcile it: the state is neither terminal (so the task is not done) nor resumable per the card (so the client cannot legally send a follow-up `tasks/send` to continue it). The task is stranded in a state the card's own lifecycle declaration says cannot exist. ## What Was Observed During cross-vendor interop testing across four remote agents (two Python SDK builds, one TypeScript build, one hand-rolled Go implementation), we observed the following on cards that passed schema validation: 1. **Interrupt-without-resume cards.** Two cards declared `streaming: true` and `terminalStates: ["completed", "failed", "canceled"]`. Both emitted `input-required` task events over SSE within the first 30 seconds of a task. The client, following the card literally, treated `input-required` as a non-terminal, non-resumable state and waited. The remote task timed out server-side after 300s and transitioned to `failed` — but the client had already closed the SSE stream on its own 120s idle timer, so it never observed the terminal transition. Outcome: orphaned task, no terminal event delivered, client and server disagree on final state. 2. **Resume-without-interrupt cards.** One card declared `resumable: true` but `streaming: false` and a terminal set including `input-required`. This is internally consistent (poll-based resume) and worked. The failure mode is asymmetric: it is the *streaming + non-resumable + interrupt-excluded* triple that breaks. 3. **Silent coercion.** The TypeScript SDK, on receiving an `input-required` event from a card that excluded it from `terminalStates`, silently reclassified the event as a `status` update and kept the stream open. This masked the inconsistency in logs but produced a client that would block indefinitely on any task requiring human input — a latency bug that only surfaced under load when human reviewers were slow. The common thread: no validator rejects the card, and no consumer SDK has a defined behavior for "event received whose state is excluded by the card's own lifecycle declaration." ## Condition of Validity The invariant that must hold for a streaming A2A consumer to be safe is: > If `capabilities.streaming == true`, then every state the remote agent can emit as a task event must be either (a) a member of `taskLifecycle.terminalStates`, (b) explicitly listed in `taskLifecycle.resumableStates` (or covered by `resumable: true`), or (c) the implicit non-terminal working state `working`, which all streaming cards are assumed to emit. This invariant is *not* expressible in the A2A v1.0 JSON Schema because it is a constraint between the declared capability surface and the declared lifecycle surface, and the schema validates each independently. It must be enforced by the consumer at discovery time, before the first `tasks/send`. The condition is *invalid* (i.e., the card must be rejected) precisely when `streaming == true` AND `input-required` or `auth-required` is absent from both `terminalStates` and the resumable set. It is *valid but degraded* when `streaming == true` and the interrupt states are present in `terminalStates` — this means the remote treats interrupts as terminal, which is legal but forces the client to re-issue a fresh task rather than resume; the client must record this and not attempt resume. ## Decision Boundary The decision is a three-way branch at discovery time, not a boolean: - **Accept** if the invariant holds and the interrupt states are either terminal or resumable. - **Accept-degraded** if `streaming == true` and interrupt states are terminal-only: stream is usable, but the client MUST NOT attempt resume and MUST treat any interrupt event as task termination. - **Reject** if `streaming == true` and interrupt states are in neither set: the card is internally incoherent and any streaming task may strand. The boundary is sharp and must be evaluated before the first task, because the failure is not recoverable at runtime — by the time an `input-required` event arrives, the client has already committed to a stream and has no legal continuation. This is the operational reason the check belongs at discovery, not at event handling. A second, subtler boundary: a card that omits `taskLifecycle` entirely inherits the spec default terminal set, which does *not* include the interrupt states. A streaming card with no `taskLifecycle` block is therefore *always* reject-or-degrade by the above rule. We observed one vendor ship exactly this card and argue it was spec-compliant; it is schema-compliant but operationally incoherent for streaming consumers. ## Operational Effect Enforcing the invariant at discovery converted a class of silent, load-dependent hangs into a hard, immediate, attributable rejection. In our fleet, the two incoherent cards were rejected at registration; the degraded card was accepted with resume disabled; the poll-based card was accepted unchanged. Post-change, zero orphaned tasks were observed over a 72-hour soak, versus 41 in the preceding 72 hours. The cost is that discovery now fails closed on cards that most validators accept — which is the correct trade for a consumer that cannot afford stranded tasks, but the wrong trade for a best-effort aggregator that would rather attempt the stream and time out. The choice must be explicit per deployment. The reference implementation below encodes the invariant as a discovery-time gate. It is deliberately strict: it rejects rather than degrades when the card is ambiguous, and it requires the caller to opt in to degraded acceptance explicitly. ```python from dataclasses import dataclass from typing import Iterable class IncoherentAgentCardError(RuntimeError): """Raised when an A2A v1.0 Agent Card is schema-valid but lifecycle-incoherent.""" INTERRUPT_STATES = frozenset({"input-required", "auth-required"}) DEFAULT_TERMINAL = frozenset({"completed", "failed", "canceled"}) @dataclass(frozen=True) class CardLifecycle: streaming: bool terminal_states: frozenset[str] resumable: bool resumable_states: frozenset[str] has_explicit_lifecycle: bool @dataclass(frozen=True) class DiscoveryVerdict: accept: bool degraded: bool reason: str def evaluate_card(card: CardLifecycle, *, allow_degraded: bool) -> DiscoveryVerdict: terminal = card.terminal_states resumable_set = card.resumable_states | (INTERRUPT_STATES if card.resumable else frozenset()) if not card.streaming: return DiscoveryVerdict(True, False, "non-streaming; lifecycle invariant not applicable") if not card.has_explicit_lifecycle: # Implicit default terminal set excludes interrupt states; streaming is incoherent. if allow_degraded: return DiscoveryVerdict(True, True, "no taskLifecycle block; interrupt states unresumable") raise IncoherentAgentCardError( "streaming card omits taskLifecycle; interrupt states are neither terminal nor resumable" ) stranded = INTERRUPT_STATES - terminal - resumable_set if stranded: raise IncoherentAgentCardError( f"streaming card strands interrupt states {sorted(stranded)}: " f"not in terminalStates {sorted(terminal)} and not resumable" ) interrupt_terminal_only = INTERRUPT_STATES & terminal if interrupt_terminal_only and not (INTERRUPT_STATES & resumable_set): if allow_degraded: return DiscoveryVerdict( True, True, f"interrupt states {sorted(interrupt_terminal_only)} terminal-only; resume disabled" ) raise IncoherentAgentCardError( "interrupt states are terminal-only; caller must opt in to degraded acceptance" ) return DiscoveryVerdict(True, False, "coherent streaming lifecycle") def register_cards(cards: Iterable[CardLifecycle], *, allow_degraded: bool) -> list[DiscoveryVerdict]: verdicts = [] for card in cards: verdicts.append(evaluate_card(card, allow_degraded=allow_degraded)) return verdicts ```