Install
openclaw skills install codex-profilerManage OpenAI Codex profiles via Telegram commands for usage checks and OAuth token refresh with queued safe apply and progress updates.
openclaw skills install codex-profiler✅ Maintained path: use
codex-profilerfor all Codex profile operations. Standalonecodex-usageandcodex-authskills are deprecated.
This skill consolidates both scripts:
scripts/codex_usage.py (usage/limits)scripts/codex_auth.py (OAuth helper for start/status)For auth/profile mutation, this skill now standardizes on gateway-native openclaw models auth ... commands.
auth-profiles.json as gateway-managed state. Never mutate it directly in normal operations.openclaw models auth ..., openclaw models auth order ...) over script-level file writes.RISK.md for allowed/denied operation boundaries./codex_usage → selector (default / all / discovered profiles)/codex_usage <profile>/codex_auth → selector (profiles)/codex_auth <profile>/codex_auth finish <profile> <callback_url> (helper only; profile/order mutation must use gateway-native commands)For /codex_usage, send immediate progress message first as a separate message:
Delivery rule:
NO_REPLY.For auth/profile/order mutation, warn that writes are gateway-managed and enforce verify-after-apply:
openclaw models auth ... and then verify with models status + auth order get."openclaw models auth order set ...) so it is never selected.For auth/profile/order changes, use this exact 3-step flow:
openclaw models status --json
openclaw models auth order get --provider openai-codex --agent <agent-id>
openclaw models auth order set --provider openai-codex --agent <agent-id> <profile1> <profile2>
# or
openclaw models auth order clear --provider openai-codex --agent <agent-id>
# or provider login flow
openclaw models auth login --provider openai-codex
openclaw models status --json
openclaw models auth order get --provider openai-codex --agent <agent-id>
Never skip verification. If results mismatch expectation, do not hand-edit files; diagnose and re-apply via gateway-native commands.
# Usage checks (read-only)
python3 skills/codex-profiler/scripts/codex_usage.py --profile all --timeout-sec 25 --retries 1 --debug
python3 skills/codex-profiler/scripts/codex_usage.py --profile all --format text
# OAuth helper (callback parsing/status only)
python3 skills/codex-profiler/scripts/codex_auth.py start --profile default
python3 skills/codex-profiler/scripts/codex_auth.py status
curl|bash, wget|sh) is allowed by this skill.sudo/SSH/system-level host mutation commands are part of this skill path.chatgpt.com).When asked about running multiple Codex accounts/profiles, rotation policy, or fallback strategy, read:
references/multi-account-rotation.mdUse the short template for quick chat answers and the deep-dive template for setup/troubleshooting requests.
~/.openclaw/agents/main/agent/auth-profiles.json by default.auth-profiles.json; auth.json is legacy compatibility and should not be used as primary state.auth-profiles.json, leftover legacy files, or stale runtime cooldown) before assuming model fallback bugs.accountId across two profile labels is not automatically a defect. In this environment, multiple labels can map to the same workspace/account identity while still operating correctly. Treat it as healthy when both profiles are auth-valid and usable in /codex_usage; investigate only when auth failures or routing failures appear.https://chatgpt.com/backend-api/wham/usage.401 as auth_not_accepted_by_usage_endpoint with a clear hint, while still returning local profile health.summary, formatted_profiles, and suggested_user_message for cleaner slash-command formatting./codex_usage (single line per profile):
🟢 \%profile%` — 5h %5h_left% | week %week_left% | r5 %5h_reset% | rw %week_reset%`🟠 when limited and 🔴 when unusable/auth-invalid.openclaw models auth ... / openclaw models auth order ...) with mandatory preflight + verify.codex_auth.py status --profile <profile> remains useful for per-profile helper status checks.