Install
openclaw skills install openai-codex-multi-oauthManage and debug multiple OpenAI Codex OAuth profiles inside OpenClaw, including native multi-profile auth stores and external-router setups where one active slot is backed by a repository of multiple OAuth identities. Use when fixing Codex profile switching, session `authProfileOverride` sync, `/status` or usage mismatches, auth.order behavior, active-slot routing, broken-token recovery, or same-email different-account/workspace selection bugs.
openclaw skills install openai-codex-multi-oauthSupport and debug more than one openai-codex OAuth login inside OpenClaw.
This skill is also meant to help a human operator understand the setup, not only help an agent patch code.
What humans usually want to know:
/status usage matches the profile they expectedCommon user-facing surfaces in real deployments:
/status — confirm the current chat's selected model, profile semantics, and usage summary/codex_profile — an optional helper command in some setups for viewing or switching the current Codex profile/codex_usage — an optional helper command in some setups for comparing live usage across profilesTreat /codex_profile and /codex_usage as common patterns, not guaranteed OpenClaw built-ins.
python3 scripts/summarize_codex_profiles.py.python3 scripts/codex_usage_report.py.If the target setup includes a local helper command or router script, reproduce through that real entrypoint at least once. Synthetic env-injected tests can miss session-sync bugs.
Treat these as separate layers:
codex_profile_idorder.openai-codex in the auth storeauthProfileOverride for the current chat/sessionDo not assume these layers always match.
OpenClaw stores multiple openai-codex:* profiles directly in auth-profiles.json, and runtime resolves selection from auth order plus session override.
A local repo of Codex OAuth identities exists outside normal runtime selection, and a helper/router copies one selected profile into an active slot such as openai-codex:default.
In that design, verify all of these separately:
authProfileOverride/status oauth label/status usage sourceCheck in this order:
order.openai-codexauthProfileOverride/codex_profile-style helper switches profile, but /status does not followCheck:
If the helper is real, re-test through the real command path, not only manual edits.
/status oauth changes, but usage does notCheck:
authProfileOverrideCheck:
accountId because they are in the same team workspaceuser_id is still different in the live wham/usage responseCheck:
Check:
accountId exists in another store or backup/status, display labels, and runtime truth disagreeDecide which semantic each surface should represent:
Then verify every layer against that semantic before patching.
accountId before email when possible.openai-codex:defaultopenai-codex:secondaryopenai-codex:tertiaryopenai-codex:account-N/codex_usage-style surface into the actual command handler path.After each change, verify all of these:
authProfileOverride is what you expect/status shows the intended semanticUse examples like these when explaining the setup to a human:
/codex_profile to inspect or switch the profile for this chat if your deployment exposes that helper."/status to confirm which profile the current chat prefers and whether usage looks aligned."/codex_usage helper exists, compare profiles directly when usage looks suspicious."When documenting commands, always say whether they are:
references/runtime-files.md for the file families that usually matter.references/workflows.md for concrete repair workflows and rollback points.references/usage-debugging.md when the bug involves usage mismatches, same-workspace confusion, or a new /codex_usage-style command.scripts/summarize_codex_profiles.py before and after changes.scripts/codex_usage_report.py when you need exact per-profile live usage evidence.