-
-
Notifications
You must be signed in to change notification settings - Fork 69.6k
[Bug]: Generic "API rate limit" error hides provider-specific quota message #54433
Description
Bug type
Behavior bug (incorrect output/state without crash)
Summary
When the openai-codex provider returns a plan usage limit error, OpenClaw
surfaces a generic "API rate limit reached" message instead of the
provider's specific error with the reset time.
Steps to reproduce
- Configure OpenClaw with openai-codex/gpt-5.4 via OAuth (Go plan)
- Exhaust the Go plan's monthly message quota
- Send any message through Telegram or Dashboard
- Observe the error shown to the user
Expected behavior
The provider's specific error message is shown, e.g.:
"You have hit your ChatGPT usage limit (go plan). Try again in ~4381 min."
Actual behavior
User sees only: "
The rawError field is logged internally but never surfaced to the user.
Gateway log line:
[agent/embedded] embedded run agent end: ... error=
OpenClaw version
2026.3.24 (60cd98a)
Operating system
macOS (Apple Silicon M3)
Install method
pnpm dev (source)
Model
openai-codex/gpt-5.4
Provider / routing chain
openclaw -> openai-codex (OAuth)
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
Affected: Any user on a capped plan (ChatGPT Go, Plus, etc.)
Severity: High — causes hours of misdirected troubleshooting
Frequency: Always, whenever plan quota is exhausted
Consequence: User cannot distinguish a transient rate limit from a
plan usage cap with a 3-day reset, leading them to debug Gemini keys,
web search config, and other unrelated settings instead of simply waiting.
The fix is straightforward: rawError is already captured — just pass it
through to the user-facing message.
Additional information
No response