★ GenAI Summit™ Asia|12–13 Dec, Kuala Lumpur|For AI Agency® students|See details →|★ GenAI Summit™ Asia|12–13 Dec, Kuala Lumpur|For AI Agency® students|See details →|★ GenAI Summit™ Asia|12–13 Dec, Kuala Lumpur|For AI Agency® students|See details →|★ GenAI Summit™ Asia|12–13 Dec, Kuala Lumpur|For AI Agency® students|See details →|
Dispatch pegs show one tag under A, an empty peg under B and overlapping tags under C.
AI How-ToDecember 3, 20264 min read

How to retry a Claude batch without processing the same lead twice

Reconcile a five-enquiry Claude batch at the morning handover. Use three local test exports to see which IDs to validate, retry, or hold.

GenAI Editorial

The first thing you need when you retry a Claude batch is a list of which enquiries already succeeded. At 7 a.m., a client is waiting for a lead report. You submitted five enquiries to Claude overnight. The batch has ended and five result lines have arrived. How many leads are ready to hand over?

In our local test, 2 of 5 came back successful and could move on to label validation. Sending all five enquiries again would repeat two successful jobs and leave the cause of a third failure untouched.

Which list do you use to retry a Claude batch?

Give each enquiry a unique custom_id before submission. Save that list alongside the batch ID. When the results come back, match them to the list by ID. Anthropic allows results to arrive in a different order and reports a separate outcome for each request. A completed batch can contain successful, errored, canceled and expired requests. Anthropic’s batch processing guide

We tested three synthetic exports locally and reproduced the saved outputs as of December 3, 2026. In the first, all five requests succeeded and the results arrived in reverse order. Joining by ID recovered 5 of 5. Joining the first result to the first enquiry would have given A the label for E. Five rows in and five rows out looked reassuring either way.

Which two enquiries can move forward?

The results came back in the order D, C, A, E, B. Here is the handover sheet in the order the enquiries were submitted:

- lead-A · succeeded. Validate the returned label against the allowed values and deliver it once.

- lead-B · canceled. Check why the job was canceled and whether the client still wants it.

- lead-C · succeeded. Validate the label and deliver it once.

- lead-D · errored. Read the error. If the input is invalid, correct it before resubmitting. The synthetic export contains no error detail, so it cannot tell you which fix D needs.

- lead-E · expired. Check whether the result would still be useful. If it would, queue that enquiry in a new batch and associate the new attempt with the original lead.

A and C can move forward independently of the other three. Record which IDs the client has already received. Otherwise a later retry can produce a duplicate row in the client’s report even if the retry itself is correct. This matters when a lead label triggers someone to call a customer.

What if the export itself is wrong?

For the third run we removed B, duplicated C and added an unexpected X. Our check reported all three discrepancies. A dictionary that simply keeps the last result for each ID hides the duplicate. A row count hides which customer is missing. Count IDs first, compare the returned and submitted sets, then inspect each status.

You can repeat the difficult case on paper. Write A, B, C, D, E in the first column. Tally the returned IDs D, C, A, E, C, X in the second column. You now have one A, zero Bs, two Cs, one D and one E. X belongs on an exceptions list. This time only A has exactly one success against an expected ID. C appeared twice; comparing its two payloads and checking the delivery record comes before releasing it.

Use this three-step checklist before acting on the status column.

1. Compare the expected and returned IDs. An unexpected ID stays out of the client report until you establish which job it belongs to.

2. Count the occurrences of each expected ID. A missing line in a downloaded export calls for checking the original result file. Sending another paid request is a separate decision.

3. For each unique match, read its status and validate any successful output. The test used status-only fixtures. A live reporting job must also check that the label is usable for the intended lead.

What if the batch is still running at handover?

If the batch is still processing at the client’s cutoff, “missing” has a different meaning. That result may arrive later. Anthropic makes the result stream available after the batch ends. Check the batch status before treating an unfinished job as lost. Message Batch results reference Keep the unfinished ID on a pending list and decide whether someone will wait or use a fallback. Before delivering the fallback result, check the handover sheet again. A retry should recover missing work without making the client sort it out.

A practical handover sheet needs room for two identities. Save the batch ID and custom ID for each attempt, and keep a stable business key for the enquiry and reporting period. On a retry the batch ID changes, but the client still expects one row for that enquiry. A unique custom ID inside one batch is a way to match the response; it does not by itself prevent two attempts from sending two updates to the CRM.

If two workers can deliver at once, use a destination that enforces uniqueness or supports an idempotent update on that business key. When you lose the acknowledgement after a delivery, first check the destination for the existing row. If you cannot determine what happened, leave that row for a person to reconcile. Guessing it failed can trigger a second sales call.

Our test exercised local reconciliation logic. It did not measure live API latency. For the separate decision of whether a nightly job belongs in a batch at all, see the GenAI batch pricing comparison.

Sources

  1. Claude Message Batches guide
  2. Claude batch pricing and the morning cutoff

More where this came from

Keep reading.

See all posts →