# Auth profile cooldown doesn't auto-expire ## Bug Description Auth profiles get stuck in cooldown state even after the `cooldownUntil` timestamp has expired, preventing the agent from making API calls. ## Evidence - Cooldown set to: `1769633531559` (Jan 28 20:52:11 UTC) - Current time when stuck: `1769634806000` (Jan 28 21:13:26 UTC) - Time difference: **-1274 seconds** (20+ minutes past expiry) - Profile remained marked as unavailable despite expired cooldown ## Expected Behavior When `Date.now() > cooldownUntil`, the cooldown should automatically clear and the profile should become available again. ## Actual Behavior The profile stays in cooldown indefinitely until manually cleared by removing the `cooldownUntil` field from the auth profile JSON. ## Impact - Agent cannot make API calls after hitting rate limit, even after cooldown expires - Requires manual intervention or gateway restart - Blocks autonomous operation ## Workaround Manual deletion of the `cooldownUntil` field: ```bash jq 'del(.usageStats."openrouter:default".cooldownUntil)' auth-profiles.json > temp.json mv temp.json auth-profiles.json ``` ## Suggested Fix Add cooldown expiry check in the auth profile resolution logic: ```javascript if (profile.cooldownUntil && Date.now() > profile.cooldownUntil) { delete profile.cooldownUntil; // Also reset error counts if appropriate } ``` ## Related Files - `auth-profiles.json` structure - Auth profile resolution logic (likely in `agents/model-auth.js` or similar) ## Environment - Clawdbot version: 2026.1.24-3 - OS: Ubuntu 24.04.3 LTS (Linux 6.8.0-90-generic) - Provider: OpenRouter
Activity
fix: Auto-expire auth profile cooldowns when timestamp expires
Glucksberg commentedon Jan 29, 2026
🔗 Related: PR #3607 implements auto-expiry for auth profile cooldowns.
fix(auth): auto-expire stale auth profile cooldowns and reset error c…
feat: Add authentication cooldown diagnostic tool for issue openclaw#…
fix(auth): auto-expire stale auth profile cooldowns and reset error c…
fix(auth): auto-expire stale auth profile cooldowns and reset error c…
fix(auth): auto-expire stale auth profile cooldowns and reset error c…
fix(auth): auto-expire stale auth profile cooldowns and reset error c…