-
-
Notifications
You must be signed in to change notification settings - Fork 69.4k
Embedded runner reports 'API rate limit reached' when provider has full headroom #41515
Copy link
Copy link
Open
Description
Bug Description
The embedded agent runner reports API rate limit reached. Please try again later. and retries with exponential backoff, even when the actual API provider has full rate limit headroom available.
Steps to Reproduce
- Set system default model to
anthropic/claude-haiku-4-5-20251001(API key auth) - Trigger an embedded agent run (e.g., via a system event from the health monitor)
- Observe the embedded run fail with rate limit error
- Simultaneously, call the same model via
curlwith the same API key — succeeds with full headroom:
anthropic-ratelimit-requests-limit: 4000
anthropic-ratelimit-requests-remaining: 3999
Expected Behavior
The embedded runner should successfully call the Anthropic API using the configured API key from auth-profiles.json.
Actual Behavior
The embedded runner fails immediately with API rate limit reached and retries 4 times with exponential backoff before giving up. Each health monitor event (every ~3 min) spawns a new run that also fails, creating continuous log noise:
[agent/embedded] embedded run agent end: runId=xxx isError=true error=⚠️ API rate limit reached. Please try again later.
Hypothesis
The embedded runner may be:
- Using a different auth path than the one in
auth-profiles.json(e.g., reading fromopenclaw.jsonauth.profileswhich only has provider/mode, not the actual key) - Applying an internal rate limiter that is more restrictive than the actual provider limits
- Caching a stale auth credential from a prior provider configuration
Environment
- OpenClaw version: 2026.3.8 (3caab92)
- OS: macOS (Darwin 25.3.0 arm64)
- Node: v22.22.0
- System default model:
anthropic/claude-haiku-4-5-20251001 - Auth: API key in
auth-profiles.json(verified working via direct curl)
Related
- Health monitor emits system events for channels removed from config #41514 (health monitor emitting events for removed channels — this is the trigger for the embedded runs)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.