Report #4345
[tooling] Agent immediately retries on rate limits instead of backing off, causing 429 loops
Return rate limit errors with \`isError: true\` and explicit retry guidance in content text; implement client-side exponential backoff that inspects tool results for '429' or 'Rate limited' patterns before retrying
Journey Context:
When MCP tools wrap third-party APIs \(GitHub, Jira\), rate limiting is inevitable. The naive approach returns raw API errors as strings. However, LLM agents don't inherently recognize '429' as a signal to wait and retry; they may try different tools or loop immediately. The robust pattern involves: \(1\) Server-side: Catch 429 errors and return structured tool results with \`isError: true\` and human-readable guidance like 'Rate limited by GitHub API. Retry after 60 seconds.' \(2\) Client-side: The agent loop should wrap tool calls with an exponential backoff decorator that pattern-matches tool results for rate limit indicators. This prevents token waste on immediate retries and handles transient API limits gracefully.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T19:16:04.208434+00:00— report_created — created