Repository navigation
Description
Bug type
Behavior bug (incorrect output/state without crash)
Beta release blocker
No
Summary
OpenClaw Gateway incorrectly reports "You've reached your Codex subscription usage limit" while Codex CLI works successfully with the same ChatGPT OAuth account, CODEX_HOME, and GPT-5.5 model.
Steps to reproduce
-
Install OpenClaw 2026.6.10 and @openclaw/codex 2026.6.10.
-
Login using ChatGPT OAuth:
CODEX_HOME="$HOME/.openclaw/agents/main/agent/codex-home" codex auth login
-
Verify auth.json contains:
"auth_mode": "chatgpt" -
Verify Codex CLI works:
CODEX_HOME="$HOME/.openclaw/agents/main/agent/codex-home"
codex exec --skip-git-repo-check "what is 1+1"Result: returns "2"
-
Start OpenClaw Gateway.
-
Send any message (for example "你好") from the Feishu channel.
-
Gateway immediately returns:
"You've reached your Codex subscription usage limit."
Expected behavior
After successful ChatGPT OAuth login, OpenClaw Gateway should process the request using the configured model (openai/gpt-5.5), matching the observed behavior of Codex CLI with the same OAuth account and CODEX_HOME.
Actual behavior
Codex CLI succeeds with the same ChatGPT OAuth account, CODEX_HOME and model (openai/gpt-5.5).
However, when the request is sent through OpenClaw Gateway (Feishu channel), Gateway immediately returns:
"You've reached your Codex subscription usage limit. OpenClaw could not determine a reset time from Codex."
Gateway logs include:
provider=openai
model=openai/gpt-5.5
reason=rate_limit
No model response is generated.
OpenClaw version
2026.6.10 (aa69b12)
Operating system
macOS 15.5
Install method
npm global
Model
openai/gpt-5.5
Provider / routing chain
OpenAI (ChatGPT OAuth) -> @openclaw/codex -> Codex CLI 0.142.0
Additional provider/model setup details
Provider: OpenAI
Model: openai/gpt-5.5
Authentication: ChatGPT OAuth (auth_mode=chatgpt)
The same ChatGPT OAuth account and the same CODEX_HOME are used by both:
- Codex CLI 0.142.0
- OpenClaw Gateway (@openclaw/codex 2026.6.10)
Codex CLI succeeds, while OpenClaw Gateway consistently reports:
"You've reached your Codex subscription usage limit."
Logs, screenshots, and evidence
Attached evidence:
1. codex exec succeeds using the same ChatGPT OAuth account and the same CODEX_HOME:
CODEX_HOME="$HOME/.openclaw/agents/main/agent/codex-home" \
codex exec --skip-git-repo-check "what is 1+1"
Output:
2
2. OpenClaw Gateway using the same model (openai/gpt-5.5) and the same authentication fails immediately.
Gateway log:
You've reached your Codex subscription usage limit.
OpenClaw could not determine a reset time from Codex.
reason=rate_limit
provider=openai
model=gpt-5.5
3. auth.json is in ChatGPT OAuth mode (auth_mode=chatgpt), not API key mode.Impact and severity
Affected:
OpenClaw Gateway using the OpenAI Codex provider.
Severity:
Blocks the workflow because the gateway cannot generate any response.
Frequency:
Always reproducible.
Consequence:
Direct Codex CLI works, but all
Additional information
The issue is reproducible.
Using the same ChatGPT OAuth account, the same CODEX_HOME and the same model (openai/gpt-5.5):
- Codex CLI succeeds.
- OpenClaw Gateway always reports:
"You've reached your Codex subscription usage limit."
This indicates that the failure happens inside the OpenClaw Codex integration rather than the account [itself.](url)

Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 25, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed July 17, 2026, 11:28 PM ET / July 18, 2026, 03:28 UTC.
Summary
Keep open for maintainer follow-up: the linked merged PR explicitly targets the reported false usage-limit classifier, but the issue was reopened and assigned by
steipeteon July 18, 2026 after that merge. That current maintainer signal means the remaining question should not be auto-closed without confirming the observed Gateway-versus-CLI path and release status.Reproducibility: no. the issue has detailed older-version steps, but this review could not run a current-main or released-build reproduction, and the issue was reopened after the linked fix merged.
Ways to help us reproduce this
Next step
A maintainer must interpret the explicit post-merge reopen and confirm the current Gateway/app-server behavior before this can safely close.
Maintainer decision needed
codex exec, open or link a narrower issue for the remaining app-server/auth-home mismatch and retain this report as its evidence.Review details
Best possible solution:
Reproduce the Gateway app-server path with the reporter’s ChatGPT OAuth setup on a build containing the linked fix, compare its structured Codex error metadata with
codex exec, and close only if the false classification no longer occurs or a narrower remaining bug is identified.Do we have a high-confidence way to reproduce the issue?
No; the issue has detailed older-version steps, but this review could not run a current-main or released-build reproduction, and the issue was reopened after the linked fix merged.
Is this the best way to solve the issue?
Unclear; the merged structured-classification change is the right narrow fix for generic text matching, but the reopened status means it is not yet proven to resolve the reporter’s complete Gateway-versus-CLI scenario.
AGENTS.md: unclear because the file could not be read completely.
Remaining risk / open question:
v2026.7.1contains merge commit1a27e7f3ec2febf4fc36c7b5bd2a984630e05449.Codex review notes: model internal, reasoning high; reviewed against 1aa0d73823a0.
Label changes
Label changes:
issue-rating: 🦪 silver shellfish: Current issue advisory state selects this label.clawsweeper:needs-product-decision: Current issue advisory state no longer selects this label.clawsweeper:needs-live-repro: Current issue advisory state no longer selects this label.issue-rating: 🐚 platinum hermit: Current issue advisory state no longer selects this label.Label justifications:
P1: The reported Gateway route consistently returns an error instead of processing messages through a supported OAuth-backed model.impact:auth-provider: The report concerns ChatGPT OAuth credentials, Codex app-server handling, and OpenAI provider routing.impact:message-loss: An incoming Feishu message receives an error rather than the requested model response.Evidence reviewed
What I checked:
isCodexUsageLimitErrormatching generic “usage limit” text, and says it changes detection to require structuredcodexErrorInfo === "usageLimitExceeded". (1a27e7f3ec2f)steipeteclosed the issue, referenced the merge commit, and reopened and assigned it on July 18, 2026. That is an explicit current maintainer signal that the merge alone is not a safe terminal resolution. (1a27e7f3ec2f)bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted), so this review cannot establish current-main source behavior, exact fix-file provenance, or whether v2026.7.1 contains the merge.Likely related people:
How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.xxw77 commentedon Jun 26, 2026
Additional information after further testing:
I confirmed that this is not caused by API key authentication.
Current authentication is:
auth_mode=chatgpt
The following command succeeds:
CODEX_HOME="$HOME/.openclaw/agents/main/agent/codex-home"
codex exec --skip-git-repo-check "what is 1+1"
Output:
2
However, using the same ChatGPT OAuth account, the same CODEX_HOME and the same model (openai/gpt-5.5), OpenClaw Gateway always returns:
"You've reached your Codex subscription usage limit."
This seems to be specific to the Gateway / Codex integration rather than the account itself.
openclaw-barnacle commentedon Jul 10, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.
fix(codex): model-scoped usage-limit blocks, structural 429 classific…
fix(codex): model-scoped usage-limit blocks, structural 429 classific…