Codex Provider
Access OpenAI Codex models through browser-based OAuth authentication. CCS keeps startup safe for free Codex plans by default and repairs known paid-only defaults when the active account cannot use them.Overview
The Codex provider enables Claude Code to use OpenAI’s Codex models through OAuth authentication - no API keys required. Simply authenticate once and CCS handles token management automatically. Provider Identifier:codex
Command: ccs codex
Supported Models:
- GPT-5 Codex - cross-plan-safe default
- GPT-5 Codex Mini - cross-plan-safe fast option
- GPT-5.2 Codex, GPT-5.3 Codex, GPT-5.3 Codex Spark, and GPT-5.4 on paid Codex plans
- Interactive model picker via
--config
Plan-Aware Defaults
Available since v7.54.0
- If the active account is on the free Codex plan, CCS rewrites unsupported defaults to
gpt-5-codexorgpt-5-codex-mini - If CCS cannot verify the plan, it keeps your current model and prints a targeted warning with the safe fallback
- The repair only touches known paid-only Codex defaults (
gpt-5.3-codex,gpt-5.3-codex-spark,gpt-5.4); it does not rewrite unrelated provider settings
Authentication
First-Time Setup
- Authorization Code flow via browser callback
- Callback server spawns on provider-specific port
- Token cached locally with auto-refresh
- Proactive token refresh prevents mid-request failures
Manual Authentication
Logout
Multi-Account Support
Manage multiple OpenAI accounts for different projects:Add Account
List Accounts
Switch Account
Rename Account
~/.ccs/cliproxy/accounts.json
Auto-Nicknames: Generated from email prefix (e.g., john@gmail.com → john)
Real-Time Quota Display
CCS displays real-time quota information for Codex accounts via Dashboard and CLI.Weekly Reset Schedule
Since v7.44.0, the dashboard exposes the weekly reset schedule for Codex
accounts, showing exactly when your weekly quota resets.
Dashboard Display
Location: Dashboard → OAuth Providers → Codex Displays:- Daily message usage (e.g., “45/50 messages”)
- Weekly message usage (e.g., “210/500 messages”)
- Daily limit reset time
- Weekly limit reset time (with schedule)
- Quota data cached for 2 minutes to reduce API load
- Automatic re-authentication if token expired
- Dashboard shows cached timestamp
CLI Quota Check
- Displays all authenticated Codex accounts
- Shows cached timestamp (2-minute cache)
- Indicates if re-authentication needed
| Cache Duration | Applies To |
|---|---|
| 2 minutes | Quota data (usage counts, reset times) |
| Token refresh | Automatic if expired during fetch |
Model Information
Available Models:| Model ID | Name | Max Effort | Notes |
|---|---|---|---|
gpt-5-codex | GPT-5 Codex | high | Cross-plan-safe default |
gpt-5-codex-mini | GPT-5 Codex Mini | high | Cross-plan-safe fast option |
gpt-5.2-codex | GPT-5.2 Codex | xhigh | Paid Codex plans |
gpt-5.3-codex | GPT-5.3 Codex | xhigh | Paid Codex plans |
gpt-5.3-codex-spark | GPT-5.3 Codex Spark | xhigh | Paid Codex plans |
gpt-5.4 | GPT-5.4 | xhigh | Paid Codex plans |
gpt-5.3-codex-medium, gpt-5.3-codex-high, gpt-5.3-codex-xhigh.
Reasoning Effort
CCS automatically injects OpenAI’sreasoning.effort parameter. The configured slot requests a default effort, then CCS caps it to the selected model’s supported maximum.
Effort Levels
| Level | Description | Token Budget |
|---|---|---|
medium | Standard reasoning | Base level |
high | Deep reasoning | Moderate increase |
xhigh | Maximum depth | Up to 32K tokens |
Automatic Effort Mapping
| Source | Requested Effort | Effective Behavior |
|---|---|---|
| Default / Opus slot | xhigh | Capped by the selected model’s max supported level |
| Sonnet slot | high | Used as-is unless the model only supports lower |
| Haiku slot | medium | Used as-is |
--effort / model suffix | Explicit value | Used, then capped if the model cannot support it |
How It Works
When you use Codex, CCS derives the effort from your configuration and then applies model-specific caps:Cost Implications
Higher reasoning effort increases token consumption:xhigh: Maximum tokens, deepest analysishigh: Moderate token increasemedium: Standard token usage
Reasoning effort is injected transparently. You don’t need to configure
anything unless you want to override it. Unsupported higher efforts are capped
to the model’s max level automatically.
Trace Logging
Enable verbose mode to see reasoning effort in request logs:Runtime Targets
Available since v7.62.0
Native Codex Runtime
Useccs-codex, ccsx, or ccsxp to run the Codex provider on the native Codex CLI:
-c overrides and CCS_CODEX_API_KEY env injection — it never rewrites ~/.codex/config.toml.
See Codex Adapter for full details on
supported profile types, alias configuration, and the dashboard control center.
Droid Runtime
Use Codex with theccs-droid target for automated agent workflows:
Commands
Basic Usage
Authentication Flags
| Flag | Description |
|---|---|
--auth | Trigger OAuth flow (no session) |
--logout | Clear all tokens |
--headless | Display URL for remote auth |
--auth --add | Add new account (keep existing) |
Account Management Flags
| Flag | Description |
|---|---|
--accounts | List all accounts |
--use <nickname> | Switch default account |
--nickname <name> | Rename default account |
Storage Locations
| Path | Purpose |
|---|---|
~/.ccs/cliproxy/auth/codex-*.json | OAuth tokens (one per account) |
~/.ccs/cliproxy/accounts.json | Account registry with nicknames |
~/.ccs/codex.settings.json | Model configuration |
~/.ccs/cliproxy/config.yaml | CLIProxy unified config |
Requirements
- OpenAI account with Codex OAuth access
- Browser for OAuth (or
--headlessfor servers) - Network access to OpenAI authentication servers
Token Management
Storage Format:Troubleshooting
Browser Won’t Open
Multi-Account Issues
Token Expiry
Tokens refresh automatically. If refresh fails:Cost Information
Plan Access: Free Codex plans can use cross-plan-safe models such asgpt-5-codex and gpt-5-codex-mini. Paid Codex plans unlock paid-only model IDs such as gpt-5.2-codex, gpt-5.3-codex, and gpt-5.4.
Usage Limits: Subject to OpenAI’s rate limits and fair use policy
Next Steps
Multi-Account Setup
Manage multiple Codex accounts
Dashboard Config
Configure via web interface
