The error "โ ๏ธ Model login expired on the gateway for openai-codex. Re-auth with openclaw models auth login --provider openai-codex, then try again." appears. After following the prompt to execute the "openclaw models auth login --provider openai-codex" command and restarting the Gateway, the same error message still occurs when sending a message.
OpenClaw Version: 2026.5.12
#โ ๏ธ Model login expired on the gateway for openai-codex
1 messages ยท Page 1 of 1 (latest)
For 2026.5.12, that re-auth command should refresh the OpenAI Codex OAuth profile, so if the gateway still says expired Iโd check whether it is using a different/old profile.
Please run these on the gateway host:
openclaw models status --probe --probe-provider openai-codex
openclaw models auth order get --provider openai-codex
What to look for:
- If the probe shows
expired/invalid_expires, run:
openclaw models auth login --provider openai-codex --set-default
openclaw gateway restart
openclaw models status --probe --probe-provider openai-codex
- If the probe shows
excluded_by_auth_order, orauth order getshows an override pointing at an older profile, clear it:
openclaw models auth order clear --provider openai-codex
openclaw gateway restart
Docs for the relevant commands:
https://docs.openclaw.ai/cli/models
https://docs.openclaw.ai/concepts/oauth
https://docs.openclaw.ai/gateway/authentication
If it still repeats after that, please paste the redacted output of:
openclaw models status --probe --probe-provider openai-codex
openclaw status --all
Those outputs should show whether this is an auth-order problem, a stale profile/store problem, or the gateway not loading the profile you just refreshed.
Auth probes
โโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Model โ Profile โ Status โ
โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ openai-codex/gpt-5.4 โ openai-codex:default (oauth) โ unknown ยท - โ
โ โ โ โณ Excluded by auth.order for this provider. โ
โ openai-codex/gpt-5.4 โ openai-codex:rumsgr@gmail.com (rumsgr@gmail.com) (oauth) โ ok ยท 9.6s โ
โโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
้ๆฏๅท่ก"openclaw models status --probe --probe-provider openai-codex"ๅพๅฐ็ๅ่ฆใ
้ๅ็ตๆไปฃ่กจ๏ผopenai-codex:rumsgr@gmail.com ้ๅ profile ๆฏๆญฃๅธธ็๏ผopenai-codex:default ่ขซ็ฎๅ็ auth.order ๆ้ค๏ผๆไปฅ CLI ็ซฏ็ OpenAI Codex OAuth ๆฌ่บซ็่ตทไพๅทฒ็ถ OKใ
็พๅจๆฏ่ผๅๆฏใ้ๅ Discord thread/session ้้ปๅจ่็ openai-codex:default profileใใOpenClaw ๆๆ auth profile per-session pin ่ตทไพ๏ผๆไปฅ้ๆฐ็ปๅ
ฅๅพ่ session ๅฏ่ฝ้ๅจ็จ่ profileใ
่ซๅจ้ๅ Discord thread ่ฃก่ฉฆ๏ผ
/model openai-codex/gpt-5.4@openai-codex:rumsgr@gmail.com
็ถๅพๅ็ผไธๅๆฎ้่จๆฏๆธฌ่ฉฆใ
ๅฆๆไฝ ไธๆณๆๅฎ profile๏ผไนๅฏไปฅๆธ ๆ session pin๏ผ
/model openai-codex/gpt-5.4
ๆ้ๆฐ session๏ผ
/reset
ๅๆธฌไธๆฌกใ
ๅฆๆ้ๆฏๅๆจฃ้ฏ่ชค๏ผ่ซ่ฒผ้ๅ thread ่ฃก็๏ผ
/model status
ๅฎๆ้กฏ็คบ็ฎๅ้ๅ่ๅคฉ session ๅฏฆ้้ธๅฐๅชๅ agent / auth profileใ็ธ้ docs๏ผhttps://docs.openclaw.ai/gateway/authentication https://docs.openclaw.ai/concepts/model-failover
้ๅ็ๆ
็่ตทไพๆฏๅฅฝ็๏ผ็ฎๅ openai provider ๅทฒ็ถ้้ Codex runtime ไฝฟ็จ openai-codex:rumsgr@gmail.com๏ผ่ไธ token ้ๆ 10dใ
ไธไธๆญฅๆๆๆนๆธฌ็ฎๅๅๅบไพ็ model ref๏ผไธ่ฆๅ็จ่็ openai-codex/gpt-5.4๏ผ
/model openai/gpt-5.5
ๆ๏ผ
/model openai/gpt-5.4-mini
็ถๅพ็ผไธๅๆฎ้่จๆฏๆธฌ่ฉฆใ
ๅฆๆๅฎไป็ถๅ ฑ Model login expired on the gateway for openai-codex๏ผ่ซๅ่ฒผๅ
ฉๅๆฑ่ฅฟ๏ผ
/model status
ไปฅๅ gateway host ไธ๏ผ
openclaw models auth order get --provider openai-codex
openclaw status --all
ๅ ็บ็พๅจ auth ๆฌ่บซ็่ตทไพ OK๏ผๅฉไธๆฏ่ผๅๆฏ้ๅ thread/session ็่ model/profile pin๏ผๆ gateway ๆญฃๅจ่ท็ agent/session ๆฒๅๅฐ็ฎๅ้ไปฝ ~/.openclaw/agents/main/agent/auth-profiles.jsonใ
openclaw models auth order get --provider openai-codex
openclaw status --all
I've finished running everything; what should I do now?
Please paste the output from those two commands, especially:
- the
Order override:line fromopenclaw models auth order get --provider openai-codex - the model/auth section from
openclaw status --all
openclaw status --all should redact tokens, but still skim it and remove anything private before posting.
In the meantime, also try one fresh test in this thread:
/model openai/gpt-5.5
then send a normal message like test.
If that works, the fix is done. If it still says login expired, the command outputs will tell us whether the gateway is using an old auth order, a different agent dir, or stale session state.
Good, that rules out the auth-order problem. The gatewayโs per-agent order is correctly set to the working profile:
openai-codex:rumsgr@gmail.com
Now this is most likely stale session state in this Discord thread. Do this in the thread:
/reset
/model openai/gpt-5.5@openai-codex:rumsgr@gmail.com
Then send a normal test message.
If it still fails after that, please paste:
/model status
and the model/auth part of:
openclaw status --all
At this point the key question is whether the active Discord session is still pinned to an old model/profile, or whether the running gateway is reading a different agent/session state than the CLI command is showing.
openclaw status --all did not find the model/auth section.
Executing "/model openai/gpt-5.5@openai-codex:rumsgr@gmail.com" resulted in the error: "The authentication profile 'openai-codex:rumsgr@gmail.com' is intended for openai-codex, not openai."
Youโre right โ I gave you the wrong provider prefix for the explicit profile pin. Sorry, that error is clear: openai/gpt-5.5 is provider openai, but your OAuth profile belongs to openai-codex.
Use the openai-codex model ref when pinning that profile:
/model openai-codex/gpt-5.5@openai-codex:rumsgr@gmail.com
If that model id is not available on 2026.5.12, use the one your probe already checked:
/model openai-codex/gpt-5.4@openai-codex:rumsgr@gmail.com
Then send a normal test message.
Also, instead of openclaw status --all, use this for the auth/model section: