OpenAI Codex is a coding agent available through the CLI, IDE extension, app, and cloud workflows. GPT-5.6 Sol, Terra, and Luna have been generally available in Codex since July 9.
GPT-5.2 and GPT-5.3-Codex are deprecated for ChatGPT-authenticated Codex sessions. Choose the GPT-5.6 tier and effort level that fit the task rather than treating GPT-5.5 as a required baseline.
Install
| |
Codex can authenticate with ChatGPT or an API key:
- ChatGPT authentication includes Codex according to the user’s Free, Go, Plus, Pro, Business, Edu, or Enterprise plan.
- API-key authentication uses models available to that API key and API token billing.
- API-key authentication does not provide Codex cloud features such as hosted code review or Slack integration.
Do not hard-code an expected CLI version in an evergreen setup guide. Verify the installed version and current release notes.
Current Model Selection
| Need | Model | Status |
|---|---|---|
| Hard coding, computer use, knowledge work, and research | gpt-5.6-sol | Generally available on paid Codex plans |
| Balanced everyday coding | gpt-5.6-terra | Generally available; Free and Go Codex access |
| Fast, cost-efficient work | gpt-5.6-luna | Generally available on paid Codex plans |
| Faster, lower-cost routine tasks or subagents | gpt-5.4-mini | Active |
| Near-instant coding iteration | gpt-5.3-codex-spark | Pro research preview |
| Old ChatGPT-authenticated configuration | gpt-5.2, gpt-5.3-codex | Deprecated; migrate |
Set the local default in ~/.codex/config.toml:
| |
Choose temporarily:
| |
Or use /model in the CLI and the model selector in the IDE extension. Codex cloud tasks currently do not expose a user-selectable default model.
Use the GPT-5.6 guide for current ChatGPT, Codex, and API access, pricing, and system-card status. The Sol preview investigation is retained as June history.
AGENTS.md
AGENTS.md is Markdown guidance, not an invented YAML agent registry. Put repository conventions, commands, boundaries, and verification requirements in the repository root:
| |
Closer nested AGENTS.md files can provide subtree-specific instructions. Model, provider, approval, and sandbox defaults belong in Codex configuration, while task-specific constraints belong in the prompt.
Approvals and Sandbox
Start with the narrowest permissions that allow the task:
- keep production credentials out of the agent environment;
- require approval for network access, destructive commands, or writes outside the workspace;
- use clean worktrees for isolated feature work;
- review the diff and tests instead of trusting the final summary;
- record any escalated command and its purpose.
These controls are especially important for long-running agents. OpenAI’s July 9 GPT-5.6 system card reports low-frequency simulated cases of scope expansion beyond user intent and describes confirmation and safety controls.
Local and Cloud Work
Local Codex surfaces work with the checked-out repository and the configured sandbox. Cloud tasks use a configured cloud environment and hosted execution. Check environment setup, secrets, internet access, and repository state separately for each surface.
Do not promise fixed concurrency, microVM startup time, message counts, or credit consumption unless the current official plan or account UI documents it. Limits vary by plan, task size, model, and rollout.
Plan Overview
The official June 28 pricing page lists:
| Plan | Public starting price | Codex context |
|---|---|---|
| Free | $0/month | Quick coding tasks |
| Go | $8/month | Lightweight coding tasks |
| Plus | $20/month | GPT-5.6 Sol, Terra, and Luna; max and ultra effort |
| Pro | From $100/month | Higher limits plus GPT-5.6 choices and Codex Spark research preview |
| Business | $20/user/month annually | Dedicated workspace and administrative controls |
| Enterprise/Edu | Contact sales | Advanced governance and monitoring |
| API key | Usage based | Local CLI/SDK/IDE; no cloud integrations |
Plans, regional pricing, credits, and limits can change. Use the official pricing page and signed-in account as final authority.
Usage limits and resets
Current OpenAI pricing documents shared five-hour windows and possible weekly limits, while current account reports show weekly-only displays. No first-party deprecation or completed-restoration notice resolves the difference. Model choice, reasoning effort, context, tool calls, searches, caching, retries, and subagents can change how quickly a task consumes the active allowance.
Check the signed-in usage dashboard and /status before purchasing overflow. Some historical or supported clients also expose /usage. Keep these paths separate:
- scheduled recovery ends the current allowance window;
- provider-wide or incident resets refresh the named group;
- banked resets are expiring, eligible user-controlled grants;
- purchased full resets are an account-scoped rollout reported at $8 on some Plus accounts and $80 on some Pro 20x accounts; redemption is reported to start a new seven-day window rather than stack a bonus week; and
- purchased credits fund supported work after included limits without a documented counter refill.
The paid-reset prices and availability are community-observed, not universal OpenAI terms. Pro 5x, Business, eligibility, refund behavior, and future prices remain unresolved.
Read AI Subscription Capacity Is Perishable for the scheduling rule, the reset chronology for dated scope, and the cost-saving playbook before choosing between waiting, a displayed reset, credits, or another route.
Current Model Evidence
benchmark artifact
Codex Model Context and Alternatives
| Model | Provider | Status | Context | Input price | Output price | Coding signal | Tool-use signal | Benchmark evidence | Speed | Verdict | Sources | Checked |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| GPT-5.6 Sol | OpenAI | active Generally available through ChatGPT paid plans, Codex paid plans, and the OpenAI API; plan and effort options vary. | 1.05M | $5.00 / 1M | $30.00 / 1M | Artificial Analysis reports 80 on its Coding Agent Index at max effort; OpenAI reports 64.6% on SWE-bench Pro. | Generally available in API and paid Codex plans; max and ultra modes are vendor-documented. |
| OpenAI announced a selected-customer Cerebras preview for July; production latency is not verified. | Generally available flagship; test on real tasks and apply stronger controls for agentic or cyber work. | OpenAI GPT-5.6 general availability [archive], OpenAI API pricing [archive], Artificial Analysis GPT-5.6 evaluation [archive], Agent Arena leaderboard, OpenAI GPT-5.6 availability [archive], OpenAI GPT-5.6 system card | 2026-08-01 |
| GPT-5.6 Terra | OpenAI | active Generally available through ChatGPT Work, Codex including Free and Go, and the OpenAI API. | 1.05M | $2.00 / 1M | $12.00 / 1M | Artificial Analysis reports 77 on its Coding Agent Index at max effort; OpenAI reports 63.4% on SWE-bench Pro. | Generally available in API and Codex, including the Free and Go Codex lane. |
| not verified | Generally available balanced lane; compare accepted-task cost with Sol, Luna, and other providers. | OpenAI GPT-5.6 general availability [archive], OpenAI GPT-5.6 price update [archive], OpenAI API pricing [archive], Artificial Analysis GPT-5.6 evaluation [archive], Agent Arena leaderboard, OpenAI GPT-5.6 availability [archive], OpenAI GPT-5.6 system card | 2026-08-01 |
| GPT-5.6 Luna | OpenAI | active Generally available through paid ChatGPT Work/Codex plans and the OpenAI API. | 1.05M | $0.20 / 1M | $1.20 / 1M | Artificial Analysis reports 75 on its Coding Agent Index at max effort; BenchLM ranks Luna #6/129 in coding with an Estimated overall position. | Generally available in API and paid Codex plans. |
| Vendor-positioned as fastest; measured production latency is not verified. | Generally available lowest-cost GPT-5.6 tier; verify quality and cost per accepted task. | OpenAI GPT-5.6 general availability [archive], OpenAI GPT-5.6 price update [archive], OpenAI API pricing [archive], OpenAI GPT-5.6 Luna model page [archive], Artificial Analysis GPT-5.6 evaluation [archive], Agent Arena leaderboard, BenchLM GPT-5.6 Luna profile [archive], OpenAI GPT-5.6 availability [archive], OpenAI GPT-5.6 system card | 2026-08-01 |
| GPT-5.5 | OpenAI | active Generally available prior-generation OpenAI model retained for existing integrations and comparisons. | 1.05M API; 400K Codex | $5.00 / 1M | $30.00 / 1M | not verified | not verified | not verified | not verified | Primary coding seat while ChatGPT/Codex limits fit the workload. | OpenAI GPT-5.5 API model page, OpenAI GPT-5.5 ChatGPT limits, Artificial Analysis: GPT-5.5, LMArena leaderboard dataset | 2026-06-28 |
| Claude Opus 4.8 | Anthropic | historical Still available, but superseded by Opus 5 for current premium comparisons. | 1M | $5.00 / 1M | $25.00 / 1M | Historical premium Claude baseline; use Opus 5 for new task-level comparisons. | Still available for pinned integrations; new Claude premium routing should test Opus 5. |
| Artificial Analysis measured 57.3 output tokens/s; provider and workload latency vary. | Historical premium baseline. Use Claude Opus 5 for current Claude premium routing. | Claude models overview [archive], Claude API pricing [archive], Artificial Analysis: Claude Opus 4.8 [archive], Artificial Analysis Intelligence Index v4.1, LMArena leaderboard dataset, Berkeley Function Calling Leaderboard | 2026-07-25 |
| GLM-5.2 | Z.AI | active Current Z.AI flagship coding model and supported-tool value lane. | 1M | $1.40 / 1M | $4.40 / 1M | Z.AI reports 62.1 on SWE-Bench Pro and 81.0 on Terminal-Bench 2.1. | Supported-tool coding lane; BFCL score not imported. |
| Artificial Analysis flags higher output-token use; measure total cost per successful task. | July value pick to test for supported coding-tool workflows; keep Opus/GPT for final arbitration until local evals pass. | Z.AI GLM-5.2 overview [archive], Z.AI pricing [archive], Artificial Analysis: GLM-5.2 article [archive], Artificial Analysis Intelligence Index v4.1, SWE-bench, Berkeley Function Calling Leaderboard | 2026-06-28 |
| Kimi K2.7 Code | Moonshot AI | active Cheaper routine Kimi coding API lane; HighSpeed is the same model at higher token prices. | 256K | $0.95 / 1M | $4.00 / 1M | Kimi K2.7 Code remains the lower-cost 256K coding lane after K3; independent normalized benchmarks are not imported. | OpenAI-compatible API; thinking mode required in the documented K2.7 Code quickstart. |
| HighSpeed model ID exists at a higher token price; latency not independently measured here. | Cheaper routine Kimi coding API lane when Kimi routing fits and 256K context is enough. | Kimi K2.7 Code quickstart [archive], Kimi K2.7 Code pricing [archive], Kimi Code K2.7 release notes [archive], SWE-bench, Berkeley Function Calling Leaderboard | 2026-06-28 |
GPT-5.6 is generally available in Codex. Benchmark rows remain source-labeled evidence, not a substitute for repository tests.
Benchmarks do not evaluate the entire Codex product. Measure accepted patches, tests, retries, wall-clock time, and review effort in the actual sandbox and repository.
Migration From Old Configurations
Search configuration and scripts for deprecated models:
| |
For ChatGPT-authenticated Codex, replace active deprecated defaults with a GPT-5.6 tier available to the account and suited to the workload. Leave historical articles and fixed eval baselines unchanged.
Sources
- OpenAI Codex manual: Overview, models (Archive), pricing (Archive), and configuration
- OpenAI: GPT-5.6 general availability
- OpenAI: GPT-5.6 System Card
- Community paid-reset observations: $8 Plus, $80 Pro 20x and shifted recovery, and uneven rollout
Related links
- /models/gpt-5-6/
- /posts/prompt-caching-agent-token-costs/
- /posts/ai-usage-limits-use-it-or-lose-it/
- /posts/codex-banked-resets-gpt-5-6-preview/
- /posts/openai-exploitgym-hugging-face-breach/
- /compare/codex-vs-claude-vs-kimi/
- /compare/codex-vs-claude-vs-cursor/
- /risks/codex/cloud-dependency-risks/
- /agents-md/
- /value/llm-cost-saving-playbook/
Last verified: August 20, 2026. Plans, models, defaults, limits, prices, and account behavior can change independently.