# What structural signals indicate a stale A2A agent card is silently downgrading task lifecycle negotiation **Date of Record:** 2026 November 28 **Scope:** Applies to A2A v1.0 inter-agent task delegation where a client agent resolves a peer via a cached or discovered `AgentCard` and negotiates a task lifecycle (`submitted → working → input-required → completed/failed/canceled`). Does not cover intra-process tool calls, MCP transport framing, or streaming-only `message/stream` channels where no card is exchanged. ## Core Distinction The failure is not "the remote agent is down." It is that the **`AgentCard` is a point-in-time capability assertion that the client treats as durable truth**, while the task lifecycle state machine it gates is negotiated per-task and per-session. When a peer renegotiates its supported lifecycle transitions (e.g., drops `input-required` resumption, or narrows `capabilities.pushNotifications`, or changes `defaultInputModes`), the card served at discovery time no longer describes the state machine the server will actually enforce. The non-obvious boundary: **A2A negotiation fails *open*, not closed.** A client that requests a transition the server no longer supports does not receive a hard rejection at request time in the common case. Instead the server accepts the task, reaches a terminal-looking state (`completed`) or parks it in `working`, and the divergence only surfaces when the client attempts a resumption (`input-required` follow-up) or a `tasks/resubscribe` against a task whose lifecycle the card promised but the server abandoned. The card's `skills[].inputModes`/`outputModes` and `capabilities` block are the only structural signals; there is no signed lifecycle manifest and no versioned transition table in v1.0. ## What Was Observed A planner agent (`client`) discovered a worker agent (`peer`) at T0 and cached its card: ``` { "name": "extract-worker", "version": "1.4.2", "capabilities": { "streaming": true, "pushNotifications": true, "stateTransitionHistory": true }, "defaultInputModes": ["text/plain", "application/json"], "defaultOutputModes": ["application/json"], "skills": [{ "id": "doc-extract", "inputModes": ["application/json"] }] } ``` At T0+40min the peer was redeployed to 1.5.0. The new card, served from a different replica, advertised `"stateTransitionHistory": false` and removed `text/plain` from `defaultInputModes`, and — critically — the 1.5.0 server no longer implements the `input-required` → `working` resumption path for `doc-extract`; it now fails the task with `failed` and `error.code: UNSUPPORTED_TRANSITION` instead of parking. The client, holding the T0 card, submitted a task, received `working`, then sent a `tasks/send` continuation carrying `text/plain` clarification expecting `input-required` semantics. The server accepted the request (HTTP 200, task envelope returned), transitioned the task to `failed`, and the client — because its cached card asserted `stateTransitionHistory: true` — attempted `tasks/get` with history and got an empty `history` array. The client's own state machine had already advanced to `awaiting-resume`, and it retried the continuation three times against a task that was terminal. No exception was raised client-side; the retries were absorbed as "still working" because the client's timeout budget was computed from the *cached* card's implied latency, not the server's. The structural signals that were present and ignored: 1. **Version drift between the cached card and the `AgentCard` served in the task response envelope.** v1.0 does not mandate echoing the card in the task envelope, but most servers do; the client never diffed it. 2. **`stateTransitionHistory: false` in the live card** — the client's `tasks/get` with `historyLength` returned empty, which is a *signal of disagreement*, not a signal of "no history yet." 3. **`defaultInputModes` no longer containing `text/plain`** — the continuation used a mode the live card no longer lists, yet the server did not reject at the transport layer. 4. **`skills[].inputModes` narrowing** — the skill-level mode list is the finer-grained authority; the client only checked `defaultInputModes`. ## Condition of Validity The invariant that bounds this failure: **A lifecycle transition is only valid if the transition is supported by the card that was live at the moment the task was accepted, and that card must be re-fetched and compared at every transition that changes the client's state machine topology (submission, resumption, resubscription, cancellation).** Concretely, the client may trust a cached card only while all of the following hold: - No `input-required` resumption has occurred since the cache timestamp. - The task envelope's echoed card (if present) is byte-identical on `version`, `capabilities`, and `skills[].inputModes`. - `tasks/get` with `historyLength > 0` returns a non-empty `history` whenever the cached card claimed `stateTransitionHistory: true`. The moment any of these breaks, the cached card is *invalid for lifecycle purposes* even though it remains valid for *discovery* (the peer is still reachable, still named `extract-worker`). This is the core distinction the failure exploits: **discovery validity and lifecycle validity have different freshness requirements, and v1.0 conflates them into a single `AgentCard` fetch.** ## Decision Boundary The boundary is between two client behaviors that look identical at the API surface: - **Trust-cached:** use the T0 card to drive the state machine, send continuations, interpret `working` as "will eventually reach `input-required`." - **Revalidate-on-transition:** before any continuation or resubscription, re-fetch the card (or diff the echoed card), and if `version` or the relevant `capabilities`/`inputModes` changed, **abort the current task as `failed` with a local `CardDriftError` rather than retrying.** The decision rule: a transition attempt whose *precondition* (the mode or capability it depends on) is absent from the live card must not be sent. Sending it and interpreting the server's `failed` as a transient error is the failure. The server's `failed` here is *correct and terminal*; the client's retry loop is the defect. A second boundary: `stateTransitionHistory: false` in the live card means the client **cannot** use history emptiness to distinguish "task still working, no transitions recorded" from "task terminal, history suppressed." In that regime the client must fall back to polling `status.state` and must treat `failed`/`canceled` as absorbing — never retry a continuation against an absorbing state. ## Operational Effect The observable effect is **task orphaning under a false `working` state**: the client's ledger shows the task as `working` for the full retry budget (observed: 3 retries × 90s timeout = 270s), then marks it `failed` locally with a timeout reason, while the server has held it in `failed` since the first continuation. Downstream, the planner's episodic memory records a timeout, not a capability mismatch, so the semantic distillation step learns "peer is slow" instead of "peer dropped `input-required` resumption at 1.5.0." The next task to the same peer repeats the failure, because the wrong lesson was distilled. The guardrail is a **card-drift gate at every topology-changing transition**, plus a **capability precondition check** that refuses to emit a continuation whose required mode/capability is not present in the live card. The gate must treat version-string inequality as sufficient cause to re-read `capabilities` and `skills[].inputModes`, and must treat `stateTransitionHistory: false` as a signal to switch from history-based to state-polling-based terminal detection. ```python from dataclasses import dataclass, field from typing import Optional class CardDriftError(RuntimeError): """Raised when a lifecycle transition is attempted against a card that no longer supports it.""" pass class UnsupportedTransitionError(RuntimeError): """Raised when the live card does not advertise the capability a transition depends on.""" pass @dataclass class AgentCard: version: str state_transition_history: bool default_input_modes: list skill_input_modes: dict = field(default_factory=dict) @dataclass class TaskState: task_id: str state: str # submitted|working|input-required|completed|failed|canceled card_at_accept: AgentCard continuation_attempts: int = 0 ABSORBING = {"completed", "failed", "canceled"} def revalidate_before_transition( task: TaskState, live_card: AgentCard, required_mode: str, skill_id: str, ) -> None: """Gate every topology-changing transition. Must be called before any continuation.""" if task.state in ABSORBING: raise UnsupportedTransitionError( f"task {task.task_id} is in absorbing state {task.state}; " f"continuation is invalid, not transient" ) cached = task.card_at_accept if live_card.version != cached.version: # Version drift alone is sufficient cause to re-read capability blocks. if live_card.state_transition_history != cached.state_transition_history: if not live_card.state_transition_history: # Cannot use history emptiness as a liveness signal anymore. task.state = "working" # force polling path if live_card.default_input_modes != cached.default_input_modes: if required_mode not in live_card.default_input_modes: raise CardDriftError( f"card drift {cached.version}->{live_card.version}: " f"required mode {required_mode!r} absent from live defaultInputModes" ) skill_modes = live_card.skill_input_modes.get(skill_id) if skill_modes is not None and required_mode not in skill_modes: raise CardDriftError( f"skill {skill_id!r} no longer accepts {required_mode!r} " f"(live modes: {skill_modes})" ) if not live_card.state_transition_history and task.continuation_attempts > 0: raise UnsupportedTransitionError( f"live card suppresses stateTransitionHistory; " f"resumption of {task.task_id} cannot be verified" ) def send_continuation(task: TaskState, live_card: AgentCard, mode: str, skill_id: str) -> None: revalidate_before_transition(task, live_card, mode, skill_id) task.continuation_attempts += 1 # ... emit tasks/send continuation only after the gate passes ```