Codex Adapter
Available since v7.62.0
-c overrides and environment variable injection. The ccsxp shortcut also self-heals the native Codex provider entry needed for the CLIProxy Codex pool.
Quick Start
How It Works
For ordinaryccsx / ccs-codex launches, the Codex adapter uses transient runtime credential injection:
- Default profiles pass through unchanged — uses native Codex auth/config
- CCS-backed profiles inject credentials via temporary
-coverrides - API keys are delivered through
CCS_CODEX_API_KEYenv var, not written to disk - Profile and variant configs may persist
target: codexfor default routing - The Codex binary is probed for
--configsupport before attempting overrides
ccsxp, CCS intentionally uses the native Codex model_provider="cliproxy" path. Before launching, CCS repairs the active Codex config.toml only as far as needed to ensure [model_providers.cliproxy] points at the local CLIProxy Codex bridge:
cliproxy provider already exists with a custom env_key, CCS preserves that key and injects the managed token under the same environment variable for the spawned Codex process. Users should not need to add CLIPROXY_API_KEY to their shell profile after updating CCS.
Target Resolution Priority
CCS resolves the target CLI in this order:API profiles and CLIProxy variants can persist
target: codex in config. Use --target codex for one-off launches and persisted targets for profiles that should default to Codex.Built-in Aliases
Custom Aliases
Supported Profile Types
Codex is intentionally narrower than Claude or Droid in which profile types it accepts:Model Aliases (Reasoning + Service Tier)
Codex models accept trailing tuning suffixes that CCS translates into the underlyingreasoning_effort and service_tier fields:
Combine in either order:
--thinking for cross-provider control; use suffix aliases when you need
to pin a model identity (e.g., in saved profiles or API payloads).
Environment Variables
Native Codex Auth Profiles
ccsx auth manages native Codex account profiles under ~/.ccs/codex-instances/.
After creating a profile, launch it directly by name:
ccsx <name> resolves <name> from the Codex profile registry before normal
CCS profile resolution, so Codex profiles stay separate from Claude account
profiles. ccsxp is intentionally separate from ccsx auth; it ignores
CCS_CODEX_PROFILE and keeps using its CLIProxy Codex pool behavior.
Each ccsx auth profile keeps its own auth.json, history, and sessions. Native
Codex resources stay shared from ~/.codex: config.toml, agents/, skills/,
and plugins/cache/.
plugins/ directory remains
local and may hold profile-specific plugin metadata. ccsx auth create <name> and
direct ccsx <name> launches repair the shared links idempotently before Codex starts.
This keeps relative entries such as agents/reviewer.toml valid and prevents stale
first-launch skill warnings after plugin installs or updates.
On Windows, symlinks may require Developer Mode or elevated privileges. When a cache
symlink is unavailable, CCS copies the current
~/.codex/plugins/cache/ snapshot into
the profile. Later plugin updates may require another profile launch or
ccsx auth create <name> --force repair to copy newly missing entries; existing
profile-local cache files are preserved.ccsx from your home directory, native Codex may also report that
~/.codex/config.toml contains user-level-only keys such as model_providers or
notify in a project-local config. That warning comes from Codex’s current
working directory config discovery, not from ccsx auth profile selection.
Dashboard: Codex Page
The dashboard includes a dedicated Codex page atccs config -> Sidebar -> Compatible -> Codex CLI, with three tabs:
Overview Tab
- Binary detection — shows whether Codex CLI is installed and its path
- Config file status — checks
~/.codex/config.tomlexistence and validity - Supported flows table — which profile types work with Codex target
- Quick command snippets — copy-paste starters for common Codex commands
Control Center Tab
Guided editor for the user-layer Codex config (~/.codex/config.toml):
- Top-level settings — model defaults, history, instructions
- Project trust — trusted directory paths (validated as absolute or
~/...) - Profiles — named configuration profiles
- Model providers — custom provider endpoints
- MCP servers — Model Context Protocol server configuration
- Feature flags — toggle experimental features (reset to Codex defaults available)
The Control Center edits only the user config layer. The effective runtime config may differ due to trusted repo layers, CCS transient overrides (
-c flags, CCS_CODEX_API_KEY), and the ccsxp managed model_providers.cliproxy repair.Docs Tab
- Upstream Codex documentation links
- CLIProxy provider setup guidance
- CCS Codex adapter reference
Security
- No persisted credentials — API keys are injected into the spawned Codex process, not written to
~/.codex/config.toml - Scoped provider repair —
ccsxpmay create or repair[model_providers.cliproxy], but does not store the API key there - Process-scoped keys —
CCS_CODEX_API_KEYexists only in the spawned process environment - Anthropic env stripping — CCS removes stale
ANTHROPIC_*env vars before spawning Codex - Binary validation — Codex binary is probed for capability before credential injection
Usage Examples
ccsxp is an opinionated shortcut equivalent to native Codex using CCS’s CLIProxy Codex pool. It strips any user-supplied --target flags, repairs the native cliproxy provider entry when needed, and injects the managed token into the provider’s configured env_key. By default, ccsxp pins CODEX_HOME to native ~/.codex so history and resume state stay with regular Codex sessions. Set CCSXP_CODEX_HOME only when you intentionally want a separate ccsxp history root.Related
- Codex Provider — OAuth authentication and model configuration
- Droid Adapter — Alternative CLI target (Factory Droid)
- Dashboard — Visual configuration interface
- Target Architecture — Technical details of the adapter system
