Bug Report: Kimi/Moonshot "Rate Limit" Error Masking Insufficient Funds
Environment
- OpenClaw Version: 2026.3.8
- OS: macOS
- Plugin: kimi-claw (auto-loaded)
- Provider: Moonshot (Kimi)
Problem Summary
When Kimi/Moonshot API account balance reaches zero, the API returns a 429 Rate Limit Reached error instead of a clear billing/insufficient funds message. OpenClaw interprets this literally, triggering a cascading failure that locks the UI and prevents model switching.
Symptoms
- UI completely frozen with repeated error:
⚠️ API rate limit reached. Please try again later.
- Cannot send messages in chat
- Cannot switch models via chat commands (
model=...)
- Background
slug-gen task infinitely retries, spamming terminal
- Session locked to broken provider
Root Cause
- Error Misclassification: Moonshot API returns 429 for billing issues, not actual rate limiting
- Infinite Retry Loop:
slug-gen background task keeps hitting API on failure
- Command Routing Trap: Model switch commands route through the failing provider
Reproduction Steps
- Exhaust Kimi/Moonshot API credits
- Attempt any chat message or command
- Observe 429 error loop
- Try to switch models via chat — fails
Expected Behavior
- Clear error: "Insufficient API credits" or "Billing issue"
- Graceful degradation: pause background tasks after N failures
- Emergency bypass: allow model switching even when current provider is down
Actual Behavior
- Misleading "rate limit" error
- Infinite retry loop
- Complete UI lockout
Workaround
Reload funds into Kimi account, or force model switch via control UI dropdown (bypasses chat parser).
Proposed Fixes
1. Better Error Parsing (kimi-claw)
Parse Moonshot error responses for billing-specific codes/messages and surface accurate error to user.
2. Failsafe for Background Tasks
slug-gen retry policy:
- Max 3 attempts
- Exponential backoff
- After max retries: pause + notify, don't loop
3. Emergency Model Override
Route /model commands through control layer, not through the active AI provider. Critical for provider outages.
Impact
- Severity: High — complete functionality loss
- User Experience: Hours of confusion troubleshooting "rate limits"
- Frequency: Any user with auto-reload disabled or payment issues
Reported by: Coach O via Clawd
Bug Report: Kimi/Moonshot "Rate Limit" Error Masking Insufficient Funds
Environment
Problem Summary
When Kimi/Moonshot API account balance reaches zero, the API returns a 429 Rate Limit Reached error instead of a clear billing/insufficient funds message. OpenClaw interprets this literally, triggering a cascading failure that locks the UI and prevents model switching.
Symptoms
⚠️ API rate limit reached. Please try again later.model=...)slug-gentask infinitely retries, spamming terminalRoot Cause
slug-genbackground task keeps hitting API on failureReproduction Steps
Expected Behavior
Actual Behavior
Workaround
Reload funds into Kimi account, or force model switch via control UI dropdown (bypasses chat parser).
Proposed Fixes
1. Better Error Parsing (kimi-claw)
Parse Moonshot error responses for billing-specific codes/messages and surface accurate error to user.
2. Failsafe for Background Tasks
3. Emergency Model Override
Route
/modelcommands through control layer, not through the active AI provider. Critical for provider outages.Impact
Reported by: Coach O via Clawd