> ## Documentation Index
> Fetch the complete documentation index at: https://octolens.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Retries and timeouts

> Every request runs under a per-operation deadline (default 30s; a few long operations carry raised defaults, and the global --timeout overrides them all uniformly).

Every request runs under a per-operation deadline (default 30s; a few long operations carry raised defaults, and the global `--timeout` overrides them all uniformly). When it expires the request is aborted and the run exits 1 with a `REQUEST_TIMEOUT` (504) envelope, which is retryable. 429s are retried inside that budget honouring `Retry-After`, with exponential backoff capped at 30000ms; a wait that exceeds the cap or the remaining budget surfaces `RATE_LIMITED` (exit 7) instead of sleeping past the deadline.

Raising the budget for a long-running call — `mentions export` already gets a raised 120s default because its duration scales with the exported data, and `--timeout` raises it further:

```sh theme={null}
octolens mentions export --timeout 480 --json   # 120s default for this operation, 480s for this run
```

And what fail-fast looks like — a 429 whose stated wait cannot fit (beyond the 30000ms cap or the remaining budget) is not slept on:

```json theme={null}
{ "error": { "code": "RATE_LIMITED", "message": "Rate limit exceeded", "status": 429, "retryAfterSeconds": 120 } }
```

The run exits 7 immediately with the stated wait still in the envelope, so the caller schedules the retry itself.
