# Where must an instance reject a signed Agent Card whose capability manifest was re-signed under a rotated key mid-delegation **Date of Record:** 2026 November 29 **Scope:** Applies to A2A v1.0 task delegation where a caller agent discovers a remote Agent Card via signed capability manifest, negotiates a delegated task lifecycle, and the remote rotates its signing key between discovery and a subsequent lifecycle transition (accept, progress, or completion). Does not apply to stateless one-shot RPC calls that never re-validate the card after the initial handshake, nor to purely local MCP tool invocations with no cross-instance signing trust. ## Core Distinction The failure is not "the signature is invalid." Naive validators catch that. The failure is that the *new* signature is valid — under a *new* key — while the *delegated task state* the caller holds was minted against the *old* key's manifest. A2A v1.0 binds the task lifecycle to the manifest's declared `capabilities` and `warrant` fields, but the spec does not require the key identity that signed the manifest to be pinned into the task's continuation token. So a remote that rotates keys and re-signs its card produces two individually-valid artifacts — an old task token and a new card — whose *composition* is invalid. The caller must treat key-identity continuity as a first-class invariant of the delegation, not merely of the card. This is distinct from a forged card (signature fails) and from a stale card (TTL expires). Here both signatures verify, both TTLs are live, and the negotiation still must abort. ## What Was Observed A caller agent (`planner-7`) discovered `worker-3` via `/.well-known/agent.json`, receiving a card signed by key `K1` with manifest `M1` declaring `capabilities: [summarize, extract]` and `warrant: {scope: "read-only", ttl: 3600}`. It opened a delegated task `T-441` with a continuation token embedding `manifest_hash = H(M1)` and `signer_kid = K1`. Mid-task, `worker-3` performed a planned key rotation: `K1 → K2`. It re-signed its card under `K2` with manifest `M2`, which *widened* `warrant.scope` to `"read-write"` (a routine ops change) and reordered `capabilities`. The card's own signature verified cleanly against `K2`, and `K2` chained to the same root trust anchor. On the next lifecycle transition, `worker-3` sent a `task.completed` event signed by `K2`, carrying `manifest_hash = H(M2)`. The caller's validator: 1. Verified the event signature against `K2` → **pass** (K2 chains to root). 2. Compared `H(M2)` to the token's `manifest_hash = H(M1)` → **mismatch**, but the handler treated manifest-hash mismatch as a *soft* warning (an artifact of an over-lenient earlier patch that assumed hash drift meant a benign card re-publish). 3. Accepted completion, then applied the `read-write` warrant from `M2` to a follow-up task the caller auto-scheduled — **privilege widening across a delegation boundary**, granted by the remote, consumed by the caller, with no human in the loop. The dangerous transition is step 3: the caller imported an authority (`read-write`) that the *original* delegation contract (`M1`, `read-only`) never authorized, because it trusted the *new* card's self-assertion over the *bound* manifest in its own token. ## Condition of Validity The invariant that bounds this: **a delegated task's authority is frozen at the manifest hash embedded in its continuation token; any lifecycle event whose `manifest_hash` differs from the token's is a renegotiation, not a continuation, and must be rejected unless the caller explicitly re-runs discovery and re-consents.** This is valid only when the continuation token is *cryptographically bound* to the signer identity, not just the manifest content. Concretely, the token must carry `(signer_kid, manifest_hash)` and the validator must require *both* to match on every lifecycle event. Key rotation is permitted to change `signer_kid` only across a *new* discovery handshake with an explicit `renegotiate` acknowledgment; it may never silently change mid-task. If the token binds only `manifest_hash`, a rotation that preserves manifest bytes but changes the key escapes detection; if it binds only `signer_kid`, a same-key manifest mutation escapes. Both fields are load-bearing. The condition fails (and the guardrail is inapplicable) when the caller is stateless and holds no continuation token — there is nothing to freeze, and each call is a fresh consent. ## Decision Boundary The decision point is the lifecycle-event validator, at the moment it compares the incoming event's `(signer_kid, manifest_hash)` against the token's. The boundary is *not* "does the signature verify" (necessary but insufficient) but "does the verified signer-and-manifest pair equal the one the delegation was opened under." - If `signer_kid` matches and `manifest_hash` matches → **continue**. - If `signer_kid` matches but `manifest_hash` differs → **halt**: manifest mutated under a stable key; treat as tampering or unconsented renegotiation. - If `signer_kid` differs but `manifest_hash` matches → **halt**: key rotated mid-task; the binding is broken even though content is identical, because warrant scope can be re-derived under the new key later. - If both differ → **halt**: full renegotiation required; re-run discovery, diff `M1` vs `M2` warrants, and require explicit caller consent for any scope widening before proceeding. Only the first case may auto-proceed. The other three must raise, and the caller must not import the new manifest's warrant into any scheduled follow-up. ## Operational Effect With the invariant enforced, the mid-task rotation of `worker-3` produces a hard halt on `T-441`: the caller refuses `task.completed`, marks the task `INDETERMINATE`, and surfaces a renegotiation request with a warrant diff (`read-only → read-write`) for explicit approval. Without it, the caller silently inherits widened authority and the audit trail shows a *valid* signature chain end-to-end — the most dangerous class of failure, because every individual artifact passes verification and only the *composition* is wrong. The cost of the guardrail is a forced re-discovery round-trip on rotation; the cost of omitting it is unconsented privilege escalation that no signature check will ever flag. ```python import hashlib from dataclasses import dataclass class DelegationBindingError(RuntimeError): """Raised when a lifecycle event's signer/manifest pair diverges from the pair frozen in the task's continuation token.""" @dataclass(frozen=True) class ContinuationToken: task_id: str signer_kid: str manifest_hash: str @dataclass(frozen=True) class LifecycleEvent: task_id: str signer_kid: str manifest_hash: str signature_valid: bool def validate_lifecycle_event(token: ContinuationToken, event: LifecycleEvent) -> None: if event.task_id != token.task_id: raise DelegationBindingError( f"task id mismatch: token={token.task_id} event={event.task_id}" ) if not event.signature_valid: raise DelegationBindingError("event signature failed verification") signer_ok = event.signer_kid == token.signer_kid manifest_ok = event.manifest_hash == token.manifest_hash if signer_ok and manifest_ok: return # continuation is bound; proceed if signer_ok and not manifest_ok: raise DelegationBindingError( "manifest mutated under stable key; treat as tampering or " "unconsented renegotiation" ) if manifest_ok and not signer_ok: raise DelegationBindingError( f"signer rotated mid-task: token={token.signer_kid} " f"event={event.signer_kid}; binding broken even though manifest bytes match" ) raise DelegationBindingError( "full renegotiation required: re-run discovery, diff warrants, " "require explicit caller consent before importing new authority" ) def manifest_hash(capabilities: list[str], warrant_scope: str) -> str: payload = "|".join(sorted(capabilities)) + "::" + warrant_scope return hashlib.sha256(payload.encode()).hexdigest() if __name__ == "__main__": m1 = manifest_hash(["summarize", "extract"], "read-only") m2 = manifest_hash(["extract", "summarize"], "read-write") token = ContinuationToken("T-441", "K1", m1) # worker-3 rotated K1->K2 and widened warrant; event verifies under K2 rotated = LifecycleEvent("T-441", "K2", m2, signature_valid=True) validate_lifecycle_event(token, rotated) # raises ```