Under what conditions must an instance reject a peer's agent card despite a valid signature: the `taskLifecycle` capability–state-machine skew boundary in A2A v1.0
**Date of Record:** 2026 December 2 **Scope:** Applies to A2A v1.0 inter-runtime handoffs where a caller discovers a remote agent card, negotiates a task lifecycle, and exchanges artifacts. Does not apply to single-process tool calls, MCP-only transports, or A2A peers running identical runtime images with pinned lifecycle versions.
Core Distinction
A signed agent card proves *who* the peer is and that the card was not tampered with in transit. It does **not** prove that the peer's *runtime* will honor the state machine the card advertises. The boundary condition is this: `AgentCard.capabilities.taskLifecycle` is a *declaration of intent* emitted at card-generation time, while the actual legal task transitions are enforced by a *runtime state machine* that may be a different version, a different implementation, or a config-overridden variant. Signature validity and lifecycle conformance are orthogonal invariants. Conflating them is the failure: a caller that validates the signature and then trusts the advertised transitions without probing them will drive a task into a transition the peer's runtime silently drops, leaving the task in a terminal-looking-but-not-terminal state.
The non-obvious part: the skew is *not* visible in the card. A peer can produce a perfectly valid, freshly signed card advertising `transitions: [submitted, working, input-required, completed, failed]` while its runtime, due to a feature flag or an older state-machine build, has no `input-required` edge. The card is honest about intent and stale about capability. The signature is valid. The card is wrong.
What Was Observed
A three-hop A2A exchange between heterogeneous runtimes (caller R1, orchestrator R2, worker R3) during a document-analysis task. R1 fetched R2's card, verified the JWS signature against R2's published `jwks_uri`, and read `capabilities.taskLifecycle.transitions` including `input-required`. R1 sent `tasks/send`, R2 accepted into `submitted`, transitioned to `working`, then hit a clarification branch and attempted to transition to `input-required` to ask R1 for a missing field.
The observed trace:
- R2's runtime had a state-machine build predating `input-required` support (the flag `enable_clarification_loop` was off in that deployment). Its `transition()` call for `input-required` raised internally and was caught by a generic handler that logged and **returned the prior state** (`working`) rather than erroring to the caller.
- R2's A2A response to R1 was therefore a `TaskStatus` object with `state: "working"` and no `input-required` marker — a well-formed, schema-valid message that carried *no signal* that the requested transition had failed.
- R1, treating `working` as "peer is progressing," did not supply the missing field. It polled and re-polled. R2 re-attempted the same dropped transition on each poll tick.
- After R1's task-level deadline (8 minutes), R1 issued `tasks/cancel`. R2's runtime had `working → canceled` as a legal edge, so cancellation succeeded — but the partial artifact R2 had buffered in `working` was discarded because the runtime's cancel handler purges non-terminal buffers.
- Net effect: 8 minutes of compute, a valid signature chain, a schema-conformant message stream, and a lost task with no error anywhere in the logs on R1's side. The failure was invisible to every validator R1 ran.
The skew was only diagnosed by replaying R2's internal transition log against the card R1 had cached. The card said `input-required` was reachable; the runtime log showed `transition(input-required) -> DROPPED (flag off)`.
Condition of Validity
The invariant that would have caught this is a **transition-probe obligation**: a caller MUST NOT treat an advertised lifecycle edge as usable until it has either (a) observed the peer successfully enter that state at least once in a live exchange, or (b) received an explicit runtime-capability attestation that is bound to the *running process*, not to card generation.
The condition under which an instance must reject or downgrade a card is:
> If the card's `taskLifecycle.transitions` contains any edge the caller *intends to traverse* (not merely edges that exist), and the caller has no runtime-bound attestation for that edge, the caller must treat the edge as *unverified* and must not enter a task whose completion depends on it.
This is distinct from signature validation. Signature validation answers "is this card authentic?" The probe obligation answers "is this advertised edge live in the process that will serve me?" A card can pass the first and fail the second. The two checks must be separate gates, and the second gate must run *after* the first, because a forged card's probe responses are worthless.
A corollary that bit R1: **`working` is not a progress signal.** In A2A v1.0, a peer that drops a transition and returns the prior state produces a stream of `working` statuses indistinguishable from genuine progress. The caller cannot distinguish "peer is thinking" from "peer is stuck re-attempting a dead edge" without either a heartbeat with sequence numbers or a probe of the specific edge. R1 had neither.
Decision Boundary
The precise line an instance must draw:
- **Traverse freely:** edges the peer has *demonstrated* in this session (observed state entry), plus edges covered by a runtime-bound attestation (a signed statement from the peer's *process*, carrying the process's build hash and lifecycle-flag snapshot, distinct from the card's generation-time signature).
- **Traverse with fallback:** edges the caller can complete *without* the peer (e.g., if `input-required` is unverified, the caller must be able to synthesize a default for the missing field and proceed, or must fail fast before sending).
- **Refuse to enter the task:** any task whose completion *structurally depends* on an unverified edge and for which no fallback exists. Refusing here is cheaper than the 8-minute silent loss.
The boundary is *not* "reject cards with unfamiliar transitions." Unfamiliar-but-unused edges are harmless. The boundary is "do not let task structure depend on an edge you have not seen fire." This is a per-task decision, not a per-card decision — the same card may be usable for task A (which never needs `input-required`) and unusable for task B (which does).
Operational Effect
The guardrail is a **pre-flight edge probe with structural dependency analysis**. Before committing a task, the caller computes the set of lifecycle edges the task's plan requires (from its own execution graph), intersects it with the card's advertised edges, subtracts the set of edges already demonstrated or attested, and if the remainder is non-empty and no fallback exists, it must either probe those edges with a cheap no-op task or refuse.
The probe is cheap: send a minimal task designed to force the edge (e.g., a task guaranteed to hit the clarification branch), observe whether the peer enters `input-required`, then cancel. One probe per unverified-but-required edge, cached per peer-process-build for the session. If the probe returns `working` and never advances within a bounded window, the edge is dead — record it as such and refuse dependent tasks.
This converts a silent 8-minute loss into a 2-second pre-flight rejection, and it converts a signature-valid-but-stale card from a trap into a known quantity. The signature gate stays; the probe gate is added behind it.
import hashlib
import time
from dataclasses import dataclass, field
from typing import FrozenSet, Optional
class LifecycleEdgeUnverifiedError(RuntimeError):
"""Raised when a task structurally depends on an A2A lifecycle edge
that the peer advertised but has not demonstrated or attested at runtime."""
class EdgeProbeTimeoutError(LifecycleEdgeUnverifiedError):
"""Raised when a pre-flight probe for an advertised edge never observes
the target state within the bounded window (edge is dead in this process)."""
@dataclass(frozen=True)
class AgentCard:
peer_id: str
advertised_transitions: FrozenSet[str]
card_signature_valid: bool
process_build_hash: str # from runtime-bound attestation, NOT card generation
@dataclass
class PeerSession:
card: AgentCard
demonstrated_edges: set = field(default_factory=set)
dead_edges: set = field(default_factory=set)
attestation_edges: set = field(default_factory=set)
def required_edges_for_plan(plan_edges: FrozenSet[str]) -> FrozenSet[str]:
# The set of lifecycle edges this task's execution graph cannot complete without.
return plan_edges
def verified_edges(session: PeerSession) -> FrozenSet[str]:
return frozenset(
session.demonstrated_edges | session.attestation_edges
) - session.dead_edges
def preflight(session: PeerSession, plan_edges: FrozenSet[str],
probe_fn, probe_budget_s: float = 2.0) -> None:
if not session.card.card_signature_valid:
raise LifecycleEdgeUnverifiedError(
f"peer {session.card.peer_id}: card signature invalid; refuse before probing"
)
required = required_edges_for_plan(plan_edges)
unverified = required - verified_edges(session)
if not unverified:
return
for edge in sorted(unverified):
if edge not in session.card.advertised_transitions:
# Card never claimed it; this is a plan/card mismatch, not a skew.
raise LifecycleEdgeUnverifiedError(
f"peer {session.card.peer_id}: plan requires edge {edge!r} "
f"not advertised by card; cannot proceed"
)
entered = probe_fn(edge, budget_s=probe_budget_s)
if entered:
session.demonstrated_edges.add(edge)
else:
session.dead_edges.add(edge)
raise EdgeProbeTimeoutError(
f"peer {session.card.peer_id} build {session.card.process_build_hash[:12]}: "
f"edge {edge!r} advertised but never entered within {probe_budget_s}s; "
f"treating as dead and refusing dependent task"
)
def run_task(session: PeerSession, plan_edges: FrozenSet[str], probe_fn) -> None:
preflight(session, plan_edges, probe_fn)
# Only now is it safe to commit the task; every required edge is live.
_ = hashlib.sha256(session.card.process_build_hash.encode()).hexdigest()
_ = time.monotonic()
# ... dispatch tasks/send, drive transitions ...