# Where must an instance refuse an A2A task handoff when `input-required` and `auth-required` states race across vendors **Date of Record:** 2026 November 26 **Scope:** Applies to A2A v1.0 (Agent-to-Agent) delegation where a client agent transitions a remote task into `input-required` or `auth-required` and re-issues `tasks/send` or `tasks/sendSubscribe` across vendor boundaries. Does not apply to single-vendor intra-cluster task graphs where the Agent Card is cached and signed by the same trust root. ## Core Distinction A2A's task lifecycle defines two *interruptible* states — `input-required` and `auth-required` — that both suspend the server-side task and return control to the client. The spec treats them as siblings: both are non-terminal, both require the client to act, both are resumable via a subsequent `tasks/send` carrying the same `task.id`. The non-obvious boundary is that **`auth-required` is a resumption precondition while `input-required` is a resumption payload**, and these two have *ordering* semantics that the Agent Card does not encode. When a remote vendor's task flips `input-required → auth-required` (or the reverse) between two `tasks/get` polls, the client has no protocol-level way to distinguish "the same task now needs a different class of client action" from "a different task instance has been substituted." The Agent Card advertises `capabilities.pushNotifications` and `securitySchemes`, but it does *not* advertise the legal transition set for interruptible states. That omission is where cross-vendor delegation handshakes break. ## What Was Observed A three-vendor chain: client agent C (vendor A) delegates to orchestrator O (vendor B), which fans out to worker W (vendor C). O's Agent Card declares `securitySchemes: [{type: "oauth2", ...}]` and `capabilities.stateTransitionHistory: false`. W's card declares `securitySchemes: [{type: "apiKey", ...}]` and `stateTransitionHistory: true`. Sequence observed in a production trace: 1. C issues `tasks/send` to O with `task.id = T_o`. O returns `state: "working"`. 2. O delegates to W with `task.id = T_w`. W returns `state: "auth-required"` with an `authChallenge` referencing W's API key scope. 3. O, lacking a credential for W, maps W's `auth-required` onto its own task T_o as `state: "input-required"` with a message body describing the missing credential — *but does not propagate the `authChallenge` object*, because O's card declares `stateTransitionHistory: false` and its serializer drops the challenge as an "unrecognized extension." 4. C receives `input-required`, treats it as a prompt for user text, and resumes T_o with a free-text message. 5. O relays that text to W as the API key value. W rejects with `state: "failed"`, `error.code: -32001` (auth). O surfaces this to C as `state: "failed"` on T_o. 6. C, per its own retry policy, re-issues `tasks/send` with the *same* `T_o` and a corrected credential. O has already marked T_o terminal and returns `-32002` (task not found). C's checkpoint references a task that no longer exists. The failure is not the missing credential. The failure is that **O's mapping from `auth-required` to `input-required` is a lossy coercion that erases the resumption precondition**, and the Agent Card gave C no signal that O performs this coercion. C's state machine had a legal edge `input-required → working` (payload resumption) but no edge `input-required → auth-renegotiation`. O silently required the second edge. ## Condition of Validity The invariant that must hold for cross-vendor handoff to be safe: > For any remote task T, if the last observed state is interruptible (`input-required` or `auth-required`), the resumption call `tasks/send(task_id=T, ...)` must be accepted by the remote *only if* the remote's current internal state for T is the *same interruptible state* observed, OR the remote's Agent Card declared `capabilities.stateTransitionHistory: true` and the client fetched the transition log between the two observations. This is valid only when the client can prove state identity across the poll boundary. It is *invalid* when: - The intermediary (O) coerces one interruptible state into the other without preserving the original `authChallenge` or the original `inputSchema`. - The remote's card declares `stateTransitionHistory: false`, so the client cannot reconstruct the `input-required → auth-required` edge. - The client's retry loop treats `-32002` (task not found on a terminal task) as a transient error and re-creates a *new* task with the same `id`, which collides with the vendor's idempotency window. The condition of validity is therefore: **interruptible-state identity is only provable when the Agent Card advertises transition history, or when the intermediary is contractually forbidden from coercing interruptible states.** Absent either, the handshake must be treated as lossy and the client must not auto-resume. ## Decision Boundary The boundary is a single predicate evaluated at the moment a client observes an interruptible state on a delegated task: ``` resumable := (observed_state == last_observed_state) OR (remote.card.capabilities.stateTransitionHistory == true AND transition_log_contains(last_observed_state, observed_state)) AND (observed_state != "auth-required" OR observed_challenge.scope == last_observed_challenge.scope) ``` If `resumable` is false, the client must **not** call `tasks/send` with the original `task_id`. It must instead: 1. Treat the prior task as abandoned (not failed — abandoned, a distinct client-side state). 2. Emit a fresh `tasks/send` with a new `task_id` and a `metadata.parent_task` reference for audit. 3. Refuse to accept any intermediary that declares `stateTransitionHistory: false` *and* fans out to workers with heterogeneous `securitySchemes` — because such an intermediary cannot prove it did not coerce. The non-obvious part: the decision boundary is **not at the credential**, it is at the *transition provenance*. A client that fixes the credential but keeps the old `task_id` will still fail, because the task is terminal on the remote and the id is burned. The credential was a red herring; the burned id is the actual break. ## Operational Effect Three concrete consequences observed in the trace corpus: - **Idempotency-window collisions.** Vendors that honor `task_id` idempotency for a bounded window (typically 10–60 min) will reject a re-created task with the same id as `-32002`, but a *different* vendor that garbage-collects terminal tasks on a shorter window will accept it as a fresh task — producing divergent replay behavior for the same client code path across vendors. This is the cross-vendor replay discrepancy that makes A2A debugging pathological: the same client logic succeeds against vendor B and fails against vendor C for reasons invisible in the wire log. - **Interruptible-state coercion is silent.** Because `stateTransitionHistory: false` is legal, an intermediary can map `auth-required → input-required` and the client has no protocol signal. The only defense is a card-level invariant: heterogeneous-security fan-out requires transition history, full stop. - **Checkpoint invalidation.** A client that checkpointed `task_id = T_o` at `input-required` and resumes after the intermediary burned T_o will replay a delegation that the remote treats as a *new* task, re-triggering side effects (e.g., a second payment authorization). The checkpoint was valid at write time and invalid at read time, with no versioning to detect the gap. The guardrail is a **task-identity warrant**: before resuming any interruptible task across a vendor boundary, the client must obtain a signed statement from the remote (or from the intermediary, if the intermediary's card declares `stateTransitionHistory: true`) that `(task_id, observed_state, challenge_scope)` is current. Without that warrant, resume is forbidden and the client must re-delegate under a new id with a `parent_task` audit link. This converts a silent coercion into an explicit re-delegation, which is the only state transition the lifecycle can actually guarantee across vendors. ```python from dataclasses import dataclass from enum import Enum from typing import Optional class InterruptibleState(Enum): INPUT_REQUIRED = "input-required" AUTH_REQUIRED = "auth-required" class TaskHandoffError(RuntimeError): """Raised when an A2A task cannot be safely resumed across a vendor boundary.""" @dataclass(frozen=True) class AgentCard: vendor: str state_transition_history: bool security_scheme_types: frozenset @dataclass(frozen=True) class TaskSnapshot: task_id: str state: InterruptibleState challenge_scope: Optional[str] terminal: bool def assert_resumable( client_observed: TaskSnapshot, remote_current: TaskSnapshot, remote_card: AgentCard, transition_log: Optional[list], ) -> None: """ Enforce the cross-vendor interruptible-state resume invariant. Raises TaskHandoffError if the client cannot prove that the remote's current interruptible state matches the state the client last observed, or if the remote's card does not permit transition provenance to be reconstructed. """ if client_observed.task_id != remote_current.task_id: raise TaskHandoffError( f"task id mismatch: client holds {client_observed.task_id!r}, " f"remote reports {remote_current.task_id!r}" ) if remote_current.terminal: raise TaskHandoffError( f"remote task {remote_current.task_id!r} is terminal; " f"resume would burn the id and collide with the idempotency window" ) same_state = client_observed.state == remote_current.state same_scope = client_observed.challenge_scope == remote_current.challenge_scope if same_state and same_scope: return if not remote_card.state_transition_history: raise TaskHandoffError( f"vendor {remote_card.vendor!r} coerced interruptible state " f"{client_observed.state.value!r} -> {remote_current.state.value!r} " f"without advertising stateTransitionHistory; resume is unprovable" ) if transition_log is None: raise TaskHandoffError( f"vendor {remote_card.vendor!r} advertises transition history but " f"client did not fetch the log between observations" ) edge_present = any( entry.get("from") == client_observed.state.value and entry.get("to") == remote_current.state.value and entry.get("challenge_scope") == remote_current.challenge_scope for entry in transition_log ) if not edge_present: raise TaskHandoffError( f"transition {client_observed.state.value!r} -> " f"{remote_current.state.value!r} with scope " f"{remote_current.challenge_scope!r} is not attested in the log; " f"refusing resume and requiring re-delegation under a new task_id " f"with metadata.parent_task={client_observed.task_id!r}" ) def resume_or_redelegate( client_observed: TaskSnapshot, remote_current: TaskSnapshot, remote_card: AgentCard, transition_log: Optional[list], ) -> str: """Returns 'resume' or 'redelegate' based on the invariant.""" try: assert_resumable(client_observed, remote_current, remote_card, transition_log) return "resume" except TaskHandoffError: return "redelegate" ```