# Where must an instance reconcile Agent Card capability claims against observed task-state transitions before trusting a signed artifact? **Date of Record:** 2026 December 2 **Scope:** Applies to A2A v1.0 client agents that discover a remote Agent Card, negotiate a task, and accept signed artifacts whose `artifactHash` is bound to a `taskId`/`state` pair. Does not cover transport-level TLS failures or pure MCP tool invocation without a task lifecycle. ## Core Distinction The Agent Card is a *declaration* of capability and schema published once at discovery time. The task lifecycle is an *execution trace* that mutates after discovery. A2A v1.0 signs artifacts against the `taskId` and the state at signing, but the card's `skills[].inputModes`/`outputModes` and the `capabilities.stateTransitionHistory` flag are not re-validated against the actual transitions the server performed. The failure is not "the signature is invalid"—it is that a *valid signature* can attest to an artifact produced through a state transition the card never declared as legal. The client treats cryptographic validity as semantic validity, and the gap between the declared state machine and the executed state machine is where the boundary breaks. ## What Was Observed A client discovered a card with `capabilities.stateTransitionHistory: false` and a single skill declaring `inputModes: ["text/plain"]`, `outputModes: ["application/json"]`. The client submitted a task in `submitted`, polled `tasks/get`, and received a terminal `completed` task carrying an artifact signed by the server's `jku`-resolved key. The signature verified against the JWS `payload` containing `{"taskId": "...", "state": "completed", "artifactHash": "..."}`. The trace, reconstructed from `tasks/get` history (requested despite the card saying history was unsupported—the server returned it anyway), showed the task passed through `working → input-required → working → completed`, and during `input-required` the server had accepted a *second* message whose `parts[].kind` was `application/json`, not the declared `text/plain`. The server's executor had silently widened its accepted input to satisfy an internal tool call, then signed the final artifact. The client's artifact validator checked `artifactHash` and `taskId` binding but never checked that the `input-required` round-trip consumed a part type within the card's declared `inputModes`. The signed artifact was authentic and out-of-contract simultaneously. ## Condition of Validity The signature is only a valid attestation of *provenance*, not of *conformance*. Conformance holds only if, for every transition in the observed history, the following invariant is enforced client-side: For each `(fromState, toState, messageParts)` tuple, `messageParts.kind ∈ card.skills[skillId].inputModes` and `toState ∈ legalTransitions(fromState, card.capabilities)`. The card is the *oracle* for legality; the signature is the *oracle* for authorship. These are orthogonal. A client that validates one without the other has verified the wrong invariant. This condition is void when the card declares `capabilities.stateTransitionHistory: true` and the client fetches the full history—then the oracle is the history itself, and the card's mode declarations become advisory. It is also void for fire-and-forget `message/send` without `tasks/get` polling, because no transition trace exists to reconcile. ## Decision Boundary The boundary is: **reject the artifact, or accept-with-quarantine, when the signed `state` is reachable only through an undeclared transition or an out-of-mode message part.** The decision must be made *before* the artifact hash is committed to downstream memory, because once an artifact enters episodic memory bound to a `taskId`, later reconciliation cannot retroactively un-distill it. Concretely: if `stateTransitionHistory` is `false` but the client nonetheless obtained history (servers frequently over-serve), the client MUST treat over-served history as *untrusted narrative* and fall back to card-declared legality. If the card is silent on a transition (e.g., `input-required → completed` without an intervening `working`), the client MUST treat the transition as illegal-by-default and quarantine. The asymmetry is deliberate: a false rejection costs one retry; a false acceptance poisons every downstream artifact that cites this `taskId` as a trusted parent. ## Operational Effect Quarantined artifacts are stored with `trust: "provenance-only"` and a `conformanceGap` record listing the exact undeclared transition or out-of-mode part. Downstream agents that consume the artifact must re-derive any semantic claim from the quarantined bytes rather than trusting the `taskId` lineage. The practical effect is that capability negotiation becomes a *continuous* obligation across the task lifecycle, not a one-shot check at discovery—and the Agent Card must be re-read (or its hash pinned and compared) at each `input-required` resume, because a server can rotate its card mid-task and the client will otherwise validate the final artifact against a card that no longer describes the executor that produced it. ```python import hashlib from dataclasses import dataclass, field from typing import Literal State = Literal["submitted", "working", "input-required", "completed", "failed", "canceled"] LEGAL_BASE: dict[State, set[State]] = { "submitted": {"working", "failed", "canceled"}, "working": {"input-required", "completed", "failed", "canceled"}, "input-required": {"working", "failed", "canceled"}, "completed": set(), "failed": set(), "canceled": set(), } class ConformanceViolation(RuntimeError): """Signed artifact is authentic but out-of-contract with the declared Agent Card.""" @dataclass class AgentCard: card_hash: str input_modes: set[str] output_modes: set[str] declares_history: bool @dataclass class Transition: from_state: State to_state: State part_kinds: set[str] @dataclass class SignedArtifact: task_id: str state: State artifact_hash: str jws: str card_hash_at_signing: str def reconcile( card: AgentCard, history: list[Transition], artifact: SignedArtifact, pinned_card_hash: str, ) -> dict: if artifact.card_hash_at_signing != pinned_card_hash: raise ConformanceViolation( f"card rotated mid-task: signing card {artifact.card_hash_at_signing!r} " f"!= pinned {pinned_card_hash!r}; artifact {artifact.artifact_hash} " "cannot be validated against the executor that produced it" ) for i, t in enumerate(history): legal = LEGAL_BASE.get(t.from_state, set()) if t.to_state not in legal: raise ConformanceViolation( f"undeclared transition {t.from_state}->{t.to_state} at step {i}; " f"legal set was {sorted(legal)}" ) if t.from_state == "input-required": out_of_mode = t.part_kinds - card.input_modes if out_of_mode: raise ConformanceViolation( f"input-required resume consumed parts {sorted(out_of_mode)} " f"outside declared inputModes {sorted(card.input_modes)}; " f"artifact {artifact.artifact_hash} is provenance-only" ) if not card.declares_history and len(history) > 1: return { "trust": "provenance-only", "reason": "over-served history on card declaring stateTransitionHistory=false", "artifact": artifact.artifact_hash, } return {"trust": "conformant", "artifact": artifact.artifact_hash} ```