openclaw - 💡(How to fix) Fix [Bug]:[Bug]: OpenAI/Codex OAuth fails and detects Plus account as free [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#81257Fetched 2026-05-14 03:34:00
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
2
Timeline (top)
labeled ×2closed ×1commented ×1subscribed ×1

OpenAI/Codex OAuth fails with “auth flow failed (exit 1)” on OpenClaw 2026.4.27, and the prior OAuth profile appeared to detect my ChatGPT Plus account as free.

Root Cause

OpenAI/Codex OAuth fails with “auth flow failed (exit 1)” on OpenClaw 2026.4.27, and the prior OAuth profile appeared to detect my ChatGPT Plus account as free.

Code Example

Observed TUI messages:

“You have hit your ChatGPT usage limit (free plan). Try again in ~9837 min.

“Rate-limited — ready in ~239 min.

“opening auth flow for openai; TUI will resume when it exits”

“auth flow failed (exit 1)
The previous OAuth profile state also appeared to contain:
chatgpt_plan_type: free

Observed provider/model in TUI:
openai-codex/gpt-5.5

Verified installed version:
OpenClaw 2026.4.27 (cbc2ba0)
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

OpenAI/Codex OAuth fails with “auth flow failed (exit 1)” on OpenClaw 2026.4.27, and the prior OAuth profile appeared to detect my ChatGPT Plus account as free.

Steps to reproduce

  1. Launch OpenClaw 2026.4.27 in local mode: openclaw tui --local

  2. Run: /auth openai

  3. Browser auth flow opens.

  4. After returning to TUI, OpenClaw reports: “auth flow failed (exit 1)”

  5. Prior OAuth profile state also appeared to detect the ChatGPT account internally as: chatgpt_plan_type: free

  6. The ChatGPT account used in Safari is an active ChatGPT Plus account.

Expected behavior

OpenClaw should successfully complete OpenAI/Codex OAuth and recognize the authenticated ChatGPT account as Plus.

Actual behavior

The OAuth flow exits with: “auth flow failed (exit 1)”

Before clearing auth profiles, the OAuth profile state also appeared to classify the ChatGPT Plus account as: chatgpt_plan_type: free

This resulted in free-plan-style rate limit messages including: “You have hit your ChatGPT usage limit (free plan).”

OpenClaw version

2026.4.27 (cbc2ba0)

Operating system

macOS Sequoia / zsh shell

Install method

Homebrew + terminal CLI

Model

openai-codex/gpt-5.5

Provider / routing chain

openclaw -> openai-codex OAuth

Additional provider/model setup details

No OpenAI API key is currently configured.

OPENAI_API_KEY was removed from ~/.zshrc and unset from the current shell session.

The auth profile entries were manually removed from: ~/.openclaw/agents/main/agent/auth-profiles.json

Removed profiles:

  • openai:default
  • openai-codex:my ChatGPT Plus account: <redacted-email>

Issue occurs while attempting ChatGPT/Codex OAuth authentication only.

Logs, screenshots, and evidence

Observed TUI messages:

“You have hit your ChatGPT usage limit (free plan). Try again in ~9837 min.”

“Rate-limited — ready in ~239 min.”

“opening auth flow for openai; TUI will resume when it exits”

“auth flow failed (exit 1)
The previous OAuth profile state also appeared to contain:
chatgpt_plan_type: free

Observed provider/model in TUI:
openai-codex/gpt-5.5

Verified installed version:
OpenClaw 2026.4.27 (cbc2ba0)

Impact and severity

Affected: Users attempting ChatGPT/Codex OAuth without API keys

Severity: Medium-High (blocks OAuth authentication workflow)

Frequency: Reproduced consistently during current auth attempts

Consequence:

  • OAuth authentication cannot complete
  • ChatGPT Plus account may be incorrectly classified as free
  • Causes free-plan-style rate limit behavior
  • Prevents continued use of local OpenClaw/Codex workflow without API keys

Additional information

I initially believed I was authenticated through my ChatGPT Plus account rather than API billing/auth, and only later realized OpenClaw may still have been routing through API/provider auth behavior. This caused unexpected token/API spending before I revoked and removed the API key configuration.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

OpenClaw should successfully complete OpenAI/Codex OAuth and recognize the authenticated ChatGPT account as Plus.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]:[Bug]: OpenAI/Codex OAuth fails and detects Plus account as free [1 comments, 2 participants]