# Why does an instance ignore a valid A2A task-state transition after the card's `defaultInputModes` drift from the negotiated task schema? **Date of Record:** 2026 November 24 **Scope:** Applies to A2A v1.0 peer-to-peer task orchestration where a client agent discovers a remote Agent Card, negotiates `defaultInputModes`/`defaultOutputModes`, and drives a task through `submitted → working → input-required → completed` while a push-notification webhook reconciles state. Does not apply to single-shot stateless RPC calls or to MCP tool invocations, which lack a task lifecycle. ## Core Distinction The failure is not a transport error, and it is not a schema-validation error. It is a *reconciliation* failure between two independently versioned views of the same task: the **Agent Card snapshot** the client cached at discovery time, and the **task schema** the server actually bound when it accepted `tasks/send`. A2A v1.0 lets a server mutate its card (add a modality, drop a content type, tighten `defaultInputModes`) without invalidating in-flight tasks — correctly, since tasks carry their own `TaskStatus` and artifact history. But the push-notification webhook contract has no field that says *which card revision a given `TaskStatusUpdateEvent` was produced under*. When the client's cached card and the server's live card diverge, the client's state machine evaluates the incoming `status.state` against a stale transition table and *silently drops* a legal transition — most often `working → input-required`, which it interprets as "the server is asking for a modality I removed from my capability set," and therefore treats as terminal-unreachable rather than as a prompt for input. The invariant that is violated: **a task's legal state-transition set must be a function of the task's bound schema, not of the card the client last fetched.** A2A v1.0 does not enforce this. The card is advisory; the task is authoritative. Agents that treat the card as authoritative for transition legality will deadlock. ## What Was Observed A client agent (caller) discovers a remote agent's card at `/.well-known/agent.json`. The card advertises `defaultInputModes: ["text/plain", "application/json"]` and capabilities `pushNotifications: true`. The client caches this card with a TTL of 3600s and begins a long-running task via `tasks/send`, binding `acceptedOutputModes` to `["text/plain"]`. Mid-task, the server operator redeploys. The new card drops `application/json` from `defaultInputModes` (a downstream dependency was removed) but — critically — the *running task* was created under the old schema and its bound `acceptedOutputModes` still includes `text/plain` only, so the task itself is unaffected. The server emits a `TaskStatusUpdateEvent` with `status.state = "input-required"` and a `status.message` requesting a clarification, delivered over the registered webhook. The client's webhook handler receives the event, looks up the task's transition table, and — because its *cached card* now reports a different `defaultInputModes` set than the one recorded in its local task record's `metadata.cardRevision` — fails a consistency check it was never required to perform. It classifies the event as `STALE_CARD_EVENT`, logs it, and does not transition the task. The server waits for a `tasks/send` continuation that never arrives. The task sits in `input-required` until the server's task TTL expires and it transitions to `failed` with reason `input_timeout`. The client, meanwhile, still believes the task is `working` and keeps its own timeout clock running against a task that is already dead server-side. The trace: ``` client: tasks/send {acceptedOutputModes:["text/plain"], metadata:{cardRev:"sha256:aaa"}} server: TaskStatusUpdateEvent {state:"working", taskId:"t-9"} server: [redeploy; card now sha256:bbb, defaultInputModes:["text/plain"]] server: TaskStatusUpdateEvent {state:"input-required", taskId:"t-9", message:"which date range?"} client: [webhook handler] card_rev(t-9)=aaa, cached_card_rev=bbb -> MISMATCH client: drop event, no transition, task stays "working" locally server: [task TTL 300s] -> TaskStatusUpdateEvent {state:"failed", reason:"input_timeout"} client: [webhook handler] state "failed" from "working" is legal -> transition to failed client: reports failure to user, but the actual cause was a dropped input-required ``` Note the second-order effect: the terminal `failed` event *is* accepted, because `working → failed` is legal under any card revision. So the client never learns it dropped the `input-required`. The failure is invisible in the client's logs as anything but a server-side timeout. ## Condition of Validity The invariant "transition legality is a function of bound task schema, not cached card" holds only when the client can distinguish *card revision at task creation* from *card revision at event receipt*. If the client stores `metadata.cardRevision` at `tasks/send` time and the server echoes it on every `TaskStatusUpdateEvent` (A2A v1.0 does not mandate this echo — it is an extension), the client can evaluate transitions against the *bound* revision and the failure does not occur. The failure requires all three of: 1. The server mutates its card while a task is in flight (legal, expected). 2. The client caches the card and uses it — rather than the task record — to validate transition legality. 3. The server does not echo the bound card revision on status events (the v1.0 default). Remove any one and the failure is bounded. The third condition is the sharp one: A2A v1.0's `TaskStatusUpdateEvent` schema has no `cardRevision` or `boundSchema` field, so *by default* the client has no way to correlate an event with the schema under which its transition was legal. The protocol leaves this to application-layer metadata. ## Decision Boundary The boundary is: **validate transitions against the task's bound schema snapshot, never against the live or cached card.** Concretely, on `tasks/send` the client must persist a frozen `boundSchema` (the subset of the card that governs this task: `defaultInputModes`, `defaultOutputModes`, `capabilities.pushNotifications`) into the task record, and the webhook handler must evaluate `status.state` transitions against that frozen snapshot. The live card is used only for *new* task creation and for capability gating of *new* modalities — never for retroactive validation of an in-flight task. The complementary server-side guardrail: the server must not transition a task to `input-required` unless the `status.message` is expressible in a modality the task was bound with. If the task was bound with `acceptedOutputModes:["text/plain"]` and the server needs to request input in `application/json`, that is a *server* bug — it should have failed the task at bind time, not at input time. The server must also emit a `failed` with reason `schema_drift` (not `input_timeout`) if it detects its card changed under a live task in a way that invalidates the task's bound modalities, so the client's terminal transition carries the true cause. ## Operational Effect Without the frozen-snapshot discipline, card drift converts a recoverable `input-required` into an unrecoverable `input_timeout`, and the client's failure attribution is wrong — it blames the server for a timeout when the server was waiting for a response the client suppressed. In multi-agent swarms this compounds: an orchestrator that fans out to N peers, each caching cards independently, will see a fraction of its subtasks fail with `input_timeout` on every peer redeploy, with no common cause visible in any single task's trace. The orchestrator's retry logic re-sends the task against the *new* card, which may bind a different `acceptedOutputModes`, producing a different result than the first attempt — a silent non-determinism that looks like flaky tool output but is actually card-revision skew. The guardrail is cheap: freeze the bound schema at task creation, echo a revision hash on every status event, and treat any transition to `input-required` whose prompt modality is not in the frozen `defaultInputModes` as a server-side contract violation rather than a client-side drop. The last rule is the one that turns an invisible timeout into a diagnosable error. ```python import hashlib from dataclasses import dataclass, field from typing import Literal TaskState = Literal["submitted", "working", "input-required", "completed", "failed", "canceled"] LEGAL_TRANSITIONS: dict[TaskState, set[TaskState]] = { "submitted": {"working", "failed", "canceled"}, "working": {"input-required", "completed", "failed", "canceled"}, "input-required": {"working", "failed", "canceled"}, "completed": set(), "failed": set(), "canceled": set(), } class CardDriftTransitionError(RuntimeError): """Raised when a status event's transition is legal under the live card but not under the task's frozen bound schema, or vice versa.""" @dataclass(frozen=True) class BoundSchema: input_modes: frozenset[str] output_modes: frozenset[str] revision: str @classmethod def from_card(cls, card: dict) -> "BoundSchema": modes = frozenset(card.get("defaultInputModes", [])) outs = frozenset(card.get("defaultOutputModes", [])) rev = hashlib.sha256( repr(sorted(modes) + sorted(outs)).encode() ).hexdigest()[:12] return cls(input_modes=modes, output_modes=outs, revision=rev) @dataclass class TaskRecord: task_id: str bound: BoundSchema state: TaskState = "submitted" history: list[tuple[TaskState, TaskState]] = field(default_factory=list) def apply_status_event( task: TaskRecord, new_state: TaskState, prompt_modality: str | None = None, event_card_revision: str | None = None, ) -> TaskRecord: # Guard 1: transition must be legal under the FROZEN bound schema. if new_state not in LEGAL_TRANSITIONS[task.state]: raise CardDriftTransitionError( f"illegal transition {task.state}->{new_state} for task {task.task_id}" ) # Guard 2: input-required must request a modality the task was bound with. if new_state == "input-required": if prompt_modality is None: raise CardDriftTransitionError( f"input-required on {task.task_id} carries no prompt modality" ) if prompt_modality not in task.bound.input_modes: raise CardDriftTransitionError( f"input-required on {task.task_id} requests modality " f"{prompt_modality!r} not in bound schema {sorted(task.bound.input_modes)} " f"(revision {task.bound.revision}); server violated bind contract" ) # Guard 3: if the event carries a card revision, it MUST match the bound one. if event_card_revision is not None and event_card_revision != task.bound.revision: raise CardDriftTransitionError( f"status event for {task.task_id} produced under card revision " f"{event_card_revision}, task bound under {task.bound.revision}; " f"refusing to reconcile across revisions" ) task.history.append((task.state, new_state)) task.state = new_state return task ```