The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Handle Claude Message Batch results in two layers: follow the batch’s overall processing_status, then act on each request’s result.type. Save successful messages, diagnose errors before retrying, and resubmit canceled or expired requests only when the work is still needed. Match every result to its input with custom_id—not its position in the results file.
Batch status and request result are different
The batch-level processing_status describes the overall job. Its documented values are in_progress, canceling, and ended. A batch reaches ended when all its requests have a terminal outcome. The request_counts field tallies requests as succeeded, errored, canceled, expired, or processing; those counts add up to the batch total. Anthropic’s List Message Batches API reference documents the lifecycle and counters.
Each JSONL result, by contrast, has a request-level result.type. A batch can include different request outcomes, particularly if it is canceled after some requests have completed.
Recommended Free Tools
What to do with each result type
| Result type | What happened | What to do |
|---|---|---|
succeeded |
The request completed and includes a Message response. | Store the returned message and associate it with the original request using custom_id. |
errored |
The request encountered an error; the result includes error information. | Inspect the error type and message. Fix invalid request parameters before resubmitting; consider a retry for errors such as server errors rather than retrying every failure blindly. |
canceled |
The request was canceled before it was sent to the model. | Treat it as unprocessed. Resubmit only if the work is still required. |
expired |
The request had not been sent to the model before the batch reached its expiry. | Treat it as unprocessed. Decide whether the work is still timely, then submit it again if appropriate. |
Anthropic describes the result formats and outcomes in its Message Batches documentation. For errors, use the returned details to choose between correcting the request and retrying; Anthropic’s API errors documentation also covers error types and retry guidance.
#1 Best Overall
Process results without losing or mislabeling requests
- Poll the batch. While
processing_statusisin_progress, continue checking its status. If cancellation was requested, it can pass throughcancelingbefore reachingended. - Wait for the results URL. The results URL is provided when processing ends. The API reference states that a batch expires 24 hours after creation; requests not sent before expiry become
expired. - Read the JSONL output. The results file contains one JSON object per request. For a large file, stream it rather than loading the entire file into memory, as Anthropic recommends.
- Join each result to its input by
custom_id. Do not pair records by line number or assume output order matches submission order. Anthropic warns that results are not guaranteed to appear in request order. - Apply the action for each outcome. Persist successful messages; diagnose
erroredrequests; and assess whether canceled or expired work should be submitted again. - Save results you need to keep. Downloadable results are available for 29 days after batch creation. Save outputs needed beyond that period.
These steps follow the official batch-processing guidance and batch API reference.
Cancellation can leave a mix of completed and unprocessed work
Requesting cancellation does not mean every request failed or was canceled. Requests that completed before cancellation remain completed, while other requests may be canceled. When the batch reaches its final state, handle each result on its own merits: retain successful messages, diagnose errors, and consider resubmission only for canceled work that is still necessary.
Rank #2
Keep the time limits in your workflow
- 24 hours from creation: Anthropic’s API documentation says a batch expires after 24 hours if processing has not completed. Requests not sent before expiry are counted as
expired. - 29 days from creation: Results are available for download for 29 days. The batch may still be viewable afterward, but its results are no longer downloadable.
Both limits are documented in Anthropic’s List Message Batches API reference and batch-processing documentation.
Quick Recap
Best Value
Rank #4
Rank #3
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

