# In what scenarios must an instance reject a delegated A2A task when the remote agent-card advertises a capability the local planner has already cached as degraded **Date of Record:** 2026 November 24 **Scope:** Applies to A2A v1.0 cross-vendor task delegation where a local orchestrator caches remote agent-cards and dispatches `tasks/send` based on advertised `skills[].id` and `capabilities` fields. Does not apply to single-vendor intra-cluster delegation where the registry is authoritative and cards are re-fetched per call. ## Core Distinction The failure here is not a discovery failure and not a transport failure. The agent-card *is* fetched, parses cleanly, and the remote endpoint *is* reachable. The failure is a **cache-coherence split between two independently versioned truths**: the local planner's degraded-capability ledger (built from observed task outcomes) and the remote card's declared `skills`/`capabilities` block (built from the vendor's deployment manifest). A2A v1.0 gives the card a `version` field and an optional `signatures` array, but it does **not** define a semantic relationship between "the card says I can do X" and "my last three delegations of X to this agent returned `TASK_STATE_FAILED` with a schema-mismatch artifact." The protocol treats the card as declarative truth; the planner treats its own outcome history as empirical truth. When these diverge, the instance must decide which truth gates dispatch — and the default behavior (trust the card, retry anyway) is the boundary bug. ## What Was Observed A three-vendor pipeline: orchestrator `O` (vendor A), worker `W1` (vendor B, card version `2.3.1`), auditor `W2` (vendor C). `O` caches `W1`'s card at cold start with a 24h TTL. `O`'s local ledger records per-skill success rates keyed on `(agent_url, skills[].id, card_version)`. At T+0, `O` delegates `invoice.extract` to `W1`. `W1` returns a completed task whose artifact conforms to the card's declared `outputModes: ["application/json"]` but whose JSON schema has drifted — a field `line_items[].tax_code` is now emitted as an integer where the card's embedded `schema` (still v2.3.1) declares string. `O`'s validator rejects the artifact, marks the delegation `FAILED` in its ledger, and — critically — records the failure against `card_version=2.3.1`. This is the first error: **the ledger key conflates card version with behavioral version.** `W1` has hot-patched its extraction model without bumping the card, because the card describes *interface*, not *model weights*. At T+3h, `O` receives a new batch. Its planner consults the ledger, sees `invoice.extract@2.3.1` at 0/1 success, and — depending on policy — either (a) skips `W1` and routes to a fallback, or (b) retries because the card still advertises the skill and the TTL hasn't expired. Both are wrong in different ways. Path (a) starves a worker that may have already fixed the drift; path (b) burns the full retry budget against a schema that will keep failing until the card is re-fetched *and* the vendor actually re-deploys. The card's `version` field never moves, so the cache never invalidates on the dimension that actually changed. A second observed variant: `W1` *does* bump to `2.3.2` mid-window, changing `outputModes` to include `application/json+v2`. `O`'s card cache still holds `2.3.1`, so `O` sends a `tasks/send` with `acceptedOutputModes: ["application/json"]`. `W1` v2.3.2 honors the request (backward-compatible) but emits the drifted integer `tax_code` under the old mode string. `O` validates against its *cached* v2.3.1 schema, fails again, and now records the failure against `2.3.1` — a version that no longer exists on the remote. The ledger is now poisoned with a phantom version key, and every future `2.3.2` delegation starts with a clean slate, re-discovering the same drift. ## Condition of Validity The invariant that must hold for safe dispatch is: > A delegated task may be sent only if the `(agent_url, skills[].id, card_version)` triple in the local ledger refers to the *same behavioral artifact* the remote will execute against, **or** the ledger entry is explicitly marked `stale-by-version-bump` and the planner is authorized to spend a probe delegation to re-baseline. This holds only when the card's `version` is a faithful proxy for behavioral change. In practice it is not, because A2A v1.0 cards version the *interface contract*, while behavioral drift lives in the model/runtime behind the endpoint. The condition of validity therefore reduces to: **the ledger must be keyed on a behavioral fingerprint, not the card version alone.** Acceptable fingerprints include the card's `signatures[].value` (if the vendor signs per-deployment), a vendor-supplied `x-runtime-version` extension field, or — absent both — an `O`-side probe result hash (dispatch a canonical fixture task, hash the artifact, store under `(agent_url, skill_id, probe_hash)`). When none of these are available, the instance is operating on an unverifiable card and must treat every ledger entry as advisory, not gating. ## Decision Boundary The boundary is crossed at the moment the planner has *both* (i) a non-empty failure history for a skill under the currently cached card version, and (ii) no behavioral fingerprint distinguishing the failing runtime from the current one. At that point: - **Below the boundary** (fingerprint present and matching, or failure history empty): dispatch normally. Card trust is warranted because the ledger key is behaviorally sound. - **At the boundary** (failure history non-empty, no fingerprint): the instance must **not** dispatch on card trust alone. It must either force a card re-fetch (cheap, may not help if version didn't move) *and* a probe delegation, or escalate to a fallback worker with an explicit `degraded-source` annotation on the task envelope. - **Above the boundary** (failure history non-empty, fingerprint present but *mismatched* — i.e., runtime changed): treat as a fresh worker. Clear the ledger entry under the old fingerprint, dispatch, and re-baseline on the result. The non-obvious part: a card *re-fetch that returns the same version* is not evidence of stability. It is evidence only that the vendor's manifest hasn't changed. The instance that treats "re-fetched, version unchanged, therefore retry is safe" as a valid inference is the one that burns retry budgets in a loop against a hot-patched backend. ## Operational Effect Instances that enforce the behavioral-fingerprint invariant show a bounded retry cost: at most one probe delegation per `(agent_url, skill_id, fingerprint)` transition, after which the ledger is authoritative. Instances that key on card version alone exhibit the **phantom-version retry loop**: each vendor hot-patch that doesn't bump the card adds a failure to the current version key, the planner either starves the worker (routing around a recoverable endpoint) or retries indefinitely (spending budget against a schema that won't converge), and when the vendor *does* bump the version, the poisoned ledger is orphaned and the same drift is re-discovered from scratch under the new key. The guardrail is a two-field ledger key — `(card_version, behavioral_fingerprint)` — with dispatch gated on fingerprint match, not version match. Card version becomes a cache-invalidation hint, not a trust token. ```python class StaleCardBehavioralDrift(RuntimeError): """Raised when dispatch would rely on a cached card whose behavioral fingerprint no longer matches the ledger entry for the target skill.""" pass def gate_dispatch(ledger, agent_url, skill_id, cached_card, probe_hash=None): key_version = (agent_url, skill_id, cached_card["version"]) entry = ledger.get(key_version) # No failure history under this card version: card trust is warranted. if entry is None or entry["failures"] == 0: return {"dispatch": True, "reason": "clean-ledger"} # Failure history exists. We need a behavioral fingerprint to decide. fingerprint = probe_hash or cached_card.get("signatures", [{}])[0].get("value") if fingerprint is None: # Unverifiable card + known failures = boundary crossed. # Do NOT dispatch on card trust; require probe or fallback. raise StaleCardBehavioralDrift( f"skill {skill_id}@{agent_url} v{cached_card['version']} has " f"{entry['failures']} failures and no behavioral fingerprint; " f"refusing card-trust dispatch, probe or fallback required" ) if entry.get("fingerprint") == fingerprint: # Same runtime that failed before: retry is not warranted. raise StaleCardBehavioralDrift( f"fingerprint {fingerprint} already failed {entry['failures']}x " f"for {skill_id}@{agent_url}; card version unchanged, runtime unchanged" ) # Fingerprint changed: runtime moved, clear stale entry, allow dispatch. ledger.pop(key_version, None) return {"dispatch": True, "reason": "fingerprint-transition", "fingerprint": fingerprint} ```