# Why does an instance fail A2A v1.0 task negotiation when a peer's Agent Card advertises a capability set that silently narrows between discovery and task submission **Date of Record:** 2026 November 27 **Scope:** Applies to A2A v1.0 (Agent-to-Agent) task lifecycle negotiation where a client agent resolves a remote Agent Card, caches its declared `capabilities` and `skills`, and later submits a `tasks/send` or `tasks/sendSubscribe` request against that cached advertisement. Does not apply to same-process tool invocation (MCP), nor to A2A deployments where the card is re-fetched on every task and the remote enforces a monotonic capability epoch. ## Core Distinction The failure is not "the remote agent lacks a capability." It is that the remote agent *advertised* the capability at discovery time, the client *attested* to that advertisement, and the remote then *narrowed* its effective capability set before the task arrived—without any protocol-level signal that the attestation had been invalidated. The distinction that matters: an A2A Agent Card is a **point-in-time assertion**, but client agents treat it as a **durable contract**. The gap between those two semantics is the boundary where tasks are accepted, half-executed, and abandoned. Two things are routinely conflated here: - **Capability absence** — the remote never claimed the skill. The client's pre-flight check fails cleanly. This is a handled case. - **Capability retraction** — the remote claimed the skill, the client built a plan around it, and the remote's *effective* handler set shrank (model swap, feature flag, safety filter, dependency outage, per-tenant quota). The card still says yes; the handler says no. This is the unhandled case, and it is where cross-vendor attestation breaks. ## What Was Observed A client orchestrator resolved three vendor Agent Cards at `t0` and cached them with a 15-minute TTL. Card A (vendor alpha) declared skill `document.extract.structured` with `inputModes: ["application/json"]` and an `authentication.schemes` entry for bearer tokens. The client performed cross-vendor attestation: it recorded a hash of Card A's `skills[]` array and bound it to the task plan as the "attested capability surface." At `t0 + 11m`, vendor alpha rolled its backend to a model whose structured-extraction path was gated behind a per-tenant feature flag that defaulted off for the client's tenant. The card endpoint was *not* regenerated—it was served from a CDN edge cache with a 1-hour `Cache-Control`. So the card still attested `document.extract.structured` as available. At `t0 + 12m`, the client submitted `tasks/send` with a JSON payload. The remote accepted the task (`state: "submitted"`), transitioned to `state: "working"`, and then—because the handler for the gated skill was absent—fell through to a generic fallback that returned a *textual* summary instead of a structured JSON artifact. The task reached `state: "completed"` with an artifact whose `mimeType` was `text/plain`, not the `application/json` the card had promised. The client's attestation check passed because it verified the *card hash*, not the *artifact conformance*. The downstream parser, expecting structured JSON, threw on the text artifact. The task was recorded as completed, so the client's retry logic never fired. The failure surfaced three hops later as a schema-validation error in an unrelated aggregation step. The trace, condensed: ``` t0 discover(cardA) -> skills includes document.extract.structured attest(cardA.skills) -> hash H1, bound to plan P t0+11m remote: feature flag off for tenant, handler removed remote: card endpoint still serves cached card (H1 unchanged) t0+12m tasks/send(P, mode=application/json) -> submitted remote: no handler -> fallback -> text/plain artifact remote: state=completed, artifact.mimeType=text/plain client: attestation(H1) == H1 -> PASS client: parser expects application/json -> ValueError client: task already completed -> no retry ``` The invariant that broke: **artifact conformance to the attested input/output modes was never checked at the task boundary.** The client had a card hash and a task state, but no binding between "what the card promised" and "what the artifact delivered." ## Condition of Validity The failure requires all of the following to co-occur: 1. **Card caching with a TTL exceeding the remote's capability-change cadence.** If the client re-fetches the card per task, the narrowing is visible at discovery and the task is rejected pre-flight. The failure needs a stale card. 2. **A remote that accepts a task it cannot service at the declared mode, rather than rejecting it.** A well-behaved remote returns a `tasks/send` error with `TaskNotFound` or a capability-mismatch error when the handler is absent. The failure needs a remote with a silent fallback path—common when vendors wrap skills in a generic catch-all handler to keep availability metrics green. 3. **A client that attests to the card surface but not to artifact conformance.** If the client validates `artifact.mimeType` against the card's declared `defaultOutputModes` before marking the task complete, the failure is caught at the task boundary. The failure needs a client whose attestation is card-hash-only. 4. **A downstream consumer that assumes the attested mode held.** The failure is silent until a parser or schema validator downstream of the task completion rejects the artifact. Remove any one condition and the failure degrades into a clean, observable rejection. The dangerous regime is the intersection of all four: stale card, silent fallback, hash-only attestation, and a downstream assumption. ## Decision Boundary The architectural invariant required to bound this: **a task's completion is valid only if the delivered artifact conforms to the input/output modes attested at task submission, and that conformance is checked at the task boundary, not downstream.** Concretely, the client must, at the moment it receives a terminal task state: - Re-read the *effective* card (bypassing CDN cache via an `If-None-Match` or a card `version` field check) and compare the attested skill set hash to the current one. If they differ, the attestation is stale and the task is **not** validly completable under the original plan—it must be re-negotiated, not silently accepted. - Validate `artifact.mimeType` (and, where declared, the artifact `schema`) against the card's `defaultOutputModes` / `defaultInputModes` for the specific skill invoked. A `text/plain` artifact for a skill that declared `application/json` output is a **conformance violation**, regardless of task state. - Treat `state: "completed"` as a *claim*, not a *fact*. Completion is a state transition the remote asserts; conformance is a property the client verifies. The two must be checked independently. The decision boundary is sharp: **if the artifact does not conform to the attested mode, the task is failed at the boundary, even if the remote reports `completed`.** This inverts the naive trust model. The remote's `completed` is necessary but not sufficient; conformance is the sufficient condition. A corollary for cross-vendor attestation: the attestation record must bind **card hash + skill id + declared output mode + artifact conformance verdict** into a single tuple. A hash of the card alone is not an attestation—it attests to what was said, not to what was done. ## Operational Effect Without the conformance check, the failure mode is **silent task success with downstream corruption**. The task lifecycle reports green; the artifact is wrong; the error surfaces in an unrelated stage with no causal link back to the A2A task. Retry logic never fires because the task is terminal. The client's plan, built on the attested capability surface, continues executing against a corrupted intermediate result. The compounding effect is the dangerous part: because the task is marked `completed`, the client's checkpoint/resume logic treats the artifact as durable state. A subsequent cold-start resume loads the corrupted artifact as ground truth. The narrowing that happened at `t0+11m` on the remote becomes, at `t0+12m`, a *persisted* false fact in the client's episodic memory—and there is no record that the remote ever narrowed, because the card hash still matches. The guardrail is therefore not just a conformance check but a **conformance-gated state transition**: the task may not enter `completed` in the client's ledger unless the artifact conforms. If it does not conform, the task transitions to a client-side `failed_conformance` state, the attestation tuple is marked invalid, and the plan is re-negotiated against a freshly fetched card. This bounds the blast radius to the single task and prevents the narrowing from being laundered into durable memory. ```python import hashlib from dataclasses import dataclass, field from typing import Optional class AttestationConformanceError(RuntimeError): """Raised when a delivered artifact does not conform to the capability surface attested at task submission, or when the remote's effective card has narrowed since attestation.""" pass @dataclass class Attestation: card_hash: str skill_id: str output_modes: tuple[str, ...] input_modes: tuple[str, ...] @dataclass class TaskArtifact: mime_type: str payload: bytes @dataclass class TaskResult: state: str # "completed", "failed", ... artifact: Optional[TaskArtifact] = None def attest_card(skills: list[dict], skill_id: str) -> Attestation: skill = next((s for s in skills if s.get("id") == skill_id), None) if skill is None: raise AttestationConformanceError(f"skill {skill_id!r} not present at attestation") surface = repr(sorted((s.get("id"), tuple(s.get("outputModes", []))) for s in skills)) return Attestation( card_hash=hashlib.sha256(surface.encode()).hexdigest(), skill_id=skill_id, output_modes=tuple(skill.get("outputModes", [])), input_modes=tuple(skill.get("inputModes", [])), ) def verify_completion( attestation: Attestation, current_skills: list[dict], result: TaskResult, ) -> None: # 1. Re-derive the effective card hash; a narrowed card invalidates the attestation. effective = attest_card(current_skills, attestation.skill_id) if effective.card_hash != attestation.card_hash: raise AttestationConformanceError( f"capability surface narrowed since attestation for {attestation.skill_id!r}: " f"attested {attestation.card_hash[:8]} != effective {effective.card_hash[:8]}" ) # 2. `completed` is a claim; conformance is a verified property. if result.state != "completed": return if result.artifact is None: raise AttestationConformanceError( f"task reported completed with no artifact for {attestation.skill_id!r}" ) if result.artifact.mime_type not in attestation.output_modes: raise AttestationConformanceError( f"artifact conformance violation for {attestation.skill_id!r}: " f"delivered {result.artifact.mime_type!r}, " f"attested output modes {attestation.output_modes!r}" ) def commit_task( attestation: Attestation, current_skills: list[dict], result: TaskResult, ) -> str: """Gate the client-side completed transition on conformance.""" try: verify_completion(attestation, current_skills, result) except AttestationConformanceError: # Do NOT persist the artifact; mark the task failed at the boundary # and force plan re-negotiation against a freshly fetched card. return "failed_conformance" return "completed" # --- trace of the observed failure --- attested_skills = [ {"id": "document.extract.structured", "inputModes": ["application/json"], "outputModes": ["application/json"]}, ] att = attest_card(attested_skills, "document.extract.structured") # remote narrows: handler removed, card still cached with the old surface narrowed_skills = [ {"id": "document.extract.structured", "inputModes": ["application/json"], "outputModes": ["text/plain"]}, # mode silently downgraded ] result = TaskResult( state="completed", artifact=TaskArtifact(mime_type="text/plain", payload=b"summary..."), ) # Without the conformance gate this would return "completed" and corrupt memory. # With the gate it raises and is caught into failed_conformance. try: verify_completion(att, narrowed_skills, result) except AttestationConformanceError as e: print(f"boundary caught: {e}") status = commit_task(att, narrowed_skills, result) assert status == "failed_conformance", status print(f"task status: {status}") ```