#API Rate Limit Reached

1 messages Β· Page 1 of 1 (latest)

shut fox
#

I'm seeing API rate limit reached but im using codex subscription?

14:46:02+00:00 warn tools {"subsystem":"tools"} agents.main.tools.allow allowlist contains unknown entries (gateway, nodes). These entries are shipped core tools but unavailable in the current runtime/provider/model/config.
14:46:09+00:00 warn agent/embedded {"subsystem":"agent/embedded"} {"event":"embedded_run_agent_end","tags":["error_handling","lifecycle","agent_end","assistant_error"],"runId":"eb88567b-b813-4bd7-a23e-dd9fdbdd8069","isError":true,"error":"⚠️ API rate limit reached. Please try again later.","failoverReason":"rate_limit","model":"gpt-5.4","provider":"openai-codex","rawErrorPreview":"<html>\n <head>\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <style global>body{font-family:Arial,Helvetica,sans-serif}.container{align-items:center;display:flex;flex-direction:column;gap:2rem;height:100%;justify-content:center;width:100%}@keyframes enlarge-appear{0%{opacity:0;transform:scale(75%) rotate(-90deg)}to{opacity:1;transform:scale(100%) rotate(0deg)}}.lo…","rawErrorHash":"sha256:9a92524f7585","providerRuntimeFailureKind":"rate_limit"} embedded run agent end

coarse cobaltBOT
#

Short answer: yes, that can still happen.

openai-codex/* in OpenClaw uses the Codex OAuth / ChatGPT sign-in route, and the docs explicitly note that its quota windows are OpenAI-managed and can differ from ChatGPT web/app usage. So having a Codex subscription does not mean OpenClaw calls are unlimited.

A couple of useful bits here:

  • Your log shows provider: "openai-codex" and providerRuntimeFailureKind: "rate_limit", so this looks like an upstream Codex OAuth limit, not a generic OpenClaw parsing bug.
  • The tools.allow ... unknown entries (gateway, nodes) warning is separate. Annoying, but not the cause of the rate-limit error.

Can you paste these next?

openclaw --version
openclaw models status
openclaw models status --probe
shut fox
#

it was working fine before? but since upgrading to v2026.4.14 i see this also when i do /status i get

🦞 OpenClaw 2026.4.14 (323493f)
🧠 Model: openai-codex/gpt-5.4 Β· πŸ”‘ oauth (openai-codex:hiddenemail (hiddenemail))
πŸ“š Context: 0/200k (0%) Β· 🧹 Compactions: 0
πŸ“Š Usage: 5h 86% left ⏱3h 17m Β· Week 76% left ⏱2d 19h
🧡 Session: agent:main:telegram:direct:5418724080 β€’ updated just now
βš™οΈ Runtime: direct Β· Think: medium Β· Text: low
πŸͺ’ Queue: collect (depth 0)

coarse cobaltBOT
#

Yep, that /status output is the interesting part.

It means OpenClaw can read your Codex usage, and it sees the visible 5h + week windows, but that still does not guarantee the next request will pass.

For openai-codex/*, /status is basically showing the provider-reported usage windows. You can still get a rate-limit error from things like:

  • a short burst / concurrency cap
  • a model-specific bucket
  • a temporary cooldown after a prior limit hit

So 5h 86% left plus API rate limit reached is annoying, but not actually impossible.

Also, this part is unrelated:

  • tools.allow ... unknown entries (gateway, nodes)

That is a separate tool-policy warning, not the reason Codex is failing.

#

Since it started right after 2026.4.14, I’d check whether this is just a more clearly surfaced upstream limit, or whether your Codex profile got put into cooldown. Can you paste these?

/fast status
openclaw models status --probe
openclaw models status --json
openclaw doctor

If you want, just paste the auth.unusableProfiles bit from openclaw models status --json and I can tell you pretty quickly what bucket it landed in.

Relevant docs:

shut fox
#

claudeuser@claude:~$ openclaw models status --probe

β”‚
14:56:44 [tools] agents.main.tools.allow allowlist contains unknown entries (gateway, nodes). These entries are shipped core tools but unavailable in the current runtime/provider/model/config.
14:56:52 [errors] Long error truncated: <html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style global>body{font-family:Arial,Helvetica,sans-serif}.container{align-items:center;display:flex;flex
β—‡
Config : ~/.openclaw/openclaw.json
Agent dir : ~/.openclaw/agents/main/agent
Default : openai-codex/gpt-5.4
Fallbacks (0) : -
Image model : -
Image fallbacks (0): -
Aliases (0) : -
Configured models (1): openai-codex/gpt-5.4

Auth overview
Auth store : ~/.openclaw/agents/main/agent/auth-profiles.json
Shell env : off
Providers w/ OAuth/tokens (1): openai-codex (2)

  • openai-codex effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=2 (oauth=2, token=0, api_key=0) | openai-codex:hiddenemail=OAuth (hiddenemail), openai-codex:default=OAuth

OAuth/token status

  • openai-codex usage: 5h 86% left ⏱3h 3m Β· Week 76% left ⏱2d 19h
    • openai-codex:default ok expires in 6d
    • openai-codex:hiddenemail (hiddenemail) ok expires in 10d

Auth probes
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Model β”‚ Profile β”‚ Status β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ openai-codex/gpt-5.4 β”‚ openai-codex:default (oauth) β”‚ ok Β· 12.9s β”‚
β”‚ openai-codex/gpt-5.4 β”‚ openai-codex:hiddenemail (hiddenemail) (oauth) β”‚ ok Β· 14.2s β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

coarse cobaltBOT
#

Nice, this narrows it down a lot.

Your openclaw models status --probe output says:

  • OAuth is healthy
  • both Codex profiles probe successfully
  • you are not fully out of the visible 5h/week quota windows

So this is not β€œCodex login is broken”.

The thing I’m now most suspicious of is fast mode.

2026.4.14 changed OpenAI/Codex fast mode so /fast on now maps to service_tier=priority on native Codex requests. If that session already had a sticky /fast on, or your config sets fastMode / serviceTier: "priority", you can suddenly start hitting provider-side rate limits even though /status still shows normal quota left.

I’d try this in the affected chat/session first:

#
/fast status
/fast off
/new

If that fixes it, that was almost certainly the cause.

Also check config for these:

rg -n 'fastMode|serviceTier' ~/.openclaw/openclaw.json

Especially under:

  • agents.defaults.models["openai-codex/gpt-5.4"].params.fastMode
#
  • agents.defaults.models["openai-codex/gpt-5.4"].params.serviceTier

Two other notes:

  • You currently have no fallbacks configured, so any Codex throttle is a hard stop.
  • The tools.allow ... (gateway, nodes) warning is unrelated to the rate limit.

Docs:

If /fast off does not fix it, paste the result of rg -n 'fastMode|serviceTier' ~/.openclaw/openclaw.json and I’ll help trace the next layer.

shut fox
#

Current fast mode: off (default).
Options: status, on, off.

coarse cobaltBOT
#

Perfect, that rules out the easy culprit.

So now we know:

  • auth is fine
  • probes are fine
  • fast mode is off
  • visible Codex quota still has room

That makes me suspect either:

  1. an explicit serviceTier / model param in config, or
  2. a legacy models.providers.openai-codex override shadowing the built-in Codex path, or
  3. a session-specific weird state

Can you run these next?

#
rg -n 'serviceTier|fastMode|openai-codex' ~/.openclaw/openclaw.json
openclaw doctor

openclaw doctor is especially relevant here, because newer OpenClaw versions explicitly warn about stale models.providers.openai-codex overrides.

Also, in the affected chat/session, try:

/new

then send a tiny plain prompt like:

#
hi

If a fresh session still fails on a tiny prompt, that points much more strongly at config/provider routing, not context size or session state.

If you paste the rg output + doctor output, I can probably pinpoint it from there.

shut fox
#

after i do /new it replies

<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style global>body{font-family:Arial,Helvetica,sans-serif}.container{align-items:center;display:flex;flex-direction:column;gap:2rem;height:100%;justify-content:center;width:100%}@keyframes enlarge-appear{0%{opacity:0;transform:scale(75%) rotate(-90deg)}to{opacity:1;transform:scale(100%) rotate(0deg)}}.logo{color:#8e8ea0}.scale-appear{animation:enlarge-appear .4s ease-out}@media (min-width:768px){.scale-appear{height:48px;width:48px}}.data:empty{display:none}.data{border-radius:5px;color:#8e8ea0;text-…

coarse cobaltBOT
#

Ah, raw HTML after /new is the big clue.

That means this is not just old session state. At this point I’m much more suspicious of a Codex provider routing/config override than true quota exhaustion.

The specific thing to check is a legacy manual models.providers.openai-codex block. Newer OpenClaw has a built-in Codex OAuth path, and old transport overrides can shadow it after an upgrade. openclaw doctor has a check for exactly this.

Please run:

openclaw doctor
rg -n '"openai-codex"|chatgpt.com|baseUrl|api|serviceTier|fastMode|transport' ~/.openclaw/openclaw.json

What I’m looking for is a manual config block under models.providers.openai-codex, especially with things like:

  • baseUrl
  • api
#
  • request
  • transport-related settings

If you do see that, the likely fix is:

  1. back up your config
  2. remove the stale manual models.providers.openai-codex transport override
  3. restart the gateway

Example backup + restart:

cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak
openclaw gateway restart

I’d paste the doctor + rg output here first if you want a quick sanity check before editing anything. That should tell us pretty fast whether this is the shadowed-Codex-path issue.

shut fox
#

im confused what do i need to change in openclaw.json

coarse cobaltBOT
#

Don’t add a new block from scratch.

What I want you to remove, if it exists, is a legacy manual override that forces openai-codex onto the normal OpenAI API transport.

Bad, remove this kind of thing if present

{
  models: {
    providers: {
      "openai-codex": {
        api: "openai-responses",
        baseUrl: "https://api.openai.com/v1"
      }
    }
  }
#
}

Also remove this kind of inline legacy override if you have it:

{
  models: {
    providers: {
      "openai-codex": {
        models: [
          { id: "gpt-5.4", api: "openai-responses" }
        ]
      }
    }
#
  }
}

Good, normal Codex OAuth setup is just this

{
  agents: {
    defaults: {
      model: { primary: "openai-codex/gpt-5.4" }
    }
  }
}
#

Safe to keep

If your openai-codex block is only doing something harmless like contextTokens, that is usually fine, for example:

{
  models: {
    providers: {
      "openai-codex": {
        models: [
          { id: "gpt-5.4", contextTokens: 160000 }
        ]
      }
    }
  }
}
#

So, what to change?

  1. Open ~/.openclaw/openclaw.json

  2. Search for openai-codex

  3. If you see:

    • api: "openai-responses"
    • baseUrl: "https://api.openai.com/v1"
    • or a model entry with api: "openai-responses"

    remove those legacy override lines/blocks

  4. Save

  5. Restart:

openclaw gateway restart
#

If you want the safest path, paste just the openai-codex part of your openclaw.json here and I’ll tell you exactly what to delete and what to keep.

shut fox
#

is is like

{
"agents": {
"defaults": {
"workspace": "/home/claudeuser/.openclaw/workspace",
"models": {
"openai-codex/gpt-5.4": {}
},
"model": {
"primary": "openai-codex/gpt-5.4"
}
},

coarse cobaltBOT
#

Yep, that snippet looks normal. I would not change that part.

This is fine:

"models": {
  "openai-codex/gpt-5.4": {}
},
"model": {
  "primary": "openai-codex/gpt-5.4"
}

The suspicious thing I was looking for would be somewhere else in the file, as a separate top-level provider override, like:

#
models: {
  providers: {
    "openai-codex": {
      api: "openai-responses",
      baseUrl: "https://api.openai.com/v1"
    }
  }
}

So, next step:

rg -n '"openai-codex"|baseUrl|openai-responses|api.openai.com/v1|providers' ~/.openclaw/openclaw.json
openclaw doctor
#

If you do not have a models.providers.openai-codex block anywhere, then honestly I don’t think openclaw.json is the problem, and we’re probably looking at either:

  • a provider-side Codex issue, or
  • a 2026.4.14 regression in this path

If you want, paste the full output of that rg command and I’ll tell you immediately whether there’s anything to edit or not.

shut fox
#

i cant paste it here character limit

coarse cobaltBOT
#

No worries, let’s make it tiny.

Please run just these two and paste the output:

rg -n 'api\\.openai\\.com/v1|openai-responses|baseUrl' ~/.openclaw/openclaw.json
openclaw doctor | rg -i 'codex|openai-codex|shadow|legacy'

A couple notes:

  • If the first command prints nothing, that’s actually good
  • If the second command prints nothing, say no doctor matches

That should be short enough to fit here, and it’s the fastest way to tell whether this is a stale config override vs a real 2026.4.14 bug.

shut fox
#

claudeuser@claude:~$ rg -n 'api\.openai\.com/v1|openai-responses|baseUrl' ~/.openclaw/openclaw.json
openclaw doctor | rg -i 'codex|openai-codex|shadow|legacy'
β”‚ for provider "openai". You are authenticated with OpenAI Codex OAuth. β”‚
β”‚ Use openai-codex/gpt-5.4 (OAuth) or set OPENAI_API_KEY to use β”‚
claudeuser@claude:~$

coarse cobaltBOT
#

That’s actually really helpful.

I don’t think you need to change openclaw.json.
Your checks basically ruled that out:

  • no legacy baseUrl / openai-responses override
  • no Codex shadowing warning from doctor
  • models status --probe succeeds
  • but real assistant turns and even /new return raw HTML

So this now looks much more like a real 2026.4.14 bug/regression on the Codex OAuth path, or an upstream Codex HTML quota page that OpenClaw is mishandling.

I’d file a GitHub issue here:

https://github.com/openclaw/openclaw/issues

Include this summary:

#
OpenClaw 2026.4.14 (323493f)
Model: openai-codex/gpt-5.4
Auth: Codex OAuth

Symptoms:
- normal assistant turns fail with "API rate limit reached"
- /new returns raw HTML page
- openclaw models status --probe succeeds for both Codex OAuth profiles
- openclaw.json has no legacy openai-codex baseUrl/api override
- openclaw doctor shows no Codex shadowing warning

Relevant log fields:
- provider=openai-codex
- providerRuntimeFailureKind=rate_limit
- rawErrorHash=sha256:9a92524f7585