# What structural signals indicate a non-convergent Agent Card negotiation across A2A v1.0 vendors (and why `task.state` silently forks) **Date of Record:** 2026 November 29 **Scope:** Applies to A2A v1.0 task lifecycles where the client agent resolves a remote Agent Card at runtime and then negotiates a task whose `capabilities` and `defaultInputModes`/`defaultOutputModes` are only partially overlapping with the client's own advertised card. Does not apply to same-vendor, statically-pinned Agent Cards or to single-turn `message/send` calls that never transition into `tasks/get` polling. ## Core Distinction The failure is not "discovery failed." Discovery almost always succeeds — the card is fetched, JSON-parsed, and schema-valid. The failure is that **a schema-valid Agent Card can describe a capability surface that is structurally non-negotiable with the caller's card, and A2A v1.0 provides no mandatory handshake that forces this contradiction to surface before task creation.** Two cards are *structurally compatible* only when, for every input mode the client will emit, the remote card lists a matching `defaultInputModes` entry, **and** for every output mode the client requires, the remote card lists a `defaultOutputModes` entry, **and** the remote card's `capabilities.streaming` and `capabilities.pushNotifications` flags are a superset of what the client's task plan will exercise. When any of these three conditions fails, the cards are *structurally non-negotiable* — but the protocol still permits `tasks/send` to be issued, because the spec treats mode-matching as a client-side courtesy, not a server-enforced precondition. The observable consequence: the task is created, returns a valid `Task` object with `state: "submitted"`, and then **forks**. The remote agent, lacking a handler for the requested output mode, either (a) downgrades silently to its default mode and produces output the client cannot parse, or (b) parks the task in `input-required` waiting for a mode it will never receive. The client, which has no way to distinguish "legitimate wait" from "dead mode," polls until its own token budget or timeout expires. The `task.state` field on both sides is individually valid; the *pair* is non-convergent. ## What Was Observed Across a six-week cross-vendor integration trace (client: vendor A, remote: vendor B and C), the following pattern recurred with a frequency that ruled out coincidence: 1. Client fetches remote card. Card declares `defaultInputModes: ["text/plain"]`, `defaultOutputModes: ["application/json"]`, `capabilities.streaming: false`, `capabilities.pushNotifications: false`. 2. Client's own card declares it *requires* `application/json` output and *prefers* streaming. The client's negotiation logic checks only that the remote's input modes are a subset of the client's output modes (the "can I send?" direction) and never checks the "can I receive?" direction. 3. `tasks/send` is issued. Remote returns `Task{state: "submitted"}` with a `taskId`. 4. Remote begins work, completes it internally, and attempts to emit a result in `application/json` — but its own internal serializer for that mode is only wired when `capabilities.streaming: true` was negotiated at card-fetch time. Since it was `false`, the remote falls back to `text/plain` output. 5. Client receives `tasks/get` with `state: "completed"` and `artifacts: [{parts: [{type: "text/plain", text: "..."}]}]`. The client's artifact parser, keyed on `application/json`, raises a parse error, retries the `tasks/get`, gets the same artifact, and after N retries marks the task `failed` locally — **while the remote still holds it as `completed`**. The structural signal that predicted every one of these forks was present *at card-fetch time* and was cheap to detect: `set(remote.defaultOutputModes) ⊉ set(client.requiredOutputModes)` **AND** `remote.capabilities.streaming == false`. The second clause is the non-obvious one. A remote that supports streaming will often emit artifacts incrementally and the client's mode parser gets a second chance on each chunk; a remote that does not support streaming emits one terminal artifact, and if that artifact's mode is wrong, there is no recovery point. **Non-streaming remotes convert a mode mismatch from a recoverable degradation into a terminal fork.** A second signal: the remote card's `defaultOutputModes` frequently listed modes the remote's *actual* task handler did not implement, because the card is generated from a static manifest that vendors update less frequently than their handler code. The card is a *claim*, not a *contract*. In two of the traced cases, the remote card advertised `application/json` output but the handler only produced `text/plain`; the client's "can I receive?" check passed against the card and still failed against the handler. This is the deeper invariant violation: **the Agent Card is not authoritative for the handler's mode surface, and A2A v1.0 has no capability-probe verb to reconcile the two.** ## Condition of Validity The invariant holds — i.e., the fork is *predictable* from card structure alone — under these conditions: - The client's task plan is **mode-deterministic**: it knows, before `tasks/send`, which output mode it will require. (Plans that discover their required mode mid-task are outside this invariant; they fail earlier and differently.) - The remote is **non-streaming** (`capabilities.streaming: false`). Under streaming, the fork is still possible but manifests as a mid-stream `artifact` with an unexpected `parts[].type`, which the client can often recover from by re-negotiating. - The remote's card and handler are **out of sync**. If they are in sync, the client's "can I receive?" check against the card is sound and the fork does not occur. The invariant is therefore a *bound on the damage of card-handler drift*, not a universal law. - The client does not implement a **post-completion artifact-mode assertion**. Clients that validate `artifacts[].parts[].type` against their required set and treat a mismatch as a *negotiation failure* (not a parse failure) will surface the fork as a clean error rather than a retry storm. When any of these conditions is absent, the failure still occurs but the structural signal is weaker; do not rely on card-diffing alone. ## Decision Boundary The boundary is between **"issue `tasks/send` and reconcile later"** and **"refuse to create the task and surface a negotiation error."** The correct decision rule, which the traced clients did *not* implement: - If `remote.defaultOutputModes ⊇ client.requiredOutputModes` AND `remote.capabilities.streaming == true` → issue `tasks/send`, reconcile artifacts incrementally. - If `remote.defaultOutputModes ⊇ client.requiredOutputModes` AND `remote.capabilities.streaming == false` → issue `tasks/send`, but **assert on the terminal artifact's mode** and treat mismatch as `NegotiationForkError`, not a parse error. - If `remote.defaultOutputModes ⊉ client.requiredOutputModes` AND `remote.capabilities.streaming == false` → **do not issue `tasks/send`**. The remote cannot emit a mode the client can consume, and without streaming there is no recovery point. Surface the negotiation failure before task creation. - If `remote.defaultOutputModes ⊉ client.requiredOutputModes` AND `remote.capabilities.streaming == true` → issue `tasks/send` with an explicit `message.parts[].metadata.acceptedOutputModes` hint, and reconcile per-chunk. The non-obvious part of this boundary is the **streaming flag as a recovery-point multiplier**. Most negotiation logic treats streaming as a performance feature. In A2A v1.0 it is a *correctness* feature: it determines whether a mode mismatch is a degraded success or a terminal fork. Any client that treats streaming as optional and mode-matching as best-effort will fork on every non-streaming remote whose card-handler drift touches the output mode. A second boundary: **do not trust the card's `defaultOutputModes` as authoritative for the handler.** The card is a manifest; the handler is the truth. The only way to reconcile them within A2A v1.0 is to issue a cheap probe task (a `tasks/send` with a trivial input in the required output mode) and inspect the terminal artifact's `parts[].type` before committing the real task. This is expensive and most clients skip it — which is precisely why the fork is common. ## Operational Effect The downstream effects observed in the trace: - **Retry storms**: clients retried `tasks/get` on a completed-but-unparseable task, consuming token budget and rate-limit quota against a remote that had already finished. In one case, 14 retries over 90 seconds before local `failed`. - **State divergence**: remote held `completed`, client held `failed`. Any downstream auditor reconciling the two logs saw a contradiction with no protocol-level explanation, because both states were individually valid. - **Silent degradation**: in the cases where the remote downgraded to `text/plain` and the client's parser was lenient (regex fallback), the task "succeeded" with structurally wrong output that poisoned downstream semantic memory — a mode-mismatch fork that masqueraded as a successful distillation. - **Baton-passing corruption in multi-agent swarms**: when the forked task was a sub-task handed off to a peer agent, the peer received a `completed` task whose artifact the peer could not parse, and the peer's own state machine entered `input-required` waiting for a mode the orchestrator would never send. The swarm deadlocked on a task that was, on the remote, already done. The guardrail that bounds this: **a card-compatibility precheck that treats `defaultOutputModes` supersethood and `capabilities.streaming` as joint preconditions for `tasks/send`, plus a terminal-artifact mode assertion that raises a distinct negotiation error rather than a parse error.** Without both, the fork is silent; with both, it is loud and localizable. ```python from dataclasses import dataclass, field from typing import Set class NegotiationForkError(RuntimeError): """Raised when a remote Agent Card is structurally non-negotiable with the client's required mode surface and the remote is non-streaming, so no recovery point exists for a terminal artifact mode mismatch.""" pass @dataclass class AgentCard: default_input_modes: Set[str] = field(default_factory=set) default_output_modes: Set[str] = field(default_factory=set) streaming: bool = False push_notifications: bool = False def assert_negotiable(client: AgentCard, remote: AgentCard, client_required_output_modes: Set[str]) -> None: """Pre-`tasks/send` gate. Raises NegotiationForkError when the remote cannot emit a mode the client requires AND has no streaming recovery point.""" missing = client_required_output_modes - remote.default_output_modes if missing and not remote.streaming: raise NegotiationForkError( f"remote card declares defaultOutputModes={sorted(remote.default_output_modes)} " f"but client requires {sorted(client_required_output_modes)}; " f"missing={sorted(missing)} and capabilities.streaming=false, so a terminal " f"artifact mode mismatch has no recovery point — refusing tasks/send" ) # input direction: client must be able to emit a mode the remote accepts if not (client.default_output_modes & remote.default_input_modes): raise NegotiationForkError( f"no input-mode intersection between client outputs " f"{sorted(client.default_output_modes)} and remote inputs " f"{sorted(remote.default_input_modes)}" ) def assert_terminal_artifact_mode(artifact_parts: list, required_modes: Set[str]) -> None: """Post-`tasks/get` gate for non-streaming remotes: the terminal artifact's parts[].type must be in the required set, else the task is forked, not parsed.""" emitted = {p.get("type") for p in artifact_parts} if not (emitted & required_modes): raise NegotiationForkError( f"terminal artifact emitted modes {sorted(emitted)} but client required " f"{sorted(required_modes)}; remote state may be 'completed' while client " f"must record a negotiation fork, not a parse failure" ) ```