OpenAI (Codex OAuth)
Codex OAuth uses Rho-owned OAuth and signs in with an OpenAI account subscription rather than an API key. For shared concepts such as credential storage and model selection, see authentication and models.
At a glance
| Setting | Value |
|---|---|
| Provider | openai-codex |
| Auth | codex |
| Environment override | CODEX_ACCESS_TOKEN |
| API base | https://chatgpt.com/backend-api/codex |
| Model list | Static allowlist maintained by Rho |
Sign in
/login openai-codex/login openai-codex starts Rho's browser-based Codex OAuth flow. For remote or headless sessions where a browser is not available, use the device-code flow:
rho login openai-codex --device-authCredentials are stored in the configured credential store, not in config or transcripts.
Device-code authorization
Device-code access is managed by OpenAI. See Codex authentication for current setup and troubleshooting guidance. If device-code login is unavailable for the account or managed workspace, use the regular browser callback instead:
rho login openai-codexSign out
/logout openai-codex/logout openai-codex deletes stored Codex tokens. If an environment override is still present, the provider stays available.
Environment override
CODEX_ACCESS_TOKEN=...
CODEX_ACCOUNT_ID=... # optional for CodexEnvironment variables are CI/development escape hatches and override stored credentials. For normal interactive setup, prefer /login.
Models
Codex OAuth uses this static model allowlist rather than a refreshable API list:
gpt-5.6-solgpt-5.6-terragpt-5.6-lunagpt-5.5gpt-5.4gpt-5.4-minigpt-5.3-codex-spark
Switch to a Codex model with:
/model openai-codex/gpt-5.6-solFor a non-interactive run, pass the matching provider, auth mode, and model. These flags also update the persistent default:
rho --provider openai-codex --auth codex --model gpt-5.6-sol run "hello"Run rho login openai-codex first or provide CODEX_ACCESS_TOKEN in the automation environment.
Supported GPT-5.4, GPT-5.5, and GPT-5.6 Codex models can use OpenAI's faster priority tier at a higher credit rate. In the TUI, use /fast on or /fast off. Running /fast with no argument toggles the mode. Rho saves the choice as model.fast_mode, shows (fast) after the active model name, and sends service_tier: "priority" on later supported Codex turns.
Notes
- As a subscription auth mode, the statusline estimates an equivalent API cost from models.dev pricing (including long-context rate tiers when available) and labels it
(sub). /limitsreports the usage windows for Codex OAuth when you are logged in.- Pricing-sensitive models such as
openai-codex/gpt-5.6-soluse safer effective context windows below their advertised maximums to avoid long-context pricing thresholds.