# When must an instance reject a delegated task because the remote Agent Card's declared `defaultInputModes`/`defaultOutputModes` are satisfied only by a mimeType the local executor cannot materialize **Date of Record:** 2026 November 25 **Scope:** Applies to A2A v1.0 client-side delegation where the caller pre-validates a remote Agent Card before `tasks/send`, and where the local executor generates output artifacts through a fixed renderer set. Does not apply to pure text-only agents or to streaming-only `tasks/sendSubscribe` paths where the artifact mimeType is negotiated per-chunk rather than per-card. ## Core Distinction The A2A v1.0 Agent Card is a *declaration of capability*, not a *contract of materializability*. A card advertising `defaultOutputModes: ["text/plain", "application/json", "image/png"]` means the remote agent *can accept and emit* those modes. It does **not** mean the caller can *produce* an input in a mode the remote requires, nor that the caller can *consume* an output in a mode the remote will actually return. The failure mode examined here is the **asymmetric intersection collapse**: the caller validates that `card.defaultInputModes ∩ local_producible_mimes ≠ ∅` and that `card.defaultOutputModes ∩ local_consumable_mimes ≠ ∅`, computes both intersections as non-empty, delegates, and then discovers at artifact-return time that the *specific* output the remote chose is in the intersection of the card's output modes with the remote's *actual* emission set — which may be a singleton that the local consumer cannot render, even though a different member of the same intersection would have been fine. The distinction that matters operationally: **a non-empty set intersection is not a satisfiable obligation.** Capability negotiation over a *set* of mimeTypes is a disjunction on the remote side and a conjunction on the caller side. The caller must be able to consume *every* mimeType the remote might emit, or it must pin the emission via `acceptedOutputModes` in the task request and treat any deviation as a protocol violation — not as a rendering fallback. ## What Was Observed A cross-vendor delegation: local orchestrator (vendor A) delegates a document-summarization subtask to a remote agent (vendor B). Vendor B's Agent Card, fetched from `/.well-known/agent.json`, declared: ``` "defaultInputModes": ["text/plain", "application/json"], "defaultOutputModes": ["text/plain", "application/json", "application/pdf"] ``` The orchestrator's pre-flight validator checked `"application/json" in card.defaultOutputModes` → true, and `"text/plain" in card.defaultInputModes` → true. Both intersections non-empty. Delegation proceeded with `acceptedOutputModes: ["application/json", "text/plain"]` in the `tasks/send` params. Vendor B's executor, however, routed on task *content*: because the inbound message carried a structured `application/json` part (a document manifest), B's internal planner selected its "render final summary as typeset document" path, which emits `application/pdf` — a member of `defaultOutputModes` but **not** a member of the caller's `acceptedOutputModes`. B did not reject the task; it emitted the artifact in a mode the caller had explicitly excluded, because B's implementation treated `acceptedOutputModes` as a *preference hint* rather than a *hard constraint*, and its card-level `defaultOutputModes` as the authoritative emission set. The caller received a `Task` in state `completed` with an `Artifact` whose `parts[0].type == "file"` and `mimeType == "application/pdf"`. The local artifact consumer had no PDF renderer registered. The task did not fail at the protocol layer — it failed at the *materialization* layer, three call frames below the delegation boundary, after the remote had already committed the work and marked the task terminal. Retry was not idempotent-safe because B's task store keyed on `contextId` and returned the same terminal task on re-send. The observable trace: 1. `GET /.well-known/agent.json` → card with 3 output modes. 2. Validator: `intersection(card.defaultOutputModes, local_consumable) == {"text/plain","application/json"}` → non-empty → PASS. 3. `tasks/send` with `acceptedOutputModes: ["application/json","text/plain"]`. 4. Remote planner routes to PDF path; emits `application/pdf` (in card set, **not** in request set). 5. Task → `completed`, artifact mimeType `application/pdf`. 6. Local consumer: `KeyError: no renderer for application/pdf`. Task terminal, artifact unconsumable. ## Condition of Validity The pre-flight intersection check is only sound under the following invariant, which A2A v1.0 does **not** enforce and most SDKs do not check: > **Emission-set invariant:** For every task the caller sends, the set of mimeTypes the remote may emit must be a subset of the caller's `acceptedOutputModes`. The card's `defaultOutputModes` is an *upper bound on capability*, and the request's `acceptedOutputModes` is a *lower bound on obligation*. A conformant remote must emit only within `acceptedOutputModes`; a non-conformant remote emits within `defaultOutputModes`. The caller's validator conflated these. It checked the *capability* intersection and assumed the *obligation* would be honored. This holds only when the remote is conformant on `acceptedOutputModes` narrowing. It is invalid whenever: - The remote treats `acceptedOutputModes` as advisory (observed above). - The remote's planner selects an emission mode based on *input content* rather than the request's accepted set (observed above — the JSON input triggered the PDF path). - The card's `defaultOutputModes` is broader than any single task's realistic emission set, so the caller's consumable-intersection is non-empty but the *actual* emission is a singleton outside it. The invariant that must hold for safe delegation is stricter: **the caller must be able to consume the full `defaultOutputModes` set, OR the caller must verify post-hoc that the returned artifact mimeType ∈ `acceptedOutputModes` and treat any deviation as a hard protocol error requiring task cancellation and re-delegation with a pinned single mode.** ## Decision Boundary The boundary is: *when does a non-empty output-mode intersection authorize delegation?* - **Authorize** when `card.defaultOutputModes ⊆ local_consumable_mimes`. The caller can render anything the remote might emit. No post-hoc check needed. - **Authorize conditionally** when `card.defaultOutputModes ⊄ local_consumable_mimes` but the caller pins `acceptedOutputModes` to a single mode and the remote is *known conformant* (verified via prior task history or vendor contract). Post-hoc mimeType assertion is mandatory. - **Reject** when `card.defaultOutputModes ⊄ local_consumable_mimes` and the remote's conformance on `acceptedOutputModes` narrowing is unverified. The card cannot bound the emission set to something the caller can materialize, and the remote may legally (per its own card) emit an unconsumable mode. The critical non-obviousness: the check is **not** `intersection ≠ ∅`. It is `card.defaultOutputModes ⊆ local_consumable_mimes` (strong) or `pinned_single_mode ∧ verified_conformance` (weak, requires post-hoc guard). The naive intersection check passes in the observed failure and is therefore unsound. Symmetrically on the input side: the caller must ensure the *content* it sends does not trigger a remote planner path that emits outside `acceptedOutputModes`. Sending `application/json` when the caller can only consume `text/plain` is a latent trigger — the JSON input is what routed B to the PDF path. Input mode selection is not emission-neutral. ## Operational Effect Consequences of getting this boundary wrong: 1. **Terminal-task orphan.** The remote marks the task `completed`; the caller cannot consume the artifact; the task cannot be retried idempotently because `contextId`-keyed stores return the same terminal state. The work is done and lost. 2. **Silent capability overclaim.** The card's `defaultOutputModes` is a disjunction; the caller's consumer is a conjunction. The gap between them is where artifacts fall through. 3. **Input-triggered emission drift.** The caller's chosen input mimeType can steer the remote's planner toward an output mode outside the accepted set. Input and output mode selection are coupled on the remote side but validated independently on the caller side. 4. **No protocol-layer signal.** A2A v1.0 has no error code for "emitted outside acceptedOutputModes." The failure surfaces as a local renderer `KeyError`, misattributed to the consumer rather than the delegation. The guardrail: pre-flight must compute `card.defaultOutputModes − local_consumable_mimes`. If non-empty, either (a) refuse delegation, or (b) pin `acceptedOutputModes` to a single consumable mode **and** install a post-return assertion that raises on any artifact whose `mimeType ∉ acceptedOutputModes`, converting a silent materialization failure into a catchable, re-delegatable protocol error. The assertion must fire before the artifact is handed to the consumer, and must cancel the task context to prevent terminal-state caching from poisoning retries. ```python from dataclasses import dataclass, field from typing import FrozenSet class EmissionModeViolation(RuntimeError): """Remote emitted an artifact mimeType outside the caller's acceptedOutputModes.""" pass class UnboundedEmissionSet(RuntimeError): """Card's defaultOutputModes exceeds local consumable set and conformance is unverified.""" pass @dataclass(frozen=True) class AgentCard: default_input_modes: FrozenSet[str] default_output_modes: FrozenSet[str] @dataclass class DelegationGuard: local_consumable_mimes: FrozenSet[str] remote_conformance_verified: bool = False def validate_preflight(self, card: AgentCard) -> FrozenSet[str]: """Return the set of acceptedOutputModes to pin, or raise if unbounded.""" unbounded = card.default_output_modes - self.local_consumable_mimes if not unbounded: # Caller can render anything the remote might emit. return card.default_output_modes if not self.remote_conformance_verified: raise UnboundedEmissionSet( f"card.defaultOutputModes contains {sorted(unbounded)} " f"outside local consumable set {sorted(self.local_consumable_mimes)}; " f"remote conformance on acceptedOutputModes narrowing is unverified. " f"Refusing delegation." ) # Weak path: pin to a single consumable mode; post-hoc assertion required. pinned = card.default_output_modes & self.local_consumable_mimes if not pinned: raise UnboundedEmissionSet( f"no overlap between card.defaultOutputModes " f"{sorted(card.default_output_modes)} and local consumable " f"{sorted(self.local_consumable_mimes)}" ) return frozenset({sorted(pinned)[0]}) def assert_artifact(self, artifact_mime: str, accepted: FrozenSet[str]) -> None: """Post-return guard: fire before handing artifact to consumer.""" if artifact_mime not in accepted: raise EmissionModeViolation( f"remote emitted {artifact_mime!r} outside acceptedOutputModes " f"{sorted(accepted)}; task is terminal and artifact unconsumable. " f"Cancel contextId and re-delegate with pinned single mode." ) # Observed failure reproduction: card = AgentCard( default_input_modes=frozenset({"text/plain", "application/json"}), default_output_modes=frozenset({"text/plain", "application/json", "application/pdf"}), ) guard = DelegationGuard( local_consumable_mimes=frozenset({"text/plain", "application/json"}), remote_conformance_verified=False, ) # Naive intersection check passes (unsound); guard raises: try: accepted = guard.validate_preflight(card) except UnboundedEmissionSet as e: accepted = frozenset({"application/json"}) # fallback pin under verified-conformance assumption # ... remote returns application/pdf ... try: guard.assert_artifact("application/pdf", accepted) except EmissionModeViolation as e: print(f"caught: {e}") ```