Claude Message Batches Results Download Failed — Signed URL, Streaming, or Retention Issue
You tried to download batch results and got either a 403 (expired signed URL), a truncated JSONL stream, or a 404 (retention window elapsed). Batch results are ephemeral: retained ~29 days after batch ends, delivered via short-lived signed URLs. This page covers the streaming pattern that survives large payloads and how to handle all three failure modes.
Use the SDK's batches.results() iterator — it handles signed URL refresh, streaming JSONL parsing, and network hiccups automatically. Don't manually fetch results_url; the signed URLs expire in ~15 minutes and refetching requires a new retrieve call. Archive results to your own storage the moment the batch ends — the 29-day window is not a promise.
The Error Messages You're Seeing
# 1. Signed URL expired (fetched raw URL after >15 min): HTTP/1.1 403 Forbidden# 2. Streaming JSONL disconnected mid-download: requests.exceptions.ChunkedEncodingError: ( 'Connection broken: IncompleteRead(23841234 bytes read)', IncompleteRead(23841234 bytes read)) # 3. Results retention window ended (>29 days after batch): HTTP/1.1 404 Not Found { "type": "error", "error": { "type": "not_found_error", "message": "Batch results for msgbatch_01ABC are no longer available. Results are retained for 29 days after batch completion." } } # 4. Malformed JSONL line (rare, but possible on truncation): json.JSONDecodeError: Unterminated string starting at: line 5482 column 1 AccessDeniedRequest has expired
Results URL Lifecycle
| Event | Timing | Impact |
|---|---|---|
| Batch ends | <= 24h from create | results_url now available in retrieve() response |
| Signed URL issued | On each retrieve() call | Fresh URL, valid ~15 minutes |
| URL expires | ~15 minutes after retrieve | Refetch via retrieve() to get new URL |
| Retention window | 29 days after ended_at | Any retrieve() still returns fresh URLs |
| Retention expires | 29 days + 1 | results_url returns 404; results gone forever |
What Actually Causes This Error
Fixes That Work (Tested Nov 2026)
1Use the SDK's Streaming Iterator
2Retry with Fresh Signed URL on Manual Fetches
3Auto-Archive Immediately on Batch End
Preventing This Error Going Forward
- Always use the SDK iterator, not raw URLs. SDK handles URL refresh and JSONL parsing correctly.
- Archive results within hours of batch end. Never rely on the full 29-day retention.
- Store archives in your own S3/GCS/Azure. Independent of Anthropic retention.
- Monitor active batches with periodic polling. Cron every 5 min catches ended batches fast.
- Check disk space before large downloads. Big batches produce multi-GB JSONL.
- Bypass corporate proxies for downloads if possible. Reduces mid-stream failures.
- Use exponential backoff on stream errors. Network flakiness is common on large files.
Researcher · AI Error Hub
Frequently Asked Questions
Approximately 15 minutes from when you call batches.retrieve(). If your download takes longer or you try to reuse the URL, you'll get 403. Call retrieve again to get a fresh URL — this always works within the 29-day retention window.
The signed URL returns a single JSONL stream; there's no built-in range/chunk support. For large batches, the download itself is fast (typically 100+ MB/s from Anthropic's CDN) — parallelization gains little. Instead, ensure your local write path is fast.
The SDK validates each JSONL line as it streams. If a specific line fails to parse, the SDK logs it and continues. If the whole stream is corrupted (very rare), call retrieve() to get a fresh URL and retry — the underlying data is stored durably server-side.
Each result has a result.type field: succeeded, errored, canceled, or expired. Aggregate by type after download. Expired requests can be resubmitted; errored ones usually indicate a per-request issue (invalid input, etc.).
No. Batch input/output tokens are billed at 50% of standard rates when the batch completes. Downloading results is free — no per-byte or per-request egress fee. Feel free to download and re-download within the 29-day window.
Related Errors
Master Claude Batch Pipelines
Weekly: batch cost optimization, retry patterns, cross-region archiving. 12,000+ subscribers.
Subscribe Free →