#Adding Codex ouath
1 messages Β· Page 1 of 1 (latest)
If you mean the ChatGPT subscription / Codex OAuth route, the model path is:
openai-codex/gpt-5.4
Use this, not openai/gpt-5.4.
Quick setup:
openclaw models auth login --provider openai-codex
openclaw config set agents.defaults.model.primary openai-codex/gpt-5.4
openclaw models list --provider openai-codex
If you mean the config key path, it is:
agents.defaults.model.primary
If you mean the stored auth file path, it is usually:
~/.openclaw/agents/<agentId>/agent/auth-profiles.json
And if OpenClaw is reusing an existing Codex CLI login, that source file is:
~/.codex/auth.json
Docs:
- https://docs.openclaw.ai/providers/openai
- https://docs.openclaw.ai/concepts/oauth
- https://docs.openclaw.ai/start/wizard
If it doesnβt show up, paste:
openclaw --version
openclaw models status
miya@Miyas-Mac-mini ~ % openclaw gateway status
Invalid config at /Users/miya/.openclaw/openclaw.json:\n- agents.defaults: Unrecognized key: "approvals"
- agents.list.1: Unrecognized keys: "workdir", "files"
- agents.list.2: Unrecognized keys: "workdir", "files"
- agents.list.3: Unrecognized keys: "workdir", "files"
π¦ OpenClaw 2026.4.20 (115f05d)
Runs on a Raspberry Pi. Dreams of a rack in Iceland.
Gateway status failed: Error: Invalid config at /Users/miya/.openclaw/openclaw.json:
- agents.defaults: Unrecognized key: "approvals"
- agents.list.1: Unrecognized keys: "workdir", "files"
- agents.list.2: Unrecognized keys: "workdir", "files"
- agents.list.3: Unrecognized keys: "workdir", "files"
The ChatGPT subscription / Codex OAuth model path is:
openai-codex/gpt-5.4
So the setup is:
openclaw onboard --auth-choice openai-codex
If you want Codex as the default after that:
openclaw config set agents.defaults.model.primary openai-codex/gpt-5.4
If you want to keep your current default and just add Codex, thatβs fine too. Just auth it, then switch per session with:
/model openai-codex/gpt-5.4
Your auth is stored in:
~/.openclaw/agents/<agentId>/agent/auth-profiles.json
Usually that means:
~/.openclaw/agents/main/agent/auth-profiles.json
For the config error in /Users/miya/.openclaw/openclaw.json, these keys are outdated in 2026.4.20:
agents.defaults.approvalsβ moveapprovalsto the top levelagents.list[].workdirβ rename toworkspaceagents.list[].filesβ remove it, it is not a valid agent key anymore