diff --git a/src/agents/pi-embedded-helpers/errors.ts b/src/agents/pi-embedded-helpers/errors.ts index 849c4293e..5d9769c96 100644 --- a/src/agents/pi-embedded-helpers/errors.ts +++ b/src/agents/pi-embedded-helpers/errors.ts @@ -504,6 +504,8 @@ export function classifyFailoverReason(raw: string): FailoverReason | null { if (isCloudCodeAssistFormatError(raw)) return "format"; if (isBillingErrorMessage(raw)) return "billing"; if (isTimeoutErrorMessage(raw)) return "timeout"; + // Check for specific auth profile unavailability/cooldown patterns to allow fallback + if (/no available auth profile.*all in cooldown/i.test(raw)) return "rate_limit"; if (isAuthErrorMessage(raw)) return "auth"; return null; }