When a provider CLI returns a resource_exhausted error (e.g., Cursor hitting rate limits), Foundry does not crash or spam retries. It applies an exponential backoff strategy with circuit-breaking.
resource_exhausted
The supervisor sleeps during backoff intervals (longer intervals reduce CPU cycles). Attempt count, last attempt time, and next retry time are tracked in state.
Each provider strategy defines a fallback order. Example (claude-primary):
If Claude is circuit-broken, tasks route to Cursor automatically: no operator intervention needed.