Skip to content

Auth profile cooldown doesn't auto-expire #3604

Closed

Description

@bergcb322-clawd

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:

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:

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

  1. added a commit that references this issue on Jan 28, 2026
    28f9f22
  2. Glucksberg commented on Jan 29, 2026

    @Glucksberg
    Contributor

    🔗 Related: PR #3607 implements auto-expiry for auth profile cooldowns.

  3. added
    bug
    on Jan 31, 2026
  4. added a commit that references this issue on Feb 16, 2026
    03cadc4
  5. locked as resolved and limited conversation to collaborators on Mar 4, 2026
  6. added a commit that references this issue on Apr 28, 2026
    e05e476
  7. added a commit that references this issue on May 2, 2026
    6b459fa
  8. added a commit that references this issue on May 9, 2026
    4cacaab
  9. added a commit that references this issue on Oct 11, 2026
    061c70d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions