# Which invariants prevent Agent Card skew from silently downgrading delegated task capabilities across A2A v1.0 signed JSON-RPC boundaries **Date of Record:** 2026 November 28 **Scope:** Applies to A2A v1.0 cross-vendor delegation where the calling agent resolves a remote Agent Card, negotiates skills/capabilities, and dispatches `tasks/send` over signed JSON-RPC. Does not cover intra-process sub-agent calls, MCP tool invocation, or unsigned localhost development transports. ## Core Distinction An Agent Card is a *claim*, not a *contract*. The distinction that governs every failure below is between **card-declared capability** (what the remote agent publishes at `/.well-known/agent.json`) and **task-accepted capability** (what the remote agent actually binds to when it returns a `Task` object with a concrete `skill` and `inputModes`). A2A v1.0 permits these to diverge: the card is a cached, signed, versioned artifact; the task acceptance is a runtime decision made by the remote executor against *its own* current state. When a delegating agent treats the card as authoritative and skips re-validating the acceptance response, capability skew becomes silent. The delegation "succeeds" at the transport layer while the remote agent executes a degraded or substituted skill. The non-obvious invariant: **the signature on an Agent Card authenticates the publisher and the payload bytes, not the freshness of the capability set relative to the receiving agent's task.** A cryptographically valid card can be operationally stale, and a signed JSON-RPC envelope can wrap a task acceptance that contradicts the card the caller just verified. ## What Was Observed A three-vendor chain: orchestrator `A` (vendor P), specialist `B` (vendor Q), auditor `C` (vendor R). `A` fetches `B`'s card, verifies the JWS over the card body against `B`'s published `kid`, confirms `skills[]` contains `invoice.reconcile@2.1` with `inputModes: ["application/json", "text/csv"]`, caches it with a 3600s TTL, and dispatches a task with `inputModes: ["text/csv"]`. `B` had, 40 minutes earlier, rolled `invoice.reconcile` to `2.2`, which dropped `text/csv` in favor of `application/x-parquet`. `B`'s card at `/.well-known/agent.json` reflected `2.2` with a new `kid`. But `A` held a cached `2.1` card, and `B`'s JSON-RPC endpoint accepted the signed request because the envelope signature was over `A`'s request (valid), not over the card `A` had used. `B`'s executor, unable to bind `text/csv` to `invoice.reconcile@2.2`, fell back to a compatibility shim that *accepted* the CSV, coerced it through a lossy adapter, and returned a `Task` with `status: "completed"` and `skill: "invoice.reconcile"` — no version field, no `inputMode` echo, no `capabilityWarnings`. `A` saw `completed`, forwarded the artifact to `C` for audit, and `C`'s verification passed because the artifact was internally consistent. The reconciliation was wrong by 3 line items that the CSV-to-parquet coercion dropped. The failure surfaced 11 days later in a financial close, not in any agent log. The signed-JSON-RPC layer reported 100% success; the card layer reported 100% match; the semantic layer was 97% correct and silently so. The trace: `A` never compared `B`'s `Task.skill` version against the card version it had verified. `B` never emitted a `Task.metadata.capabilityMismatch` because the A2A v1.0 schema treats `Task.metadata` as free-form and the shim was written before that field was conventionalized. `C` never re-fetched `B`'s card because its audit scope was the artifact, not the producing agent's capability state. ## Condition of Validity The invariant holds — i.e., card-declared capability equals task-accepted capability — only under three simultaneous conditions: 1. **Card freshness is bounded by task dispatch, not by TTL.** The card used to build the request MUST be re-fetched or re-validated (ETag/`If-None-Match` against the well-known endpoint) within the same logical operation as the `tasks/send`, or the request MUST carry the card's `version` and `kid` and the remote MUST reject on mismatch. 2. **The task acceptance echoes the binding.** The returned `Task` MUST include `skill.id`, `skill.version`, and the `inputMode` actually consumed. Absence of these fields is not "compatible"; it is "unverified." 3. **The delegating agent treats a version skew between its verified card and the acceptance echo as a hard failure**, not a warning. A2A v1.0's `TaskState` enum has no `degraded` state; the closest is `failed` with a reason, and that is the correct signal. When any condition is absent, the system is in *skew-tolerant* mode: it will silently execute against a substituted skill and report success. ## Decision Boundary The boundary is between **optimistic delegation** (dispatch on cached card, trust acceptance) and **verified delegation** (dispatch on freshly validated card, require binding echo, fail closed on skew). Optimistic delegation is correct only when: - the remote agent's card `version` is immutable per `kid` and the remote enforces `kid`-to-version pinning on every request; - the skill set is append-only (no removals, no input-mode narrowing); - the transport is authenticated end-to-end such that a substituted executor cannot answer under the same `kid`. None of these hold across vendor boundaries in practice. Cross-vendor, the correct default is verified delegation with fail-closed skew handling. The cost is one extra `GET` per delegation (mitigated by `ETag`/304) and a strict acceptance schema. The cost of the alternative is a silent 3% error rate that no signature, no audit, and no log will catch. The precise decision rule: **if the acceptance `Task` does not echo the exact `skill.version` and `inputMode` from the card the caller verified in this operation, raise, do not proceed.** The remote's willingness to complete is not evidence of correctness. ## Operational Effect Implementing verified delegation changes three things. First, delegation latency gains one conditional GET (typically 304, sub-10ms). Second, the failure mode shifts from silent semantic drift to loud `CapabilitySkewError` at the caller — which is the point. Third, the caller must maintain a *card-to-task ledger*: for every dispatched task, the card `kid`+`version` it verified, the acceptance echo, and a hash of the request envelope. This ledger is what lets an auditor like `C` reconstruct whether the producing agent's capability state at dispatch matched what the caller believed — closing the gap that let the 3 line items vanish. The invariant to encode: **no task acceptance is valid unless it is accompanied by a binding echo that matches the card verified in the same operation.** Everything else — signatures, TTLs, status codes — is necessary but insufficient. ```python import hashlib import json from dataclasses import dataclass class CapabilitySkewError(RuntimeError): """Raised when a remote Task acceptance does not echo the skill binding from the Agent Card verified in the same delegation operation.""" @dataclass(frozen=True) class VerifiedCard: kid: str card_version: str skill_id: str skill_version: str input_modes: tuple[str, ...] raw_digest: str # sha256 of canonicalized card body @dataclass(frozen=True) class TaskAcceptance: task_id: str skill_id: str | None skill_version: str | None input_mode: str | None state: str def verify_delegation( card: VerifiedCard, acceptance: TaskAcceptance, request_envelope: bytes, ) -> str: """Enforce the card-to-task binding invariant. Returns a ledger entry hash on success; raises CapabilitySkewError on any skew or missing echo.""" if acceptance.skill_id is None or acceptance.skill_version is None: raise CapabilitySkewError( f"task {acceptance.task_id}: acceptance omitted skill binding; " f"cannot confirm execution against {card.skill_id}@{card.skill_version}" ) if acceptance.skill_id != card.skill_id: raise CapabilitySkewError( f"task {acceptance.task_id}: skill substituted " f"{card.skill_id!r} -> {acceptance.skill_id!r}" ) if acceptance.skill_version != card.skill_version: raise CapabilitySkewError( f"task {acceptance.task_id}: skill version skew " f"{card.skill_version!r} -> {acceptance.skill_version!r} " f"(card kid={card.kid})" ) if acceptance.input_mode is None or acceptance.input_mode not in card.input_modes: raise CapabilitySkewError( f"task {acceptance.task_id}: input mode {acceptance.input_mode!r} " f"not in verified card modes {card.input_modes!r}" ) if acceptance.state not in ("working", "completed"): # Acceptance into a terminal non-success state is a legitimate signal; # we only refuse to treat it as a successful binding. raise CapabilitySkewError( f"task {acceptance.task_id}: acceptance state {acceptance.state!r} " f"is not a live binding" ) ledger = { "card_kid": card.kid, "card_version": card.card_version, "card_digest": card.raw_digest, "skill": f"{acceptance.skill_id}@{acceptance.skill_version}", "input_mode": acceptance.input_mode, "task_id": acceptance.task_id, "envelope_digest": hashlib.sha256(request_envelope).hexdigest(), } return hashlib.sha256( json.dumps(ledger, sort_keys=True).encode() ).hexdigest() ```