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

1
2
3
npm install -g @openai/codex
codex --version
codex

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

NeedModelStatus
Hard coding, computer use, knowledge work, and researchgpt-5.6-solGenerally available on paid Codex plans
Balanced everyday codinggpt-5.6-terraGenerally available; Free and Go Codex access
Fast, cost-efficient workgpt-5.6-lunaGenerally available on paid Codex plans
Faster, lower-cost routine tasks or subagentsgpt-5.4-miniActive
Near-instant coding iterationgpt-5.3-codex-sparkPro research preview
Old ChatGPT-authenticated configurationgpt-5.2, gpt-5.3-codexDeprecated; migrate

Set the local default in ~/.codex/config.toml:

1
model = "gpt-5.6-terra"

Choose temporarily:

1
codex -m gpt-5.6-sol

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:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Repository guidance

## Commands
- Install: `bun install`
- Test: `bun test`
- Build: `bun run build`

## Change rules
- Keep patches scoped to the requested feature.
- Do not add dependencies without approval.
- Never commit secrets or generated credentials.

## Verification
- Run the focused test first.
- Run the build before handoff.
- Report any skipped checks and why.

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:

PlanPublic starting priceCodex context
Free$0/monthQuick coding tasks
Go$8/monthLightweight coding tasks
Plus$20/monthGPT-5.6 Sol, Terra, and Luna; max and ultra effort
ProFrom $100/monthHigher limits plus GPT-5.6 choices and Codex Spark research preview
Business$20/user/month annuallyDedicated workspace and administrative controls
Enterprise/EduContact salesAdvanced governance and monitoring
API keyUsage basedLocal 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

ModelProviderStatusContextInput priceOutput priceCoding signalTool-use signalBenchmark evidenceSpeedVerdictSourcesChecked
GPT-5.6 SolOpenAIactive
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 / 1MArtificial 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.
  • Artificial Analysis Intelligence Index: 59 at max effort (independent)
  • Artificial Analysis Coding Agent Index: 80 at max effort (independent)
  • SWE-bench Pro: 64.6% (vendor)
  • AIHackers repo eval: not-run (site-owned)
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 card2026-08-01
GPT-5.6 TerraOpenAIactive
Generally available through ChatGPT Work, Codex including Free and Go, and the OpenAI API.
1.05M$2.00 / 1M$12.00 / 1MArtificial 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.
  • Artificial Analysis Intelligence Index: 55 at max effort (independent)
  • Artificial Analysis Coding Agent Index: 77 at max effort (independent)
  • SWE-bench Pro: 63.4% (vendor)
  • AIHackers repo eval: not-run (site-owned)
not verifiedGenerally 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 card2026-08-01
GPT-5.6 LunaOpenAIactive
Generally available through paid ChatGPT Work/Codex plans and the OpenAI API.
1.05M$0.20 / 1M$1.20 / 1MArtificial 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.
  • Artificial Analysis Intelligence Index: 51 at max effort (independent)
  • Artificial Analysis Coding Agent Index: 75 at max effort (independent)
  • BenchLM coding rank: #6/129; overall Estimated (independent aggregator)
  • SWE-bench Pro: 62.7% (vendor)
  • AIHackers repo eval: not-run (site-owned)
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 card2026-08-01
GPT-5.5OpenAIactive
Generally available prior-generation OpenAI model retained for existing integrations and comparisons.
1.05M API; 400K Codex$5.00 / 1M$30.00 / 1Mnot verifiednot verifiednot verifiednot verifiedPrimary 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 dataset2026-06-28
Claude Opus 4.8Anthropichistorical
Still available, but superseded by Opus 5 for current premium comparisons.
1M$5.00 / 1M$25.00 / 1MHistorical 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 Intelligence Index v4.1: 56 (independent)
  • Artificial Analysis output speed: 57.3 tokens/s (independent)
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 Leaderboard2026-07-25
GLM-5.2Z.AIactive
Current Z.AI flagship coding model and supported-tool value lane.
1M$1.40 / 1M$4.40 / 1MZ.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 Intelligence Index v4.1: 51 (independent)
  • SWE-Bench Pro: 62.1 (vendor)
  • Terminal-Bench 2.1: 81.0 (vendor)
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 Leaderboard2026-06-28
Kimi K2.7 CodeMoonshot AIactive
Cheaper routine Kimi coding API lane; HighSpeed is the same model at higher token prices.
256K$0.95 / 1M$4.00 / 1MKimi 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.
  • Program-Bench improvement vs K2.6: +10.4% (vendor)
  • MCP Mark Verified improvement vs K2.6: +11.4% (vendor)
  • SWE Marathon improvement vs K2.6: +76.2% (vendor)
  • Reasoning-token use vs K2.6: 30% lower (vendor)
  • AIHackers repo eval: not verified (site-owned)
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 Leaderboard2026-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:

1
rg 'gpt-5\.2|gpt-5\.3-codex' ~/.codex . --glob '*.toml' --glob '*.json' --glob '*.md'

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


Last verified: August 20, 2026. Plans, models, defaults, limits, prices, and account behavior can change independently.