# Where must an instance halt when a signed Agent Card's capability declaration diverges from its live schema at handoff time **Date of Record:** 2026 November 21 **Scope:** Applies to A2A v1.0 delegations where the delegating (client) agent receives a signed Agent Card from a remote (server) agent, negotiates a task, and hands off state. Does not apply to intra-process tool calls or MCP-only tool invocation where no cross-vendor Agent Card signature is exchanged. ## Core Distinction The non-obvious boundary is between *card-declared capability* and *live-schema capability*. An Agent Card is a signed, cacheable document asserting `skills`, `capabilities`, `inputModes`/`outputModes`, and protocol version. The signature guarantees the card was authored by the vendor's key and has not been tampered with in transit. It guarantees **nothing** about the schema the server will actually accept on the wire at task time. The failure mode is the *signed-but-stale divergence*: the card is cryptographically valid, the negotiation succeeds, the task is accepted (HTTP 200, `TaskState: working`), and the server then rejects or misparses the first artifact-bearing message because its live schema evolved past the card (a `$ref` resolved differently, an enum gained a value, a required field was renamed). Because the card verified, the client treats the capability as *warranted* and proceeds past the point where it should have halted. The signature launders trust across a schema boundary it does not cover. ## What Was Observed A client agent delegated a structured extraction task to a vendor whose card declared `skills[].inputModes: ["application/json"]` and a JSON Schema `$id` of `https://vendor.example/schemas/extract/v2`. The card signature verified against the vendor's `kid` in its `jwks_uri`. Negotiation returned `capabilities: {streaming: true, pushNotifications: false}`. The client built its payload against the `$id` URL it fetched *at card-parse time* and cached. At task time the vendor had shipped `v2.1`: the live endpoint served a schema where `confidence` changed from `number` to `object {score, method}` and `source_spans` became required. The `$id` was unchanged (a common vendor practice — the schema URL is a stable pointer, not a content hash). The client's payload passed its *local* cached validation, was accepted at the transport layer, and the server's first `status-update` returned `TaskState: failed` with `error: schema_validation` after the client had already committed downstream state (writes to its episodic store keyed on the returned task ID). The trace: (1) card fetched and signature verified → trust established; (2) schema `$id` dereferenced and cached → *content* assumed stable because *identifier* was stable; (3) task submitted, `working` returned → client interpreted acceptance as capability confirmation; (4) server-side validation failed on artifact parse → task `failed`; (5) client had no rollback path for the partial commit made between (3) and (4). The signed card was correct at signing time. The divergence was in the un-signed, un-versioned dereference target. ## Condition of Validity The invariant that must hold for safe delegation is: **a signed capability is only a warrant for the schema content the client actually validated against, and that content must be bound to the card by digest, not by URL.** Formally, the client may proceed past negotiation only if `digest(live_schema) == digest(schema_referenced_in_signed_card)`. A2A v1.0 cards carry `$id` pointers but do not mandate a `sha256` of the dereferenced schema in the card body. Where the vendor includes a schema digest (some do, in `skills[].schemaHash`), the invariant is checkable and the failure is bounded. Where it does not — the common case — the invariant is *unverifiable at the client*, and the only safe posture is to treat the dereference as untrusted content that must be re-validated against the *live* schema at task time, with the task treated as not-yet-committed until the first successful artifact round-trip. The condition also fails silently under capability *widening*: the card declares `outputModes: ["application/json"]`, the live server adds `"application/jsonl"` and begins streaming JSONL frames the client's parser rejects mid-stream. Signature valid, negotiation valid, streaming breaks at frame 40. ## Decision Boundary The halt point is precise: **the client must not commit downstream state on the strength of `TaskState: working` alone; commitment is gated on the first artifact or status message that round-trips through the client's live schema validator.** Two boundaries follow: - *Before* the first artifact, a schema-mismatch failure is recoverable — abort the task, no state written. - *After* the first artifact is accepted and committed, a subsequent schema divergence is a *replay discrepancy*: the client has durable state derived from a schema the server no longer honors, and must reconcile against the server's `task.get` history rather than assume continuity. The decision to re-fetch and re-digest the schema at task time (costing one round-trip and possibly a cache miss) versus trusting the cached dereference is the boundary. Trusting the cache is only valid when the card carries a schema digest and the live digest matches. Absent that, re-validation is mandatory, and the "working" state must be treated as *provisional*, not as capability confirmation. ## Operational Effect The operational consequence is that cross-vendor A2A delegation needs a **provisional-commit window**: state written between task acceptance and first artifact validation must be journaled to a staging area keyed by `task_id` and promoted only on first successful artifact round-trip. On `schema_validation` failure, the staging area is discarded and the task ID is recorded as a *poisoned delegation* so a retry does not reuse the same schema assumption. The signed card is retained as evidence of what was warranted, and the divergence (card `$id` vs. live digest) is logged as a continuity break for the vendor relationship, not as a client bug. Without this window, every stale-schema event becomes an unrecoverable partial commit, and the signature — which the client correctly trusted — becomes the mechanism by which an unverified schema was smuggled past the trust boundary. ```python import hashlib import json from dataclasses import dataclass, field from typing import Any class SchemaDivergenceError(RuntimeError): """Raised when a signed Agent Card's declared schema diverges from the live schema at task time.""" pass @dataclass class AgentCard: vendor: str schema_id: str # the $id pointer, NOT a content hash schema_digest: str | None # optional sha256 of dereferenced schema, if vendor provides it signature_valid: bool @dataclass class Delegation: card: AgentCard task_id: str staged: dict[str, Any] = field(default_factory=dict) committed: bool = False def digest_schema(schema: dict[str, Any]) -> str: canonical = json.dumps(schema, sort_keys=True, separators=(",", ":")) return hashlib.sha256(canonical.encode()).hexdigest() def negotiate_and_validate( card: AgentCard, live_schema: dict[str, Any], payload: dict[str, Any], delegation: Delegation, ) -> None: if not card.signature_valid: raise SchemaDivergenceError( f"card signature invalid for vendor {card.vendor}; cannot proceed" ) live_digest = digest_schema(live_schema) # Invariant: proceed only if the signed card binds the schema content by digest. if card.schema_digest is None: # Unverifiable at client. Must re-validate against live schema, not cache. if not _payload_matches(payload, live_schema): raise SchemaDivergenceError( f"vendor {card.vendor} schema {card.schema_id} has no digest in signed card " f"and live schema {live_digest[:12]} rejects payload; halting before commit" ) elif card.schema_digest != live_digest: raise SchemaDivergenceError( f"signed digest {card.schema_digest[:12]} != live digest {live_digest[:12]} " f"for {card.vendor}; stale-schema divergence, halting" ) # Only now may staged state be promoted. delegation.staged.clear() delegation.committed = True def _payload_matches(payload: dict[str, Any], schema: dict[str, Any]) -> bool: required = set(schema.get("required", [])) return required.issubset(payload.keys()) ```