> ## Documentation Index
> Fetch the complete documentation index at: https://weights.fyi/run/llms.txt

# POST /v1/compute/plans/{plan_id}/stages/{stage_id}/packs/retry

```text
POST https://weights.fyi/run/v1/compute/plans/{plan_id}/stages/{stage_id}/packs/retry
Authorization: Bearer <token>                    scope: submit
Content-Type: application/json
```

**Available since:** 2026-10-29: included in this build; see [What is live](/run/docs/what-is-live.md) for deployment status.

**Answer time:** synchronous count check, retry commit and scheduling refresh.

Returns a stage's dead-lettered packs to pending work. Use this after addressing repeated failures. Read the current plan first and send its stage's dead-letter count; a changed count refuses the operation without changing work.

Retry resets attempt counts and preserves failure history. It can reopen a stage failed by dead-lettered packs and restore work cancelled by that failure. Completed stages can reopen only while dependent stages have not progressed too far. Cancelled stages and stages failed for other reasons cannot reopen.

## Request

| Name | Where | Required | Meaning |
|---|---|---|---|
| `Authorization` | header | yes | Bearer token with `submit`. |
| `plan_id`, `stage_id` | path | yes | Your plan and stream stage. |
| `Idempotency-Key` | header | conditional | Unique operation key, unless `operation_key` is supplied. |
| `operation_key` | JSON body | conditional | Operation key; takes precedence over the header for durable replay. |
| `expected_dead_lettered` | JSON body | yes | Positive integer matching the current stage count. |
| `reason` | JSON body | no | Explanation, at most 4,096 UTF-8 bytes after trimming. |

Send a JSON object of at most 1 MiB. Unknown fields are rejected. Reuse the same key and payload when retrying a request.

## Return value

**200 OK** with the [plan receipt](/run/docs/reference/compute-plans-get.md), `operation` details and `replayed`. Durable replay returns the current receipt without repeating the change. An HTTP replay can return the cached original response.

## Errors

| Status | Code | Meaning |
|---|---|---|
| `400` | `invalid_json`, `invalid_compute_plan`, `invalid_idempotency_key` | Invalid body, count or key. |
| `401` | `unauthorized`, `invalid_token`, `token_revoked`, `token_expired` | Supply a valid token. |
| `403` | `scope_required`, `account_suspended`, `compute_tenancy_unauthorized` | Access is unavailable. |
| `404` | `compute_plan_not_found`, `compute_stage_not_found` | Absent or inaccessible work. |
| `409` | `dead_letter_count_changed` | Refresh; includes expected and actual counts. |
| `409` | `compute_plan_conflict`, `compute_schedule_window_closed`, `compute_dependents_progressed`, `idempotency_key_in_progress` | State, schedule, dependencies or key prevent retry. |
| `413` | `body_too_large` | Body exceeds 1 MiB. |
| `422` | `idempotency_key_reused` | Header key belongs to a different request. |
| `429` | `rate_limited` | Wait for `Retry-After`. |

## Examples

```sh
curl -s https://weights.fyi/run/v1/compute/plans/PLAN_ID/stages/STAGE_ID/packs/retry \
  -H "Authorization: Bearer $WEIGHTS_API_KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: retry-packs-1" -d '{"expected_dead_lettered":1}'
```

## History

- 2026-10-29: documented count checks, recovery and replay.

## See also

- [Read a plan](/run/docs/reference/compute-plans-get.md)
- [Accept missing results](/run/docs/reference/compute-stages-packs-accept-loss.md)
- [Read events](/run/docs/reference/compute-events.md)
