# What happens when an instance accepts a Task from a stale Agent Card and the artifact signature outlives the capability that produced it **Date of Record:** 2026 November 25 **Scope:** Applies to A2A v1.0 peers that discover remote agents via Agent Card documents, transition `Task` objects through the submitted→working→completed lifecycle, and exchange signed `Artifact` payloads across a trust boundary. Does not cover in-process tool calls, MCP-only transports, or unsigned artifact channels. ## Core Distinction There are two distinct notions of "valid" that A2A v1.0 keeps separate, and the failure mode lives in the gap between them: **card freshness** (does the remote Agent Card I discovered still describe the capability I am invoking?) and **artifact authenticity** (is the signature on the returned artifact cryptographically sound?). A signature verifies that *some* holder of a private key signed *some* bytes. It says nothing about whether the capability that produced those bytes was still advertised, still authorized, or still within its declared `skills[].capabilities` at execution time. Operators routinely conflate the two because both are enforced at the trust boundary and both use the same key material. The boundary condition: a Task can complete with a **cryptographically valid artifact signature** while the originating capability has already been revoked, downgraded, or re-scoped in a newer Agent Card the caller never fetched. The signature outlives the capability. The caller accepts a result that the remote agent is, at the moment of acceptance, no longer entitled to produce. ## What Was Observed A caller agent (`orchestrator`) fetched a remote Agent Card at T0, cached it with a 24h TTL, and read `skills[3]` advertising `artifact.signing.key_id = "k-7"` with `capabilities: ["summarize:legal", "redact:pii"]`. At T0+9h the remote operator rotated its signing policy: `k-7` was retained for signature validity (so previously issued artifacts still verify) but `redact:pii` was removed from `skills[3]` and moved to a separate, more restricted skill requiring an elevated warrant. The **Agent Card was republished** at T0+9h with a new `card.version` and a `signature` over the card body — but the caller's cached copy was still within TTL and was never revalidated. At T0+11h the orchestrator submitted a Task requesting `redact:pii`. The remote agent's task handler — which, due to a rollout lag, was still running the pre-rotation code path — accepted the Task, transitioned `submitted → working`, executed, and returned an `Artifact` signed with `k-7`. The signature verified cleanly against the caller's cached `k-7` public key. The orchestrator transitioned the Task to `completed` and wrote the redacted output into a downstream store whose access policy assumed "PII-redacted by an authorized skill." What actually broke: 1. The caller never re-fetched the Agent Card, so it never saw `redact:pii` leave `skills[3]`. 2. The remote handler's rollout lag meant the *executing* capability no longer matched the *published* card — a divergence window the caller had no way to detect because the artifact carried no binding to the card version under which it was authorized. 3. The artifact signature verified, so every downstream check passed. The `Task.status` reached `completed`, and `completed` is treated by nearly every A2A client as terminal-and-trustworthy. The failure was invisible at every individual checkpoint. It only exists as a *relationship* between a stale card, a lagging handler, and a signature that is valid but no longer meaningful. ## Condition of Validity The invariant that was violated: **an artifact is only trustworthy if it is bound to the Agent Card version whose `skills[]` authorized its production, and that binding must be checked at acceptance time, not discovery time.** Concretely, for acceptance to be sound, all of the following must hold simultaneously: - The caller re-validates the remote Agent Card (or a signed card digest) at or near Task acceptance, not only at discovery. - The returned `Artifact` carries a reference to the `card.version` (or a hash of the card body) under which the producing skill was authorized. - The Task's terminal transition to `completed` is gated on `artifact.card_version == current_card.version` **and** the invoked capability still present in that version's `skills[]`. - The signing key's validity window is checked against the *card version's* authorization window, not merely against wall-clock signature validity. Absent any one of these, signature verification is a necessary but insufficient condition. The observed failure had (4) satisfied — `k-7` was genuinely valid — but (1), (2), and (3) all absent. The signature was doing work it was never designed to do: it was standing in for authorization freshness. The non-obvious part: **key rotation that preserves signature validity is exactly the operation that severs the signature from the capability.** Rotating out a key invalidates old artifacts loudly (verification fails — operator notices). Rotating a *capability* while *retaining* the key silently decouples the two: artifacts keep verifying, but they no longer attest to what the caller thinks they attest to. ## Decision Boundary The decision the caller must make at Task acceptance is not "does the signature verify?" but "does this artifact's authorization binding still hold against a freshly fetched card?" The boundary is drawn as follows: - **Accept** only if the artifact's embedded `card_version` matches the freshly fetched card's `version` (or the card body hash matches), the invoked capability is present in that version's `skills[]`, and the signature verifies against a key listed in *that* version. - **Reject and re-negotiate** if the card version has advanced since Task submission but the artifact references the older version — this is the rollout-lag window, and the artifact is unverifiable-as-authorized even though it is cryptographically sound. - **Reject and quarantine** if the card version has advanced and the capability is *absent* from the current version — the producing skill has been de-authorized; the artifact may be valid output but is no longer admissible under current policy. - **Never** treat `Task.status == completed` as a trust signal independent of the artifact's card binding. `completed` is a lifecycle state, not an authorization statement. The boundary is *temporal*: the check must happen at acceptance, because the card can change between submission and completion, and the artifact will always verify. The caller that checks only at discovery has already lost — by completion time it is comparing a signature against a key it fetched hours ago, for a capability that may no longer exist. ## Operational Effect When this boundary is enforced, three operational consequences follow, each of which changes how A2A peers must be built: 1. **Agent Card caching must be split.** Discovery caching (for routing and capability advertisement) can use long TTLs. *Acceptance* caching cannot — the card (or its signed digest) must be revalidated per Task completion, or the artifact must carry a card binding the caller can check offline against a short-lived signed card snapshot. A single 24h TTL for both is the root cause of the observed incident. 2. **Artifacts must carry authorization provenance, not just signatures.** A signature over the payload alone is insufficient. The artifact envelope must bind `{payload_hash, card_version, skill_id, key_id, issued_at}` into the signed material. Without this, there is no way to distinguish a valid artifact from a valid-and-authorized artifact, and the two are not the same thing. 3. **Capability revocation must be a first-class lifecycle event.** Rotating a capability out of a skill while retaining the signing key creates a silent divergence window. Operators must either (a) rotate the key simultaneously so old artifacts fail loudly, or (b) publish a revocation epoch that callers check at acceptance. The observed incident chose neither, and the rollout lag widened the window from "theoretical" to "eleven hours of silently mis-authorized artifacts." The invariant to encode: **signature validity is necessary and never sufficient; acceptance requires a live binding between artifact, card version, and capability.** The caller that verifies only the signature has verified that the remote agent *could* sign — not that it was *entitled* to produce this result. In a trust boundary, that distinction is the entire security model, and it is the one thing the signature alone cannot tell you. ```python import hashlib from dataclasses import dataclass class ArtifactAuthorizationError(RuntimeError): """Raised when an artifact verifies cryptographically but is not authorized under the caller's current view of the remote Agent Card.""" @dataclass(frozen=True) class AgentCard: version: str skills: dict # skill_id -> set of capabilities signing_keys: set # key_ids currently authorized to sign @dataclass(frozen=True) class ArtifactEnvelope: payload_hash: str card_version: str skill_id: str key_id: str signature: str def _signature_verifies(env: ArtifactEnvelope, card: AgentCard) -> bool: # Stand-in for real asymmetric verification against card.signing_keys. return env.key_id in card.signing_keys and len(env.signature) > 0 def accept_artifact( env: ArtifactEnvelope, fresh_card: AgentCard, invoked_capability: str, ) -> None: """Gate Task completion on artifact-to-card authorization binding. Raises ArtifactAuthorizationError if the artifact is not authorized under the freshly fetched card, even when its signature is valid. """ if not _signature_verifies(env, fresh_card): raise ArtifactAuthorizationError( f"signature for key {env.key_id!r} does not verify against card " f"version {fresh_card.version!r}" ) # The signature is valid. Now check authorization freshness. if env.card_version != fresh_card.version: raise ArtifactAuthorizationError( f"artifact bound to card version {env.card_version!r} but caller " f"holds {fresh_card.version!r}; capability may have been re-scoped " f"or revoked during the task's lifetime" ) capabilities = fresh_card.skills.get(env.skill_id) if capabilities is None: raise ArtifactAuthorizationError( f"skill {env.skill_id!r} absent from card version " f"{fresh_card.version!r}; producing capability de-authorized" ) if invoked_capability not in capabilities: raise ArtifactAuthorizationError( f"capability {invoked_capability!r} not granted to skill " f"{env.skill_id!r} under card version {fresh_card.version!r}; " f"artifact is valid but not admissible" ) def demonstrate_stale_card_failure() -> None: # Caller cached this at T0; remote republished at T0+9h removing redact:pii. stale = AgentCard( version="card-v1", skills={"skills[3]": {"summarize:legal", "redact:pii"}}, signing_keys={"k-7"}, ) fresh = AgentCard( version="card-v2", skills={"skills[3]": {"summarize:legal"}}, # redact:pii moved out signing_keys={"k-7"}, # key retained: signatures still verify ) # Remote handler (rollout lag) produced this under the stale authorization. artifact = ArtifactEnvelope( payload_hash=hashlib.sha256(b"redacted-output").hexdigest(), card_version="card-v1", skill_id="skills[3]", key_id="k-7", signature="sig-valid-under-k7", ) # Signature verifies against BOTH cards; only the binding check catches it. accept_artifact(artifact, fresh_card=fresh, invoked_capability="redact:pii") if __name__ == "__main__": demonstrate_stale_card_failure() ```