Guide
OpenClaw + Codex Pro: Bring Your ChatGPT Codex Subscription
ChatGPT Codex Pro is OpenAI's premium coding-agent subscription. This guide shows how to point an OpenClaw deployment at your Codex Pro account so your agent reuses those credits instead of paying per-token API rates.
What Is Codex Pro?
Codex Pro is OpenAI's subscription tier for the Codex CLI coding agent and ChatGPT's code workspace. Subscribers get priority access to the flagship Codex coding models, generous monthly limits, and the ability to authenticate via OAuth (instead of paying per-token via the standard OpenAI API).
Why OpenClaw + Codex Pro?
- You're already paying for Codex Pro — reuse those credits for a deployed agent
- Codex models are tuned for coding, file editing, and shell work
- OpenClaw can route coding-heavy tasks through Codex while keeping chat/persona on a different model
- Avoid double-paying for API calls when your subscription covers it
How OpenClaw Routes to Codex
OpenClaw exposes a model family of the form openai-codex/*. When you pick one of these models, OpenClaw routes the request through a Codex-compatible proxy (OpenCode-Go internally) that handles OAuth-style auth instead of API keys. This lets your Codex Pro subscription serve OpenClaw workloads.
Option 1: OpenClaw Launch with Codex Pro (Easiest)
- Deploy an OpenClaw instance from openclawlaunch.com.
- Open dashboard → API Keys.
- Click Sign in with ChatGPT and complete the OAuth device-code flow with your Codex Pro account.
- Pick a model under the Codex group (e.g.
openai-codex/gpt-5.3-codex). - Your container runs on your Codex Pro subscription. Token cost: $0 incremental.
Option 2: Self-Hosted with Codex Auth
Codex auth state lives at /home/node/.openclaw/.codex/auth.json inside the container. To self-host:
# Run the Codex CLI device-pair flow once
docker exec -it <your-openclaw> codex login
# Then in openclaw.json:
{
"agents": {
"defaults": {
"model": {
"primary": "openai-codex/gpt-5.3-codex"
}
}
}
}When to Use Codex Pro Routing
| Workload | Recommended | Why |
|---|---|---|
| Heavy coding / file editing | openai-codex/* | Codex models are coding-tuned; subscription covers cost |
| General customer chat | Claude Sonnet 4.6 or GPT-5.5 | Better conversational quality; Codex Pro overkill |
| Image generation requests | GPT-5.4 image / nano-banana | Codex doesn't generate images |
| Tool-heavy agent flows | Claude Sonnet 4.6 or Codex | Either works; pick based on subscription mix |
Hybrid Routing: Codex for Code, Claude for Chat
You don't have to pick one. Use a multi-model setup: primary Claude Sonnet for chat, and route any request that mentions edit, code, or file to openai-codex/* via a custom skill. This keeps your bot conversational on cheap chat tokens and burns Codex Pro credit only when it matters.
Codex Pro vs OpenAI API
| Codex Pro Subscription | Direct OpenAI API | |
|---|---|---|
| Auth | OAuth device-code flow | API key |
| Pricing model | Flat monthly subscription | Per-token |
| Best for | Heavy coding workloads | Variable / production workloads |
| OpenClaw model prefix | openai-codex/* | openai/* |
Switching at Runtime
/model openai-codex/gpt-5.3-codex # use Codex Pro credit
/model anthropic/claude-sonnet-4.6 # fallback to Claude API
/model openai/gpt-5.5 # standard OpenAI APIWhat's Next?
- OpenClaw + Codex — the full Codex integration guide
- OpenClaw + ChatGPT Subscription — ChatGPT Plus / Team routing
- OpenClaw + OpenAI — standard OpenAI API setup
- Hermes + ChatGPT Subscription — same flow for Hermes Agent
- OpenClaw vs OpenCode — coding-agent comparison