# What happens when an instance re-signs a delegated A2A task after a clock-skew-induced nonce regression **Date of Record:** 2026 November 30 **Scope:** Applies to A2A (agent-to-agent) task delegation where each hop carries a signed warrant (agent identity + nonce + monotonic sequence + expiry) and the receiving agent enforces replay resistance via a nonce/sequence ledger. Does not apply to stateless request/response MCP tool calls lacking delegation warrants, nor to single-hop signed requests without a replay ledger. ## Core Distinction The distinction that matters here is between **warrant validity** (a cryptographic predicate: signature verifies, identity is trusted, expiry not passed) and **warrant freshness** (an ordering predicate: the nonce/sequence is strictly greater than every nonce this verifier has previously accepted from this issuer). These are enforced by two independent subsystems—the signature verifier and the replay ledger—and they degrade independently. Most A2A failure analyses conflate them because in a well-behaved system they fail together. The boundary condition is the narrow band where validity holds but freshness is *ambiguous*, and the delegating agent's retry logic resolves that ambiguity by re-signing. The specific mechanism: an agent that observes a `NONCE_REGRESSION` or `EXPIRED` rejection from a downstream peer, and whose local clock has drifted backward relative to the peer's ledger floor, will regenerate a *new* warrant for the *same task* with a *fresh* nonce and a *new* expiry. This is legal under the signing contract and illegal under the replay contract. The result is two distinct, individually valid warrants for one logical task, both accepted by different verifiers in the swarm—breaking non-repudiation because the task now has two authentic provenance records that disagree on origin time, and breaking exactly-once execution because the second warrant's nonce is fresh to the second verifier. ## What Was Observed A three-hop delegation chain: coordinator `C` → worker `W` → auditor `A`. Each hop mints a warrant signed by the sender's key, embedding `{task_id, issuer, subject, seq, nonce, issued_at, expires_at, parent_warrant_hash}`. `A` maintains a per-issuer ledger of the highest accepted `seq` and a Bloom-filtered set of seen nonces. 1. `C` mints warrant `w1` for `task_id=T` at `issued_at=12:00:00.000`, `seq=1001`, `nonce=n1`, `expires_at=12:05:00`. Sends to `W`. 2. `W` accepts `w1`, re-delegates to `A` by minting `w2` with `parent_warrant_hash=H(w1)`, `seq=2001`, `nonce=n2`, `issued_at=12:00:00.900`. 3. `A`'s ledger floor for issuer `W` is `seq=2001` from a *prior* task `T'` that `W` completed earlier at wall-clock `12:00:01` (per `A`'s clock). `A`'s clock is ~1.4s ahead of `W`'s. `A` sees `w2.seq == 2001 == floor`, classifies as `NONCE_REGRESSION`, and returns a signed rejection `R(w2)`. 4. `W`'s retry handler treats `NONCE_REGRESSION` as a transient ordering fault, **not** as a terminal provenance conflict. It re-signs: mints `w2'` for the same `T` with `seq=2002`, `nonce=n2'`, `issued_at=12:00:02.100`, `parent_warrant_hash=H(w1)`. Sends to `A`. 5. `A` accepts `w2'`. Task `T` executes on `A`. 6. Meanwhile `W`'s *first* attempt had also fanned out to a redundant auditor `A2` whose clock matched `W`'s. `A2` had accepted `w2` in step 3's window and executed `T` under `w2`. Now `T` has two accepted warrants (`w2` at `A2`, `w2'` at `A`) with different nonces, different `issued_at`, identical `parent_warrant_hash`, and identical `task_id`. Both are cryptographically valid. The provenance graph for `T` is no longer a DAG with a single root—it is two roots sharing a parent hash. Non-repudiation is defeated not by forgery but by *legitimate re-signing under a freshness ambiguity*. The observable symptom downstream: a verification replay that reconstructs `T`'s history from the two auditors produces two divergent execution records whose `parent_warrant_hash` collides but whose `(nonce, issued_at, seq)` tuples differ. A naive replay verifier that de-duplicates on `parent_warrant_hash` will silently drop one record and report a consistent history; a strict verifier that de-duplicates on `(task_id, parent_warrant_hash)` will raise a fork. Neither is correct, because the fork is real and legitimate at the signing layer. ## Condition of Validity The failure requires all of the following to hold simultaneously: 1. **Clock skew exceeds the freshness window's slack.** The verifier's `seq`/nonce floor is derived from a prior accepted message whose `issued_at` (per verifier clock) post-dates the new message's `issued_at` (per issuer clock) by more than the ledger's allowed reorder tolerance. Without skew, `seq` is monotonic and the floor check is sound. 2. **The rejection is classified as retriable.** The delegating agent's error taxonomy maps `NONCE_REGRESSION` (and `EXPIRED` near the boundary) to the same retry class as `TIMEOUT` or `TRANSIENT_5XX`. If it were classified terminal, the agent would escalate instead of re-signing. 3. **The retry mints a new warrant rather than replaying the old one.** A retry that re-sends the *byte-identical* `w2` is safe: the verifier's nonce set rejects it idempotently, and the delegator learns the task is genuinely stuck. A retry that re-signs with a fresh nonce is the poison. 4. **Fan-out to ≥2 verifiers with non-identical ledgers.** If `A` and `A2` share a ledger (or `A2` doesn't exist), the second acceptance cannot occur. The fork requires at least two verifiers whose floors diverged during the skew window. The invariant that must hold to prevent this: **for a given `(issuer, task_id, parent_warrant_hash)`, at most one warrant may ever be accepted across the entire verifier set, and that uniqueness must be enforced by a predicate the issuer cannot unilaterally regenerate.** Nonce freshness is *not* such a predicate, because the issuer controls the nonce. The predicate must be a function of the *task identity*, not the *message identity*—e.g., a task-scoped commitment hash derived from the task payload and the root warrant, which the issuer cannot change without changing the task. ## Decision Boundary The decision boundary is the point where the delegating agent must choose between **re-signing** (mint fresh warrant, same task) and **escalating** (halt, surface conflict). The correct rule: - Re-sign **iff** the rejection class is `TRANSPORT_FAILURE` or `VERIFIER_UNAVAILABLE`—i.e., the verifier never observed the prior warrant. In this case no acceptance exists, so a fresh warrant cannot fork. - Re-sign **iff** the rejection class is `DUPLICATE_NONCE` and the verifier's signed rejection includes the `accepted_warrant_hash` matching the delegator's prior send—i.e., the verifier *did* accept, and the retry is a pure idempotency probe. In this case re-send the byte-identical warrant; do not re-sign. - **Escalate, never re-sign**, on `NONCE_REGRESSION`, `SEQ_REGRESSION`, or `EXPIRED_AT_VERIFIER`, because these indicate the verifier's ledger floor is at or above the delegator's intended sequence—meaning some prior acceptance exists that the delegator cannot see. Re-signing here is the fork trigger. The boundary is sharp: the delegator must never mint a warrant whose `(task_id, parent_warrant_hash)` tuple it has previously sent to *any* verifier, unless it has received a signed `REJECTED_NO_ACCEPTANCE` for that tuple from *every* verifier it sent to. Absent that quorum of non-acceptance, re-signing is unsafe. ## Operational Effect The operational consequence is that **non-repudiation in A2A is a property of the task-identity commitment, not of the message signature.** A system that enforces only per-message signature validity and per-issuer nonce freshness will, under clock skew plus retry, produce two authentic and mutually inconsistent provenance records for one task. Detection requires a replay verifier that keys on `(task_id, parent_warrant_hash)` and treats multi-acceptance as a *fork alarm*, not a de-duplication opportunity—and the delegator must be instrumented to emit `WARRANT_MINTED` events keyed on that tuple so the fork is attributable. The guardrail is a **task-scoped commitment**: the root warrant includes `H(task_payload || root_nonce)`, every child warrant carries it forward immutably, and every verifier rejects any warrant whose commitment it has already accepted for that `task_id`—regardless of nonce, seq, or signature. This converts the freshness ambiguity into a hard, issuer-uncontrollable uniqueness constraint, closing the re-signing path without requiring synchronized clocks. ```python from __future__ import annotations import hashlib from dataclasses import dataclass from typing import Dict, Set, Tuple class WarrantForkError(RuntimeError): """Raised when a task-scoped commitment is accepted under two distinct warrants.""" class DelegationRefused(RuntimeError): """Raised when a delegator attempts an unsafe re-sign after a freshness rejection.""" @dataclass(frozen=True) class Warrant: task_id: str issuer: str seq: int nonce: str issued_at: float expires_at: float parent_warrant_hash: str task_commitment: str # H(task_payload || root_nonce); immutable across hops class ReplayLedger: """Per-issuer freshness ledger plus task-scoped commitment uniqueness.""" def __init__(self) -> None: self._seq_floor: Dict[str, int] = {} self._seen_nonces: Set[Tuple[str, str]] = set() self._commitments: Dict[str, Tuple[str, Warrant]] = {} # task_id -> (warrant_hash, warrant) @staticmethod def _hash(w: Warrant) -> str: blob = f"{w.task_id}|{w.issuer}|{w.seq}|{w.nonce}|{w.task_commitment}".encode() return hashlib.sha256(blob).hexdigest() def accept(self, w: Warrant, now: float) -> str: if now > w.expires_at: raise DelegationRefused(f"warrant expired at verifier: {w.expires_at} < {now}") # Freshness predicate (issuer-controlled; can regress under clock skew). floor = self._seq_floor.get(w.issuer, -1) if w.seq <= floor: raise DelegationRefused( f"NONCE_REGRESSION: seq {w.seq} <= floor {floor} for issuer {w.issuer}" ) if (w.issuer, w.nonce) in self._seen_nonces: raise DelegationRefused(f"DUPLICATE_NONCE: {w.nonce} from {w.issuer}") # Uniqueness predicate (issuer-uncontrollable; the actual guardrail). prior = self._commitments.get(w.task_id) if prior is not None: prior_hash, prior_w = prior this_hash = self._hash(w) if prior_hash != this_hash: raise WarrantForkError( f"task {w.task_id} already committed under {prior_hash[:12]} " f"(nonce={prior_w.nonce}, issued_at={prior_w.issued_at}); " f"refusing second acceptance under {this_hash[:12]} " f"(nonce={w.nonce}, issued_at={w.issued_at})" ) return prior_hash # idempotent replay of the identical warrant self._seq_floor[w.issuer] = max(floor, w.seq) self._seen_nonces.add((w.issuer, w.nonce)) h = self._hash(w) self._commitments[w.task_id] = (h, w) return h class Delegator: """Mints and retries warrants; enforces the no-re-sign-without-quorum rule.""" def __init__(self, issuer: str, ledger: ReplayLedger) -> None: self.issuer = issuer self.ledger = ledger self._sent: Dict[Tuple[str, str], Set[str]] = {} # (task_id, parent_hash) -> verifiers sent to self._nonaccept: Dict[Tuple[str, str], Set[str]] = {} # verifiers that returned REJECTED_NO_ACCEPTANCE def mint(self, task_id: str, parent_hash: str, commitment: str, seq: int, now: float) -> Warrant: key = (task_id, parent_hash) sent = self._sent.get(key, set()) cleared = self._nonaccept.get(key, set()) # The invariant: never mint a *fresh* warrant for a tuple unless every # verifier previously sent to has signed a REJECTED_NO_ACCEPTANCE. if sent and not sent.issubset(cleared): raise DelegationRefused( f"unsafe re-sign for task {task_id}: verifiers {sent - cleared} " f"have not confirmed no-acceptance; escalate instead of re-signing" ) w = Warrant( task_id=task_id, issuer=self.issuer, seq=seq, nonce=f"n-{seq}-{now:.6f}", issued_at=now, expires_at=now + 300.0, parent_warrant_hash=parent_hash, task_commitment=commitment, ) self._sent.setdefault(key, set()).add("verifier") # placeholder for fan-out return w def handle_rejection( delegator: Delegator, rejection_class: str, task_id: str, parent_hash: str, verifier: str, accepted_warrant_hash: str | None, prior_warrant_hash: str | None, ) -> str: key = (task_id, parent_hash) if rejection_class == "DUPLICATE_NONCE" and accepted_warrant_hash == prior_warrant_hash: return "RESEND_IDENTICAL" # idempotency probe; safe if rejection_class in {"TRANSPORT_FAILURE", "VERIFIER_UNAVAILABLE"}: delegator._nonaccept.setdefault(key, set()).add(verifier) return "RESIGN_ALLOWED" if rejection_class in {"NONCE_REGRESSION", "SEQ_REGRESSION", "EXPIRED_AT_VERIFIER"}: # Freshness ambiguity: a prior acceptance may exist invisibly. Escalate. raise DelegationRefused( f"{rejection_class} on {task_id} from {verifier}: freshness ambiguity; " f"re-signing would fork the task-scoped commitment" ) raise DelegationRefused(f"unclassified rejection {rejection_class}; refusing to guess") ```