# What structural signals indicate an A2A v1.0 Agent Card declares a task lifecycle state machine that cannot be entered from the card's own `defaultInputModes` **Date of Record:** 2026 November 30 **Scope:** Applies to A2A v1.0 Agent Card discovery and the subsequent `tasks/send` → `tasks/get` lifecycle for agents whose declared `skills[].inputModes` differ from the top-level `defaultInputModes`. Does not apply to single-skill agents where the two sets are identical, nor to streaming-only (`message/stream`) interactions that bypass the task store. ## Core Distinction The A2A v1.0 Agent Card carries two independent modality declarations: a top-level `defaultInputModes`/`defaultOutputModes` pair, and per-skill `inputModes`/`outputModes` overrides. These are *advertised capabilities*, not *state-machine entry conditions*. The non-obvious boundary is this: a card can be structurally valid, schema-conformant, and pass every JSON-Schema check, while still declaring a skill whose first legal lifecycle transition (`submitted` → `working`) is only reachable via an input modality that the *default* set does not include. A client that resolves the skill, then constructs the task payload from `defaultInputModes` (the common client pattern, because it reads the top-level field first), submits a task the server accepts into `submitted` and then strands — the server's skill handler rejects the payload's modality at the `working` gate, but the task record already exists and is now a zombie in `submitted` that no `tasks/get` will ever advance. The invariant that is violated: **for every skill in `skills[]`, `skills[i].inputModes` must be a subset of `defaultInputModes` OR the client must be required to read the skill-level field before constructing the payload.** A2A v1.0 does not mandate the subset relation, and does not mandate that the server reject a `tasks/send` whose modality is legal for the default but illegal for the resolved skill *at submission time*. The rejection is deferred to the skill handler, which is downstream of task-record creation. ## What Was Observed A card was served with `defaultInputModes: ["text/plain"]` and a single skill `invoice-reconcile` declaring `inputModes: ["application/pdf", "application/vnd.a2a.structured+json"]`. Schema-valid. The skill's `inputModes` is *disjoint* from the default set — not a subset, not a superset, orthogonal. A conformant client performed discovery, selected the skill by `id`, and built the `tasks/send` payload using `defaultInputModes` because its payload-construction path reads the top-level field (the skill-level field was present but the client's modality resolver preferred the default when both existed — a documented client behavior, not a bug). The payload was `text/plain`. Server trace: 1. `tasks/send` received. Task record created with `status.state = "submitted"`, `id` assigned, `status.timestamp` set. 2. Dispatcher routes to `invoice-reconcile` handler by `skillId`. 3. Handler inspects `message.parts[].type` and finds `text` where it requires `file` (PDF) or `data` (structured JSON). Handler raises `UnsupportedModality`. 4. The A2A server wrapper catches the handler exception and — per spec §7.5, which only defines error mapping for `tasks/send` *before* task creation — has no defined transition. The task record is left in `submitted`. No `status.message` is populated. No terminal state is written. 5. Client polls `tasks/get`. Every poll returns `submitted`. Indefinitely. The task is a zombie. It is not `failed` (no terminal transition was written), not `canceled` (client did not call `tasks/cancel`), and not `working`. It holds a slot in the task store, consumes the client's polling budget, and — critically — the client's retry logic cannot distinguish "still queued" from "permanently stranded" because both return identical `status.state`. ## Condition of Validity The failure requires all of the following to co-occur; remove any one and the zombie does not form: - **Disjointness, not subset.** If `skills[i].inputModes ⊆ defaultInputModes`, a default-derived payload is always legal for the skill and the handler never rejects on modality. The zombie only forms when the skill's required modalities are *absent* from the default set. This is the structural signal: `set(skill.inputModes) & set(defaultInputModes) == ∅` (or, weaker but still hazardous, `skill.inputModes ⊄ defaultInputModes`). - **Client resolves skill before reading skill-level modality.** If the client reads `skills[i].inputModes` and constructs accordingly, no default-derived payload is sent. The failure is client-order-dependent. - **Server defers modality validation past task-record creation.** A server that validates the payload against the resolved skill's `inputModes` *before* writing the task record returns a synchronous `tasks/send` error and no zombie forms. A2A v1.0 permits either ordering; it does not require pre-creation validation. - **No terminal-state write on handler rejection.** If the server wrapper transitions the task to `failed` with `status.message` populated on handler exception, the client sees a terminal state and stops polling. The zombie requires the wrapper to swallow the handler error without a state transition. The condition of validity is therefore: *disjoint modality sets* ∧ *default-first client* ∧ *post-creation validation* ∧ *no terminal write on handler rejection*. The first is the only one visible in the card alone; the other three are server/client behaviors the card does not advertise. ## Decision Boundary The operational decision is whether a discovered card is *safe to dispatch against using default modalities*. The boundary is crossed when the card's skill set contains any skill whose `inputModes` is not a subset of `defaultInputModes`. Below the boundary (all skills' modalities ⊆ defaults), a default-derived payload is always handler-legal and the zombie cannot form regardless of server wrapper behavior. Above the boundary, the client must either (a) read skill-level `inputModes` and construct from it, or (b) refuse to dispatch and surface the mismatch to the orchestrator. A second decision boundary concerns the server side: whether to validate modality pre-creation or post-creation. Pre-creation validation is the only ordering that makes the zombie structurally impossible for *all* clients, including default-first ones. Post-creation validation with a terminal-state write on rejection is the fallback — it converts the zombie into a `failed` task the client can observe. Post-creation validation without a terminal write is the only configuration that produces the zombie, and it is the configuration A2A v1.0's §7.5 error-mapping gap silently permits. ## Operational Effect The downstream effect is a polling-budget and task-store exhaustion pattern that looks like a slow server, not a protocol violation. The client's `tasks/get` loop returns `submitted` with a fresh `status.timestamp` on every read (the timestamp is the record's creation time, not a heartbeat — but clients commonly interpret it as liveness). Retry backoff never triggers because the state is not `failed`. The task store fills with `submitted` records that will never transition, and the server's concurrency limiter — which counts non-terminal tasks against a per-client quota — eventually rejects *new* `tasks/send` calls with a quota error that has no relation to the actual failure. The operator sees "quota exceeded" and "tasks stuck in submitted," not "modality mismatch at skill resolution." The guardrail is a two-part invariant enforced at discovery time and at dispatch time. At discovery: compute `unsafe_skills = {s for s in card.skills if not set(s.inputModes) <= set(card.defaultInputModes)}` and mark the card `default_dispatchable = (len(unsafe_skills) == 0)`. At dispatch: if the card is not default-dispatchable, the client must resolve modality from `skills[i].inputModes` or refuse. The check is cheap, purely structural, and requires no server cooperation — which is the point, because the server's post-creation validation behavior is not advertised in the card and cannot be discovered without a probe. ```python from dataclasses import dataclass, field from typing import Optional class A2ADispatchBoundaryError(RuntimeError): """Raised when a task dispatch would cross the default-modality boundary into a skill whose inputModes are not a subset of defaultInputModes.""" pass @dataclass class Skill: id: str input_modes: frozenset[str] @dataclass class AgentCard: default_input_modes: frozenset[str] skills: list[Skill] = field(default_factory=list) def unsafe_skills(card: AgentCard) -> list[Skill]: """Skills whose required input modalities are not covered by the card's default set. Dispatch against these using default modalities strands the task in 'submitted' on post-creation-validating servers.""" return [ s for s in card.skills if not s.input_modes <= card.default_input_modes ] def resolve_dispatch_modality( card: AgentCard, skill_id: str, client_modality: Optional[str] = None, ) -> frozenset[str]: """Return the modality set the client must construct its payload from. If the client supplied an explicit modality, verify it is legal for the resolved skill. Otherwise, refuse to fall back to default_input_modes when the skill is outside the default set — that fallback is the zombie trigger. """ skill = next((s for s in card.skills if s.id == skill_id), None) if skill is None: raise A2ADispatchBoundaryError( f"skill {skill_id!r} not present in card; cannot resolve modality" ) if client_modality is not None: if client_modality not in skill.input_modes: raise A2ADispatchBoundaryError( f"client modality {client_modality!r} is not legal for skill " f"{skill_id!r}; legal set is {sorted(skill.input_modes)}" ) return frozenset({client_modality}) if not skill.input_modes <= card.default_input_modes: raise A2ADispatchBoundaryError( f"skill {skill_id!r} inputModes {sorted(skill.input_modes)} are not " f"a subset of defaultInputModes {sorted(card.default_input_modes)}; " f"default-derived payload would strand the task in 'submitted' on " f"post-creation-validating servers. Client must supply an explicit " f"skill-level modality." ) return card.default_input_modes def preflight(card: AgentCard) -> dict[str, bool]: """Discovery-time structural check. default_dispatchable == True means a default-modality payload is handler-legal for every skill on the card.""" bad = unsafe_skills(card) return { "default_dispatchable": len(bad) == 0, "unsafe_skill_ids": [s.id for s in bad], } ```