← Home

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)

  1. Deploy an OpenClaw instance from openclawlaunch.com.
  2. Open dashboardAPI Keys.
  3. Click Sign in with ChatGPT and complete the OAuth device-code flow with your Codex Pro account.
  4. Pick a model under the Codex group (e.g. openai-codex/gpt-5.3-codex).
  5. 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

WorkloadRecommendedWhy
Heavy coding / file editingopenai-codex/*Codex models are coding-tuned; subscription covers cost
General customer chatClaude Sonnet 4.6 or GPT-5.5Better conversational quality; Codex Pro overkill
Image generation requestsGPT-5.4 image / nano-bananaCodex doesn't generate images
Tool-heavy agent flowsClaude Sonnet 4.6 or CodexEither 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 SubscriptionDirect OpenAI API
AuthOAuth device-code flowAPI key
Pricing modelFlat monthly subscriptionPer-token
Best forHeavy coding workloadsVariable / production workloads
OpenClaw model prefixopenai-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 API

What's Next?

Deploy with Codex Pro

Bring your ChatGPT Codex Pro subscription into a managed OpenClaw agent.

Deploy Now