Skip to content

[Bug]: Generic "API rate limit" error hides provider-specific quota message #54433

@SarveshAj420

Description

@SarveshAj420

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

  1. Configure OpenClaw with openai-codex/gpt-5.4 via OAuth (Go plan)
  2. Exhaust the Go plan's monthly message quota
  3. Send any message through Telegram or Dashboard
  4. 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: "⚠️ API rate limit reached. Please try again later."
The rawError field is logged internally but never surfaced to the user.
Gateway log line:
[agent/embedded] embedded run agent end: ... error=⚠️ API rate limit reached. Please try again later. rawError=You have hit your ChatGPT usage limit (go plan). Try again in ~4381 min.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crash

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions