Codex
OpenAI's coding agent, available as an open-source CLI, an IDE extension, in the ChatGPT desktop app and as a cloud agent.
- Best for
- Delegating coding tasks to an agent
- Pricing
- Included in ChatGPT plans; or API key
- Licence
- Apache-2.0 (CLI); service proprietary
- Site
- openai.com ↗
What it is
Codex is OpenAI’s AI agent for writing, reviewing and running code. It started in 2025 as a terminal tool and a separate cloud agent, and has since become one product that you can reach from several places:
- Codex CLI. A coding agent that runs in your terminal, inspects your repository, edits files and runs the tools installed on your machine. It also has a non-interactive mode,
codex exec, for scripts and CI. - The IDE extension. Codex inside VS Code and editors based on it, such as Cursor and Windsurf.
- The ChatGPT desktop app. On macOS and Windows, Codex sits alongside ChatGPT’s chat and work features, with a workspace for running several tasks in parallel. The older standalone Codex app has been folded into it.
- Codex Cloud. A cloud agent at chatgpt.com/codex that works on your repository in a hosted environment, plus integrations such as automatic code review on GitHub and a Slack integration.
The CLI is open source under the Apache 2.0 licence and developed in the openai/codex repository on GitHub. The models and the cloud service are proprietary. The CLI, IDE extension and desktop app share one config.toml configuration file, and an AGENTS.md file in your repository gives Codex project-specific instructions.
At the time of writing the default models for ChatGPT sign-in are GPT-6.1 Sol on paid plans and GPT-6 Luna on the free tiers, with older GPT-5 models being retired. Model names change often, so check OpenAI’s documentation for the current list.
Where it fits in AI-driven worlds
Codex is a development tool. For game and simulation work it is useful in a few distinct ways:
- Prototyping in the terminal. Point it at a fresh folder and ask for a playable prototype of a mechanic in Phaser or Three.js, then iterate on it in the same session.
- Parallel, delegated work. The cloud agent and the desktop app suit tasks you can hand off and review later, such as “add save and load to the inventory system” or “write tests for the pathfinding module”, while you work on something else.
- Code review. The
/reviewcommand and the GitHub review integration give a second opinion on changes before you merge, which helps on a solo project with no one else to review. - Automation.
codex execcan run in a CI pipeline, for example to regenerate data tables from a design spreadsheet or to check that content files follow a schema. - Local models. The CLI can be configured to use other model providers, and tools such as Ollama and LM Studio document how to connect it to a local model, which is useful for offline experiments.
Strengths
- Open-source CLI. Apache 2.0, so you can read how the agent works, contribute fixes and build on it.
- One product, many surfaces. Start a task in the terminal, hand it to the cloud, and review it in the desktop app or on GitHub.
- Included with ChatGPT. If you already pay for ChatGPT, Codex usage is part of the plan rather than a separate bill.
- Clear permission controls. Sandboxing and approval modes, set with
/permissions, decide when it can edit files or run commands without asking. - Scriptable. Non-interactive mode and an SDK make it practical to build Codex into your own tooling.
Limits
- Plan tiers matter. Free and Go plans get limited access, mainly in the desktop app; the CLI, IDE extension, cloud tasks and integrations need Plus or above. Signing in with an API key gives the CLI and IDE extension but none of the cloud features.
- Usage limits. Subscription plans have caps that long agentic sessions can reach. Extra usage is available through credits.
- Model churn. Models are retired from Codex on a fixed schedule, so saved configurations and scripts that name a model need updating.
- Review everything. Like any coding agent, it can produce code that compiles but plays wrong. Commit before each task so you can roll back.
- The service is not open. The CLI is open source, but the default models and cloud features are OpenAI’s hosted, proprietary service.
Getting started
On macOS or Linux, install the CLI with the standalone installer:
curl -fsSL https://chatgpt.com/codex/install.sh | sh
On Windows, from PowerShell:
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
You can also use npm (npm install -g @openai/codex) or Homebrew (brew install --cask codex). Then, from your project folder:
codex
Choose “Sign in with ChatGPT” on first run, run /init to create an AGENTS.md file, and start with a small request such as “Tell me about this project”.
Verdict
Codex is a capable coding agent with an open-source CLI and a good path from terminal work to delegated cloud tasks. It makes most sense if you already have a ChatGPT plan, and its review and automation features are useful on small teams. As with any coding agent, keep changes small and read the diffs.
