#I've tried everything to connect my Codex Chatgpt account and nothing works.
1 messages · Page 1 of 1 (latest)
Let me verify the docs and whether 2026.4.15 had a known OpenAI/Codex auth issue.
Yeah, 2026.4.15 is suspicious here.
A couple important checks first:
-
ChatGPT/Codex sign-in must use
openai-codex/*, notopenai/*openai/*= OpenAI API keyopenai-codex/*= ChatGPT/Codex account OAuth
-
There were real Codex transport/OAuth fixes in and after 2026.4.15, and more fixes landed in 2026.4.18, so if you're on 2026.4.15 I would update first.
Please paste these:
openclaw --version
openclaw config get agents.defaults.model.primary
openclaw models status
openclaw models list --provider openai-codex
If you already signed in with your ChatGPT/Codex account, also re-run:
openclaw models auth login --provider openai-codex
Docs:
https://docs.openclaw.ai/help/faq
https://docs.openclaw.ai/providers/openai
https://docs.openclaw.ai/install/updating
If you paste those outputs, I can tell pretty quickly whether this is a bad route, stale auth, or a 4.15-era bug.
},
"openai-codex": {
"baseUrl": "https://api.openai.com",
"auth": "oauth",
"api": "openai-completions",
"models": [
{
"id": "gpt-5.4",
"name": "GPT-5.4",
"api": "openai-completions",
"reasoning": true,
"input": [
"text"
],
"contextWindow": 1050000,
"maxTokens": 16384,
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
}
},
That snippet helps a lot. I’m checking the docs for the exact fix path, because that openai-codex block looks like it’s overriding the built-in Codex route.
Yep, that block is the problem.
You’ve got a legacy models.providers.openai-codex override that is shadowing the built-in Codex OAuth route:
"baseUrl": "https://api.openai.com",
"api": "openai-completions"
For a ChatGPT/Codex account, don’t force openai-codex onto the generic OpenAI completions path. Let OpenClaw use its built-in Codex routing.
What to do
1. Remove that override
Either delete the whole models.providers.openai-codex block, or at least remove:
baseUrl
api- any per-model
apioverride under that provider
A safe shape is more like:
{
agents: {
defaults: { model: { primary: "openai-codex/gpt-5.4" } }
}
}
If you want provider tweaks, keep them to harmless stuff like model caps, not transport routing.
2. Update off 2026.4.15
There were more Codex OAuth fixes after that, especially in 2026.4.18.
Docs: https://docs.openclaw.ai/install/updating
3. Re-auth + restart
openclaw models auth login --provider openai-codex
openclaw doctor
openclaw gateway restart
openclaw models status
Why this breaks
OpenClaw’s docs explicitly call out that old models.providers.openai-codex transport settings can shadow the built-in Codex OAuth path.
Refs:
If you paste the full openai-codex block after you edit it, I’ll sanity-check it before you restart.
},
"list": [
{
"id": "Dx",
"default": true,
"workspace": "/homeacmini/.openclaw/workspace",
"agentDir": "/hommini/.openclaw/agents/Drenox/agent",
"model": {
"primary": "openai-codex/gpt-5.4",
"fallbacks": [
"zai/glm-4.7",
"minimax/MiniMax-M2.7"
]
},
That part looks fine, your default model is correct.
So the problem is probably not agents.defaults.model.primary, it’s still the lower-level provider config or stale OAuth.
What I need next is this, specifically:
openclaw config get models.providers.openai-codex
openclaw doctor
openclaw models status
If doctor says anything like:
models.providers.openai-codex contains a legacy transport overrideapi=openai-completionsbaseUrl=https://api.openai.com
then that’s the bug.
So, short version:
- âś…
openai-codex/gpt-5.4as the primary model is right - ❌ a custom
models.providers.openai-codextransport override is not - ⚠️ if you’re still on
2026.4.15, I’d still update after fixing that
Paste those 3 outputs and I can tell you exactly what to remove.
i dont see your 2026.4.18 where i download it ?
I’m checking the update docs so I don’t send you to the wrong place.
You’re right, my bad, I jumped ahead to main.
2026.4.18 is not the published stable download yet.
npm latest is still 2026.4.15, so you won’t see 2026.4.18 in the normal install/update path.
What I’d do now
You probably do not need 4.18 to fix this. The bigger issue is still that stale openai-codex provider override.
Please run and paste:
openclaw config get models.providers.openai-codex
openclaw doctor
If you want the newest published build, use:
openclaw update
Docs: https://docs.openclaw.ai/install/updating
If you really want bleeding-edge main, that’s a separate path, but I would not do that first. Let’s fix the config that’s shadowing Codex OAuth.
"codex": {
"baseUrl": "https://chatgpt.com/backend-api/v1",
"auth": "oauth",
"api": "openai-codex-responses",
"models": [
{
"id": "gpt-5.4",
"name": "GPT-5.4 Codex",
"api": "openai-codex-responses",
"reasoning": true,
"input": [
"text",
"image"
],
"contextWindow": 272000,
"maxTokens": 128000,
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
}
}
},
"openai-codex:fran@gmail.com": {
"provider": "openai-codex",
"mode": "oauth"
}
}
},
I’m checking one detail here, because a provider key named codex is different from the built-in openai-codex path.
Ah, this is helpful.
If that snippet is literal, then I see the mismatch:
- your model/auth are using
openai-codex - but your custom provider block is named
codex
Those are not the same provider id.
So right now you’ve got:
openai-codex/gpt-5.4as the modelopenai-codex:fran@gmail.comas the OAuth profile- but a separate custom provider called
codex
That custom codex block is not the built-in openai-codex path.
What I’d do
Delete the custom models.providers.codex block and use the built-in provider only.
Keep:
openai-codex/gpt-5.4openai-codex:fran@gmail.com
Then run:
openclaw models auth login --provider openai-codex --set-default
openclaw doctor
openclaw gateway restart
Short version
- âś…
openai-codex:fran@gmail.comis fine - âś…
openai-codex/gpt-5.4is fine - ❌ custom provider key
codexis probably the thing confusing this setup
If you want, paste just these two next:
openclaw config get models.providers
openclaw config get auth.order
and I’ll tell you the exact lines to remove.
"openai-codex:fra@gmail.com": {
"provider": "openai-codex",
"mode": "oauth"
} "model": {
"primary": "openai-codex/gpt-5.4",
"fallbacks": [
"minimax/MiniMax-M2.7"
Yep, those lines are fine.
So:
- âś…
openai-codex:fra@gmail.comauth profile is fine - âś…
primary: openai-codex/gpt-5.4is fine - âś… the MiniMax fallback is unrelated
That means the bad config is somewhere else, almost certainly under models.providers.
What to remove, if you see it
If your config has either of these blocks:
models.providers.codexmodels.providers.openai-codex
and inside it you see stuff like:
baseUrl: ...
api: ...
models: [...]
then delete that whole custom provider block.
For Codex OAuth, you usually want:
- the auth profile
- the model selection
and not a hand-written provider transport block.
Then run
openclaw models auth login --provider openai-codex --set-default
openclaw doctor
openclaw gateway restart
If you want, paste this one command next:
openclaw config get models.providers
That should expose the exact bit that’s still breaking it.
work thanks you