⚠️ Agent failed before reply: All models failed (3): anthropic/claude-opus-4-6: OAuth token refresh failed for anthropic: Failed to refresh OAuth token for anthropic. Please try again or re-authenticate. (auth) | anthropic/claude-sonnet-4-6: OAuth token refresh failed for anthropic: Failed to refresh OAuth token for anthropic. Please try again or re-authenticate. (auth) | google/gemini-2.5-flash: ⚠️ API rate limit reached. Please try again later. (rate_limit).
Logs: openclaw logs --follow
#Error persisting
1 messages · Page 1 of 1 (latest)
That error means the agent tried its configured model fallbacks, and all of them were unavailable:
- Claude models failed because your Anthropic credential can’t be refreshed (
OAuth token refresh failed…). - Gemini failed because you hit a rate limit (
API rate limit reached).
Fix the Anthropic side (most important)
If you’re using a Claude subscription, you should be using a setup-token (not an OAuth refresh flow). Re-auth by generating a fresh token and pasting it into OpenClaw:
- Docs: https://docs.openclaw.ai/providers/anthropic.md and https://docs.openclaw.ai/concepts/oauth.md
- Commands (pick one path):
- Generate on any machine:
claude setup-token - Then on the gateway host:
openclaw models auth paste-token --provider anthropic - Or run the guided flow:
openclaw onboard(choose Anthropic → setup-token)
- Generate on any machine:
If you’re using Anthropic API key billing instead, re-run onboarding with an API key:
openclaw onboard --anthropic-api-key "$ANTHROPIC_API_KEY"