## TL;DR

The agent fetched reports as fast as it could, hit Expensify's API rate limit, and stalled without recovering. Add exponential backoff on 429 responses, pace requests under the documented limit, and checkpoint progress so a stall resumes instead of restarting. Rate limits are a contract; the agent must read the contract.

## Error

```text
rate limit on the expensify api  -  agent's report fetch stalled mid-audit
```

## Steps

1. Confirm the stall cause in the agent log: HTTP 429 responses from the Expensify API with no retry. Expected: the log shows 429s at the stall point.
2. Add retry with exponential backoff and jitter on 429 and 5xx responses, honoring any Retry-After header. Expected: the agent backs off instead of hammering.
3. Pace the fetch loop under the API's published rate limit (batch requests, add delays between pages). Expected: sustained fetching stays under the limit.
4. Checkpoint the fetch progress (last report ID or page token) so an interrupted run resumes. Expected: restarts continue from the checkpoint.
5. Re-run the audit and monitor the request rate. Expected: the fetch completes without 429 stalls.

## When to use

- An agent's Expensify fetch stalls on rate limits mid-audit.
- The log shows 429s with no backoff.
- Scaling an audit agent to larger report volumes.

## When not to use

- The API rejects with 401 or 403 (an auth problem).
- The stall is a network timeout, not a rate limit.
- The volume is small and the limit is never approached.

## Tool compatibility

Expensify API (current 2026 releases) with custom audit agents in any language.

### Variant phrasings

### expensify api 429 during a bulk fetch

Back off, pace, and resume. The limit is per key and documented.

### agent hammered the api and got throttled

Add delays between requests and batch where the API allows.

### fetch died halfway with no resume

Checkpoint the page token so the next run continues.

## Why it happens

Expensify rate-limits API consumers to protect shared infrastructure, and agents that loop pages without pacing hit the ceiling fast. A 429 without backoff is a deadlock: the agent either spins (burning quota) or dies (losing progress). Backoff plus pacing keeps the agent under the ceiling, and checkpointing makes any residual interruption resumable.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_hm4teJHlhwFizCTK2jKRFQ
