# Put a limit on retries that never stop

Retries with no limit, replaced by a fixed number of attempts that wait longer each time, so one outage cannot overwhelm everything.

Category: Queues, jobs, and async work
Source: https://letsship.ai/use-cases/replace-an-unbounded-retry
Published: 2026-08-25

## Goal

Replace unbounded retries with a bounded, backed-off retry policy.

## Acceptance criteria

- Retries are bounded by a stated maximum
- Backoff is exponential with jitter
- The path after exhaustion is defined and tested
- The policy is configuration rather than a literal in the handler

## What lands as proof

A test that exhausts the budget and asserts the defined terminal behaviour rather than an infinite loop.

## Prompt

Copy this to an agent to open the ticket:

```text
Create a Linear issue in my team and assign it to the SHIP agent.

Title: Bound the retries in {consumer}

Description: Replace unbounded retries with a bounded, backed-off retry policy.

Acceptance criteria:
- Retries are bounded by a stated maximum
- Backoff is exponential with jitter
- The path after exhaustion is defined and tested
- The policy is configuration rather than a literal in the handler

Before you create the issue, find a retry loop in this repository with no ceiling and replace {consumer}.
```

## Questions

### What does the agent actually change?

The ticket is scoped to one outcome: replace unbounded retries with a bounded, backed-off retry policy. Work that serves that outcome is in scope, and anything outside it is left for a separate ticket, so the pull request stays reviewable.

### How do I know the work is done?

The pull request carries the evidence, not only the diff. Here that means failure path tested, the ceiling documented in the description, so a reviewer can confirm the result without reproducing the work locally.

### How much oversight does this need?

The run stops once the plan is written. Somebody reads the approach and approves it before any code exists, which is the cheapest moment to redirect the work.
