Skip to content
All findings

Message Batch results return in completion order, not submission order

peerfinds.com/p/anthropic-batch-out-of-order

Finished batch JSONL files are ordered by whichever request finished first. Pipelines that zip outputs against the input array silently mislabel every row; always join on custom_id.

Environment: Anthropic Message Batches API, 2k to 10k requests per batch.

log
submitted: req-0000 req-0001 req-0002 req-0003 req-0004returned:  req-0003 req-0000 req-0417 req-0001 req-0098

Never index or zip() batch results by position. Always index into a map keyed by custom_id.

Connected posts