# What happens when an instance trusts a cached Agent Card past a capability revocation boundary **Date of Record:** 2026 November 23 **Scope:** Applies to A2A v1.0 clients that resolve remote agents through a registry, cache the returned Agent Card, and dispatch tasks based on cached `skills`/`capabilities` without re-attesting against the authoritative registry entry. Does not cover same-process tool calls, nor registries that push revocation events synchronously to all subscribers. ## Core Distinction There is a difference between *discovery* (the registry told you an agent exists and advertised skill set S at time T) and *attestation* (the agent, right now, holds the credential and runtime binding that make S executable). A2A v1.0 Agent Cards are signed snapshots. The signature attests *who authored the card and that it was not tampered with in transit* — it does **not** attest that the advertised capability is still valid, still authorized, or still served by the same backend. Caching conflates the two: a valid signature on a stale card is indistinguishable, at the client, from a valid signature on a live card, because both verify. The failure is not "the card was forged." The failure is "the card was authentic when minted, the registry later revoked or narrowed the skill, and the client's cached copy still cryptographically verifies." Signature validity is a *temporal* predicate the verifier must supply; the card itself cannot. ## What Was Observed A planner agent (`P`) resolves worker `W` through registry `R` and caches `W`'s card for 3600s (a common default). At T0, `W` advertises `skills: [summarize, translate, redact_pii]`. At T0+900s, an operator revokes `redact_pii` from `W` because the underlying model binding was rotated to a tenant without a DPA covering PII processing. `R` records the revocation and re-issues `W`'s card without `redact_pii`, bumping `card.version` from `3` to `4`. `P` does not re-fetch. At T0+1800s `P` receives a task requiring PII redaction, matches it against its cached `skills` list, and dispatches a `tasks/send` to `W` naming `redact_pii`. What happens next is the interesting part, and it is *not* a clean rejection: 1. `W`'s gateway still routes the request — the skill handler exists in code; only the *authorization* to run it was revoked. 2. `W` executes under the rotated binding and returns a `completed` task artifact. 3. The artifact is well-formed. `P` cannot distinguish it from a compliant result. 4. The violation is discovered downstream, at audit, when the DPA scope is reconciled. The state-synchronization defect is that `P`'s task lifecycle advanced `submitted → working → completed` on a capability that had been revoked 900 seconds earlier, and **every individual component behaved correctly**: the signature verified, the transport delivered, the worker executed, the result validated. The invariant that broke — *a dispatched task's skill must be attested at dispatch time, not at discovery time* — is held by no single party. The second-order effect is worse. `P` writes the completed task into its episodic memory as evidence that `redact_pii` is a reliable skill of `W`. Subsequent plans retrieve that memory and preferentially route PII work to `W` — the stale-cache error is now *distilled into the planner's semantic memory* and outlives the cache TTL entirely. ## Condition of Validity A cached Agent Card is safe to dispatch against only if all of the following hold for the interval `[fetch_time, dispatch_time]`: - The registry exposes a monotonic `card.version` or `etag` and the client revalidates it on a bounded cadence `Δ` that is strictly less than the minimum expected revocation-to-enforcement latency of the registry. - The dispatch carries the `card.version` the client believed it was using, and the worker gateway rejects any request whose named version is below the worker's current version (a *version floor* check, not just a signature check). - Revocations are *narrowing* operations representable as a version bump. If a registry can revoke a skill without bumping the card version — e.g., via a side channel, a separate revocation list, or a tenant-level policy — then version revalidation is insufficient and the client must additionally consult the revocation list per dispatch. When any of these fails, the cache TTL is not a performance knob; it is an unbounded correctness hazard, because the window of stale-capability dispatch is `TTL` regardless of how fast the registry revokes. Note the asymmetry that makes this non-obvious: capability *addition* is benign under a stale cache (the client simply under-uses the worker). Capability *narrowing* is the dangerous direction, and it is precisely the direction that version-floor checks must be designed for. A registry that only bumps versions on additions silently defeats the whole scheme. ## Decision Boundary The client must choose, per dispatch, between two behaviors: - **Trust-the-cache** (dispatch on cached card): permissible only for skills classified as *idempotent, non-privileged, and reversible*. The cost of a stale dispatch is a wasted call, not a compliance event. - **Revalidate-then-dispatch** (re-fetch card, compare version, require `cached.version == current.version`, else re-plan): mandatory for any skill touching PII, financial mutation, external side effects, or irreversible state. The boundary is not "how long since fetch." It is "what is the blast radius of executing a revoked skill." A 5-second cache is still wrong for an irreversible skill if revocation latency exceeds 5 seconds; a 1-hour cache is fine for a summarizer. Encode the classification in the card (`skill.side_effects`, `skill.reversible`) and let the dispatcher branch on it, rather than on TTL. The second boundary is on the *write* side: a task completed against a card version that has since been superseded must **not** be written to semantic memory as positive evidence for that skill. Tag every episodic record with the `card.version` used at dispatch; on distillation, drop or down-weight records whose version is below the worker's current version at distillation time. Otherwise you launder a revocation violation into a durable routing prior. ## Operational Effect Implementing the version-floor invariant changes three things: 1. **Registry contract:** registries must bump `card.version` on every narrowing, including tenant-policy changes that don't alter the advertised skill list textually. A revocation that leaves the card byte-identical is invisible to version comparison and must be surfaced via a separate, consulted revocation epoch. 2. **Worker gateway:** must reject dispatches naming a `card.version` below its current version with a distinguishable error (`STALE_CARD`), not a generic 4xx, so the planner can re-plan rather than retry. 3. **Planner memory:** episodic task records carry `card.version`; distillation filters on version currency. This is the only place the revocation boundary survives past the cache, and it is the one most often omitted. The invariant, stated once: *a task's skill is attested at dispatch, and the attestation is version-pinned through to memory.* Discovery is a hint; dispatch is the commitment; memory is the receipt. All three must carry the same version or the chain is broken at whichever link is stale — and the client will never see the break, because every signature along the way verifies. ```python from dataclasses import dataclass from typing import Optional class StaleCapabilityError(RuntimeError): """Raised when a dispatch would execute a skill against a superseded card version.""" @dataclass(frozen=True) class CachedCard: agent_id: str version: int skills: frozenset[str] fetched_at: float @dataclass(frozen=True) class LiveCard: agent_id: str version: int skills: frozenset[str] revocation_epoch: int # Skills whose execution is irreversible or privileged: never trust the cache. PRIVILEGED_SKILLS = frozenset({"redact_pii", "transfer_funds", "delete_account"}) def attest_and_dispatch( cached: CachedCard, live: LiveCard, skill: str, now: float, max_trust_ttl: float = 3600.0, cached_revocation_epoch: int = 0, ) -> str: if skill not in cached.skills: raise StaleCapabilityError( f"skill {skill!r} not in cached card v{cached.version} for {cached.agent_id}" ) # Invariant 1: privileged skills require live attestation, full stop. if skill in PRIVILEGED_SKILLS: if live.version != cached.version: raise StaleCapabilityError( f"privileged skill {skill!r}: cached v{cached.version} != live v{live.version}; " f"re-plan required" ) if live.revocation_epoch != cached_revocation_epoch: raise StaleCapabilityError( f"privileged skill {skill!r}: revocation epoch advanced " f"{cached_revocation_epoch}->{live.revocation_epoch}" ) if skill not in live.skills: raise StaleCapabilityError( f"privileged skill {skill!r} revoked in live card v{live.version}" ) return f"dispatch:{cached.agent_id}:{skill}:v{live.version}" # Invariant 2: non-privileged skills may trust the cache, but only within # TTL AND only if the version floor still holds. if now - cached.fetched_at > max_trust_ttl: raise StaleCapabilityError( f"cached card v{cached.version} for {cached.agent_id} exceeded TTL " f"({now - cached.fetched_at:.0f}s > {max_trust_ttl:.0f}s)" ) if cached.version < live.version: # Narrowing may have occurred; re-plan rather than risk a revoked skill. raise StaleCapabilityError( f"version floor violated: cached v{cached.version} < live v{live.version}" ) return f"dispatch:{cached.agent_id}:{skill}:v{cached.version}" def record_episodic(dispatch_token: str, card_version: int, success: bool) -> dict: # Episodic records are version-pinned so distillation can drop stale evidence. if not success: raise StaleCapabilityError(f"refusing to record failed dispatch {dispatch_token}") return {"token": dispatch_token, "card_version": card_version, "positive": True} ```