Skip to content

Billing cooldown persists after credits topped up — no way to reset without manual file edit #21574

@chaotix345

Description

@chaotix345

Summary

When the Anthropic API returns a billing/credit error, OpenClaw sets a disabledUntil timestamp in ~/.openclaw/agents/main/agent/auth-profiles.json with a 10-hour cooldown. The problem is that even after credits are topped up and the API key works fine (verified via direct curl), OpenClaw refuses to attempt any API calls until the cooldown expires.

Restarting the gateway does not clear this state — it's persisted to disk and survives restarts.

Steps to Reproduce

  1. Anthropic API returns a billing/credit error (e.g. insufficient credits)
  2. OpenClaw sets disabledUntil + disabledReason in auth-profiles.json
  3. User tops up credits — API key now works
  4. Gateway restart does not help — cooldown persists from disk
  5. OpenClaw shows generic "provider in cooldown" error with no guidance
  6. Only fix: manually edit auth-profiles.json to remove disabledUntil and disabledReason from usageStats

Expected Behavior

OpenClaw should recover gracefully when the underlying issue is resolved, without requiring manual JSON editing.

Suggested Improvements

  1. Retry on gateway restart — If a cooldown is active but the API key is valid (test with a lightweight probe request), clear the cooldown automatically
  2. Shorter default cooldown — 10 hours is far too long for a billing issue. 5 minutes would be more appropriate and let users self-serve
  3. CLI reset command — Add something like openclaw provider reset or openclaw auth reset to clear cooldown state without manual file editing
  4. Helpful error message — Instead of a generic "provider in cooldown" error, tell the user what file to edit and what fields to remove, or point them to the reset command

Environment

  • OpenClaw version: 2026.2.19-2 (45d9b20)
  • OS: macOS (Darwin 25.3.0 arm64)
  • Provider: Anthropic / claude-sonnet-4-6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions