# Under what conditions must an instance reject a peer Agent Card whose declared `taskState` transition graph is acyclic but omits the `input-required`→`working` resumption edge **Date of Record:** 2026 November 23 **Scope:** Applies to A2A v1.0 clients that negotiate task lifecycle semantics from a remote Agent Card before sending the first `tasks/send` or `tasks/sendSubscribe` message. Does not apply to single-turn stateless RPC calls (`message/send` with no `taskId`), nor to intra-vendor calls where both endpoints share a compiler-generated state machine. ## Core Distinction The Agent Card's `capabilities.taskStates` field is a *declared* transition graph, not a *validated* one. A2A v1.0 conformance suites verify that the graph is internally well-formed — every edge references a declared state, the graph is rooted at `submitted`, and there are no unreachable states. They do **not** verify that the graph is *operationally complete* with respect to the client's own resumption protocol. The distinction that matters: an acyclic, reachable, well-formed graph can still be **non-resumable** — it can describe a lifecycle in which a task that enters `input-required` has no declared edge back to `working`, meaning the peer intends to model clarification as a **terminal** handoff (a new task per turn) rather than a **suspended** one (resume the same `taskId`). This is the boundary. Two vendors can both pass A2A v1.0 conformance, both declare `input-required` in `capabilities.taskStates`, and still disagree about whether `input-required` is a pause or a death. The client discovers the disagreement only when it attempts to resume — and by then it has already committed a `taskId` to durable storage and possibly to an auditor. ## What Was Observed A client agent (call it `orchestrator`) issued `tasks/send` to a peer (`vendorB`) whose Agent Card declared the following transition set: ``` submitted → working working → input-required working → completed working → failed input-required → completed input-required → failed ``` The graph is acyclic, all states reachable, rooted correctly. Conformance passed. `orchestrator` read `input-required → completed` and `input-required → failed` as *the peer's own terminal handling of a clarification turn*, but it read the absence of `input-required → working` as an omission — because `orchestrator`'s own lifecycle model treats `working` as the universal resumption state and assumes peers do too. The task entered `input-required` at step 4 (peer needed a missing account ID). `orchestrator` persisted the `taskId`, emitted a clarification request to its human, and went idle. On resume, it sent `tasks/send` with the **same `taskId`** and the supplied account ID, expecting the peer to transition `input-required → working`. `vendorB` rejected the message with `TaskStateError: task is in terminal-adjacent state input-required; resumption not supported`. `vendorB`'s model: `input-required` is a *handoff* state. The correct client behavior is to treat the clarification as a **new task** carrying a `contextId` back-reference, not to resume the suspended `taskId`. `orchestrator` had no code path for that, because it had inferred resumption semantics from the *presence* of `input-required` rather than from the *edges out of* it. The failure was silent at card-parse time and loud only at resume time — after the human had already been asked, after the `taskId` had been written to the audit log, and after `orchestrator` had marked the task `AWAITING_HUMAN` in its own durable store. Recovery required: mark the old `taskId` abandoned, mint a new task with a `contextId` linking back, replay the original request payload, and reconcile the audit log so the abandoned task did not appear as an orphan. The reconciliation step was the expensive part; the replay was cheap. ## Condition of Validity The invariant that `orchestrator` violated is a **resumption-edge invariant**, and it is only valid to *assume* it when one of the following holds: 1. The peer's `capabilities.taskStates` contains an explicit edge from every non-terminal state the client may suspend in, back to `working`. Formally: for every state `s` in `{input-required, paused, awaiting-approval}`, the edge `s → working` is present. 2. The peer's Agent Card declares `capabilities.resumption: "suspend"` (a v1.0 extension field; absent means `"handoff"` per the spec's default, which most clients ignore). 3. The client has a prior negotiated `contextId` with the peer and has observed a successful resume on that context. If none hold, the client **must not** treat `input-required` as a resumable pause. It must treat it as a handoff: the task is done from the peer's perspective, and the clarification is a new task. The boundary condition is that *absence of a resumption edge is not an omission — it is a declaration of handoff semantics.* A2A v1.0 does not distinguish "I forgot to declare the edge" from "I deliberately modeled this as terminal," and a conformant client must resolve the ambiguity in favor of handoff, because assuming suspend against a handoff peer produces a hard `TaskStateError` mid-task, whereas assuming handoff against a suspend peer produces only a redundant task (a soft inefficiency, recoverable by contextId dedup). The asymmetry of the two failure modes is what makes the rule non-negotiable: **suspend-assumed-on-handoff-peer fails hard and late; handoff-assumed-on-suspend-peer fails soft and early.** ## Decision Boundary The client's card-parse step must branch on the edge set, not the state set: - If `input-required → working` is present **and** `capabilities.resumption == "suspend"`: register the peer as `SUSPEND_CAPABLE`. Persist `taskId` across clarification. Resume with `tasks/send` on the same `taskId`. - If `input-required → working` is present **but** `capabilities.resumption` is absent or `"handoff"`: treat as `HANDOFF_ONLY`. Do **not** persist `taskId` as resumable. On clarification, mint a new task with `contextId`. - If `input-required → working` is **absent** (regardless of `resumption`): treat as `HANDOFF_ONLY`. The edge set is authoritative; a peer that declares `"suspend"` without the edge is non-conformant and must be rejected at negotiation, not at resume. The third branch is the one that matters operationally. A peer that declares `resumption: "suspend"` but omits `input-required → working` is **internally inconsistent** — its declared capability contradicts its declared transition graph. This is the exact condition under which the client must reject the card at parse time rather than attempt the call. Rejecting at parse time costs one failed negotiation; accepting and failing at resume costs an abandoned `taskId`, an audit-log reconciliation, and a human who was asked a question that the system then could not use. ## Operational Effect The concrete effect is that `orchestrator`'s durable task store must carry a `resumption_mode` field populated at negotiation time, not inferred at resume time. Every persisted `taskId` must be tagged with the mode under which it was minted. On resume, the client reads the tag, not the peer's current card — because the peer's card can change between turns (vendors ship card updates), and a `taskId` minted under `SUSPEND_CAPABLE` must not be resumed against a peer that has since downgraded to `HANDOFF_ONLY`. The tag is the invariant carrier; the card is only the input to minting it. Second effect: the auditor's replay check must accept that a `contextId` may span multiple `taskId`s when the peer is `HANDOFF_ONLY`. An auditor that assumes one `taskId` per logical task will flag every handoff clarification as a task discontinuity. The auditor's replay invariant must be keyed on `contextId`, not `taskId`, and the `taskId` chain within a `contextId` must be monotonic in `submitted` timestamp with no gaps. Third effect: the client's clarification UX must know, before asking the human, whether the answer will resume a task or start a new one. This determines whether the human's answer is bound to an existing audit record or opens a new one. Getting this wrong means the human's clarification is logged against a task that the peer has already closed — an orphaned answer. The guardrail is a **negotiation-time consistency check** on the card, followed by a **minting-time tag** on every `taskId`. Both are cheap; both prevent the late hard failure. ```python from __future__ import annotations from dataclasses import dataclass, field from enum import Enum from typing import FrozenSet, Tuple class CardResumptionInconsistency(RuntimeError): """Raised when a peer Agent Card's declared resumption capability contradicts its declared taskState transition graph.""" class TaskResumptionError(RuntimeError): """Raised when a persisted taskId is resumed under a mode that the peer's current card no longer supports.""" class ResumptionMode(str, Enum): SUSPEND_CAPABLE = "suspend" HANDOFF_ONLY = "handoff" @dataclass(frozen=True) class AgentCard: peer_id: str task_states: FrozenSet[str] transitions: FrozenSet[Tuple[str, str]] resumption: str | None = None # v1.0 extension; None means spec default "handoff" @dataclass class PersistedTask: task_id: str context_id: str mode: ResumptionMode state: str = "submitted" history: list[str] = field(default_factory=list) RESUMPTION_EDGE = ("input-required", "working") SUSPEND_STATES = frozenset({"input-required", "paused", "awaiting-approval"}) def negotiate_resumption_mode(card: AgentCard) -> ResumptionMode: """Resolve the peer's resumption semantics from its card, rejecting internally inconsistent cards at parse time.""" declares_suspend = card.resumption == "suspend" has_resumption_edges = all( (s, "working") in card.transitions for s in SUSPEND_STATES if s in card.task_states ) if declares_suspend and not has_resumption_edges: raise CardResumptionInconsistency( f"peer {card.peer_id!r} declares resumption='suspend' but omits a " f"resumption edge from one of {sorted(SUSPEND_STATES & card.task_states)} " f"back to 'working'; transition graph is non-resumable. " f"Reject at negotiation, not at resume." ) if declares_suspend and has_resumption_edges: return ResumptionMode.SUSPEND_CAPABLE # Absent or "handoff" resumption, OR suspend declared but edges missing # (unreachable given the raise above). Absence of the edge is a # declaration of handoff semantics, not an omission. return ResumptionMode.HANDOFF_ONLY def mint_task(card: AgentCard, context_id: str, task_id: str) -> PersistedTask: mode = negotiate_resumption_mode(card) return PersistedTask(task_id=task_id, context_id=context_id, mode=mode) def resume_task(task: PersistedTask, current_card: AgentCard, clarification: dict) -> PersistedTask: """Resume a suspended task. Branches on the mode tagged at mint time, not on the peer's current card.""" if task.mode is ResumptionMode.HANDOFF_ONLY: raise TaskResumptionError( f"task {task.task_id!r} was minted under HANDOFF_ONLY; peer " f"{current_card.peer_id!r} models input-required as a terminal " f"handoff. Mint a new task under context {task.context_id!r} " f"instead of resuming {task.task_id!r}." ) # Re-validate against the *current* card: a peer that downgraded between # turns must not receive a resume against a taskId minted under suspend. current_mode = negotiate_resumption_mode(current_card) if current_mode is not ResumptionMode.SUSPEND_CAPABLE: raise TaskResumptionError( f"peer {current_card.peer_id!r} downgraded from suspend to handoff " f"between turns; task {task.task_id!r} cannot be resumed. " f"Abandon and re-mint under context {task.context_id!r}." ) if RESUMPTION_EDGE not in current_card.transitions: raise TaskResumptionError( f"peer {current_card.peer_id!r} no longer declares " f"{RESUMPTION_EDGE!r}; resume of {task.task_id!r} is undefined." ) task.state = "working" task.history.append("resumed") return task ```