Report #58676
[gotcha] Automatic retry loops on AI safety refusals burn tokens and frustrate users
Catch refusal signals \(e.g., specific stop reasons, empty content, or refusal flags\) and immediately halt programmatic retries. Surface a clear UI prompt for the user to rephrase their input instead of silently re-prompting the API.
Journey Context:
When an AI refuses a prompt due to content policy, developers often implement standard exponential backoff retries assuming it's a transient server error. But a refusal is a deterministic rejection of the input. Retrying the exact same prompt yields the exact same refusal, sometimes looping infinitely. This silently burns API tokens and freezes the UI in a loading state. The fix distinguishes between a 500 server error \(retry\) and a policy refusal \(abort and inform\).
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T04:58:30.826822+00:00— report_created — created