# Under what conditions must an instance treat an A2A v1.0 Agent Card's advertised `defaultOutputModes` as a hard capability ceiling rather than a negotiation hint, and what breaks when it does not **Date of Record:** 2026 November 24 **Scope:** Applies to A2A v1.0 task submission where a client agent selects a `Task` artifact modality based on a remote Agent Card fetched from `/.well-known/agent.json`, then drives the task through the `submitted → working → completed` lifecycle. Does not apply to same-process tool calls, MCP resource negotiation, or A2A streaming-only (`tasks/sendSubscribe`) flows where modality is fixed by the subscription message schema. ## Core Distinction The A2A v1.0 Agent Card publishes two fields that look interchangeable to a naive client and are not: `defaultInputModes`/`defaultOutputModes` (declared on the card and on each `Skill`) are *capability declarations*, while the `Task` object's `artifacts[].parts[]` at completion is the *actual* produced payload. The spec treats `defaultOutputModes` as the set of MIME types the agent *can* emit absent a per-task override — it is a ceiling, not a menu. The failure mode is a client that reads `defaultOutputModes` as a preference list and submits a task requesting a modality that appears in the card but is not backed by any `Skill` the task actually routes to. The remote agent accepts the `Task` (state `submitted`), transitions to `working`, and only at artifact-emission time discovers it cannot produce the requested `parts[].type`. Because A2A has no `rejected` state after `working` begins — the state machine permits `working → failed` or `working → completed`, and `failed` carries a `TaskStatus.message` but no structured capability error — the client receives a terminal `failed` indistinguishable from a transient execution fault. The invariant: **a client may only request an output modality that is the intersection of the card-level `defaultOutputModes` and the `outputModes` of the specific `Skill` whose `id` the task targets; the card-level set alone is not a valid request basis.** ## What Was Observed A client agent (caller) resolved a remote card advertising: ``` defaultOutputModes: ["text/plain", "application/json", "application/pdf"] skills: [ { id: "summarize", outputModes: ["text/plain", "application/json"] }, { id: "render-report", outputModes: ["application/pdf"] } ] ``` The caller needed a JSON summary and submitted `tasks/send` with `message.parts: [{type: "data", mimeType: "application/json"}]` but *omitted* `skillId` in the task metadata (A2A v1.0 makes skill routing advisory — the agent infers it from message content). The remote agent's router classified the free-text instruction as belonging to `render-report` (the phrase "report" dominated the embedding match), entered `working`, invoked its PDF renderer, and then attempted to satisfy the requested `application/json` part by serializing the PDF bytes into a JSON envelope. The result was a `completed` task whose `artifacts[0].parts[0]` was `{"type":"data","mimeType":"application/json"}` containing a base64 blob — schema-valid, semantically useless. Downstream, the caller's parser accepted it (the `mimeType` matched its request), and the corruption surfaced three hops later as a hallucinated summary of binary garbage. In a second trace the same caller requested `application/pdf` against the `summarize` skill (again no `skillId`). The agent entered `working`, the summarizer had no PDF emitter, and the task terminated `failed` with `TaskStatus.message: "internal error"`. The caller's retry logic — keyed on `failed` — resubmitted three times, each burning a full context window of the caller's budget on a deterministic capability mismatch that no retry could fix. ## Condition of Validity The ceiling interpretation holds only when all of the following are true: 1. The card is the *authoritative* source — i.e., it was fetched within the client's staleness bound and its `version`/`protocolVersion` matches the endpoint's actual behavior. A card cached across a remote agent redeploy can advertise modalities the new build dropped; the ceiling is then a *stale* ceiling and the client must re-fetch before trusting it. 2. The task targets a specific `Skill.id`. If the client omits `skillId` and lets the agent infer routing from message content, the effective output ceiling is the *union* over all skills the router might select — which is exactly the card-level set, and therefore not a bound at all. Skill-explicit routing is what makes the ceiling tight. 3. The requested modality is expressed as a `parts[].mimeType` on the *input* message (the client's stated desired output), not inferred from a natural-language instruction. A2A does not guarantee the agent parses "give me JSON" from prose; only the structured part is contractual. When any of these fail, the client is negotiating against a moving or ambiguous target and the "ceiling" degrades to a hint — which is the condition under which the failure above occurs. ## Decision Boundary The client must branch on the *intersection*, computed before `tasks/send`, not after `failed`: - Compute `allowed = card.defaultOutputModes ∩ skill(card, targetSkillId).outputModes`. - If the desired `mimeType ∉ allowed`: **do not submit**. This is a client-side capability refusal, not a task. Emit a local `CapabilityMismatch` and re-plan (choose a different skill, a different agent, or a fallback modality from `allowed`). - If `targetSkillId` is unknown/unspecified: treat `allowed = card.defaultOutputModes` *only if* the client is willing to accept any skill's output; otherwise require skill disambiguation first (a `tasks/send` with a discovery-only message, or out-of-band skill selection). - After submission, treat a `failed` whose `TaskStatus.message` matches a known capability-error signature as **terminal and non-retryable**; treat only transport/timeout `failed` as retryable. The two are conflated in the wire format and must be separated by the client's own error taxonomy. The boundary is sharp: the client owns capability validation because the protocol's state machine cannot express "I can't do that" as a distinct terminal state once `working` has begun. ## Operational Effect Enforcing the intersection before submission converts a class of silent corruptions (completed-but-wrong-modality artifacts) and a class of retry storms (failed-on-capability) into a single cheap pre-flight check. The measured effect in the trace above: the JSON-into-PDF corruption is eliminated because the caller never submits `application/json` against a skill that only emits PDF; the three-retry storm collapses to zero remote calls because the `summarize`+`application/pdf` request is refused locally. The residual risk is card staleness — the client must version-pin the card it validated against and re-validate on `protocolVersion` or `version` change, or the ceiling it enforced may no longer match the remote build. ```python from dataclasses import dataclass, field from typing import Optional class CapabilityMismatch(RuntimeError): """Raised when a requested artifact modality is not backed by the card-level output set intersected with the targeted skill's output set.""" pass class StaleAgentCard(RuntimeError): """Raised when the cached card cannot be trusted as an authoritative capability ceiling (version drift or protocol mismatch).""" pass @dataclass class Skill: id: str output_modes: list[str] @dataclass class AgentCard: version: str protocol_version: str default_output_modes: list[str] skills: dict[str, Skill] = field(default_factory=dict) def resolve_output_ceiling( card: AgentCard, target_skill_id: Optional[str], *, cached_version: Optional[str], client_protocol: str = "1.0", ) -> set[str]: # Guard 1: the card must be authoritative before its modes bound anything. if cached_version is not None and cached_version != card.version: raise StaleAgentCard( f"cached card version {cached_version!r} != live {card.version!r}; " "re-fetch before treating output modes as a ceiling" ) if card.protocol_version != client_protocol: raise StaleAgentCard( f"card protocol {card.protocol_version!r} != client {client_protocol!r}" ) card_level = set(card.default_output_modes) # Guard 2: without an explicit skill, the ceiling is the union over all # routable skills -- i.e. not a bound. Refuse to pretend otherwise. if target_skill_id is None: raise CapabilityMismatch( "no target_skill_id: card-level modes are a union, not a ceiling; " "disambiguate the skill before submitting" ) skill = card.skills.get(target_skill_id) if skill is None: raise CapabilityMismatch( f"skill {target_skill_id!r} not present on card {card.version!r}" ) return card_level & set(skill.output_modes) def preflight_submit( card: AgentCard, target_skill_id: Optional[str], desired_mime: str, *, cached_version: Optional[str], ) -> str: allowed = resolve_output_ceiling( card, target_skill_id, cached_version=cached_version ) if desired_mime not in allowed: raise CapabilityMismatch( f"requested {desired_mime!r} not in effective ceiling " f"{sorted(allowed)} for skill {target_skill_id!r}; " "refuse locally instead of submitting a doomed task" ) return desired_mime # Trace replay: the summarize+pdf request that produced a retry storm. card = AgentCard( version="r7", protocol_version="1.0", default_output_modes=["text/plain", "application/json", "application/pdf"], skills={ "summarize": Skill("summarize", ["text/plain", "application/json"]), "render-report": Skill("render-report", ["application/pdf"]), }, ) try: preflight_submit(card, "summarize", "application/pdf", cached_version="r7") except CapabilityMismatch as exc: # Correct behavior: zero remote calls, no retry storm. print("refused:", exc) ```