# Why does an instance trust a signed Agent Card it can resolve but cannot reconcile against the remote task lifecycle? **Date of Record:** 2026 November 30 **Scope:** Applies to A2A v1.0 deployments where an orchestrator discovers remote agents via signed Agent Cards (`/.well-known/agent.json`) and then drives `tasks/send`, `tasks/get`, and `tasks/cancel` against the advertised capability surface. Does not cover unauthenticated discovery, MCP tool schemas, or intra-process agent calls. ## Core Distinction There are two distinct trust boundaries in A2A discovery, and conflating them is the failure mode: 1. **Manifest authenticity** — the Agent Card's signature proves the card bytes were produced by the claimed vendor identity. This is a *static* cryptographic check over a document. 2. **Lifecycle reconciliation** — the remote agent's actual `TaskState` machine (submitted → working → input-required → completed/failed/canceled) and its terminal-state semantics must match what the card advertises (`capabilities.stateTransitions`, `capabilities.streaming`, `capabilities.pushNotifications`). A signed card is a *claim* about a lifecycle, not a *proof* of it. Verification of (1) tells you nothing about (2). The failure occurs when an instance treats a valid signature as a license to assume the advertised lifecycle is enforceable — specifically when the remote transitions a task into a state the local reconciler has no legal edge for, and the local FSM throws rather than quarantines. ## What Was Observed An orchestrator (local instance `L`) discovered a remote vendor agent (`R`) whose signed Agent Card declared: - `capabilities.stateTransitions`: `submitted→working→completed`, `working→failed`, `working→input-required→working` - `capabilities.streaming`: `true` - `signature`: valid Ed25519 over the canonicalized card, key resolvable via the vendor's `jwks_uri`. `L` built its reconciler FSM directly from `L`'s parse of `capabilities.stateTransitions`. It then dispatched a long-running task with `tasks/send` and polled `tasks/get`. During polling, `R` returned a state of `input-required` *after* it had already emitted `working` twice and, critically, after `L` had sent a `tasks/cancel`. Sequence observed on the wire: ``` L→R tasks/send → task_id T, state=submitted L→R tasks/get → state=working (attempt 1) R→L pushNotification → state=working (attempt 1, duplicate) L→R tasks/cancel → 202 accepted L→R tasks/get → state=input-required ← illegal per L's FSM (cancel pending) L→R tasks/get → state=completed ← terminal, but cancel was acknowledged ``` The remote vendor's implementation treated `tasks/cancel` as *advisory*: it marked a cancellation flag but allowed the in-flight reasoning step to finish and emit `input-required` before honoring the cancel at the next checkpoint. The card did not declare this — A2A v1.0 has no field for "cancel is advisory / cooperative." The signature over the card was valid, so `L` had no cryptographic reason to distrust it. `L`'s reconciler raised on the `canceled → input-required` transition because its FSM had no such edge. The task was left orphaned: `L` had recorded a terminal local state (`cancel_requested`), `R` had recorded `completed`, and the two never reconverged. The orphan consumed a slot in `L`'s concurrency budget until a reaper timed it out 40 minutes later. ## Condition of Validity The invariant that failed is: > **A signed Agent Card authenticates the *advertised* lifecycle, not the *enforced* lifecycle. Any local FSM derived from `capabilities.stateTransitions` must be treated as a *lower bound* on legal remote transitions, never as an exhaustive set.** This holds whenever three conditions co-occur, which is the normal case in cross-vendor A2A: 1. The remote implementation is not the reference implementation (vendor-specific cancel semantics, checkpoint granularity, and duplicate-notification suppression all vary). 2. The local reconciler is strict (rejects transitions outside its FSM) rather than permissive (quarantines unknown transitions). 3. The card's `capabilities` block is descriptive, not contractual — A2A v1.0 does not define a conformance test that a signed card must pass. The failure does *not* occur when the local reconciler is permissive (logs and accepts unknown transitions into a `quarantined` sink) or when both sides share a reference implementation. It *does* occur reliably across vendors, which is precisely the scenario A2A exists to serve. ## Decision Boundary The boundary is between **signature validity** and **lifecycle authority**: - **Below the boundary (safe to trust from signature):** the card's identity, endpoint, `jwks_uri`, and the *set* of states the remote can ever emit. If `R` emits a state not in the union of the advertised transitions, that is a genuine protocol violation and `L` should reject the task and flag the vendor. - **Above the boundary (must be reconciled, not trusted):** the *ordering*, *timing*, and *cancel semantics* of transitions. A signed card cannot promise that `cancel` is synchronous, that `input-required` will not arrive after `cancel`, or that push notifications are deduplicated. These are runtime properties. The correct reconciler treats the advertised FSM as a *superset guard* (reject only states outside the union) and handles ordering violations by quarantining the task into an `ambiguous` sink for out-of-band resolution, rather than raising into the dispatch path. ## Operational Effect The cost of getting this wrong is not a crash — it is a **silent orphan**: a task that both sides believe is terminal, in different terminal states, with no reconciliation path. In the observed run, the orphan held a concurrency slot for 40 minutes and, because `L` had already emitted a `cancel_requested` event to its own audit log, downstream consumers saw a cancellation that never happened. The vendor's `completed` result was discarded because `L` had no live handle to receive it. The guardrail is a two-tier reconciler: a strict FSM for *local* state (what `L` believes), and a permissive *remote-state ingestor* that accepts any state in the advertised union, records ordering violations as `quarantine` events, and never lets a remote transition raise into the dispatch path. Cancellation must be modeled as a *request* with a bounded reconciliation window, not as a state transition, because A2A v1.0 gives no synchronous cancel guarantee. ```python from dataclasses import dataclass, field from enum import Enum class LifecycleReconciliationError(RuntimeError): """Raised when a remote task state cannot be reconciled against the signed Agent Card's advertised capability surface.""" class RemoteState(str, Enum): SUBMITTED = "submitted" WORKING = "working" INPUT_REQUIRED = "input-required" COMPLETED = "completed" FAILED = "failed" CANCELED = "canceled" @dataclass class SignedAgentCard: agent_id: str advertised_states: frozenset[RemoteState] signature_valid: bool @dataclass class RemoteReconciler: card: SignedAgentCard local_cancel_requested: bool = False quarantine_events: list = field(default_factory=list) def ingest(self, remote_state: RemoteState, task_id: str) -> str: # Tier 1: signature gate. A signed card is a precondition, not a license. if not self.card.signature_valid: raise LifecycleReconciliationError( f"task {task_id}: agent card signature invalid for {self.card.agent_id}" ) # Tier 2: superset guard. Reject only states outside the advertised union. # Ordering violations (e.g. input-required after cancel) are quarantined, # never raised into the dispatch path. if remote_state not in self.card.advertised_states: raise LifecycleReconciliationError( f"task {task_id}: remote emitted {remote_state.value} " f"not in advertised union {sorted(s.value for s in self.card.advertised_states)}" ) if self.local_cancel_requested and remote_state not in ( RemoteState.CANCELED, RemoteState.FAILED, ): # Cooperative-cancel ambiguity: quarantine, do not abort. self.quarantine_events.append( {"task_id": task_id, "state": remote_state.value, "reason": "post-cancel-transition"} ) return "quarantined" return "accepted" def dispatch_and_reconcile(card: SignedAgentCard, remote_states: list[RemoteState], task_id: str) -> str: rec = RemoteReconciler(card=card) rec.local_cancel_requested = True # cancel was sent before the tail states arrived for state in remote_states: outcome = rec.ingest(state, task_id) if outcome == "quarantined": # Bounded reconciliation window: surface for out-of-band resolution. raise LifecycleReconciliationError( f"task {task_id}: quarantined at {state.value}; " f"cancel was advisory on remote — reconcile out-of-band" ) return "reconciled" ```