
Codex: OpenAI's programming agent
Codex is OpenAI's programming agent: CLI, IDE, app and cloud. What it does, which ChatGPT plans include it, how it uses AGENTS.md and when to use it.
What is Codex and where is it used?
Codex is an agent designed for programming, although the official documentation also presents it for other kinds of work: you start with a goal or a task, and ChatGPT gathers context, acts and delivers a result. The surfaces the documentation lists are: the ChatGPT desktop app, mobile app and web; the Codex CLI; the IDE extension; and Codex Cloud, with cloud environments.
The documentation also lists features such as AGENTS.md for configuring the agent, MCP for connecting external tools, git worktrees in local environments, subagents, plugins, skills and hooks. If you know these concepts from other tools, see MCP, subagents and skills. The list is broad; what matters is knowing which ones you will use in your workflow.
How do you install it and sign in?
The Codex CLI runs on your computer and is open source: the openai/codex repository on GitHub declares the Apache-2.0 license. According to its README, you install it with one of these options:
- macOS and Linux:
curl -fsSL https://chatgpt.com/codex/install.sh | sh - Windows: a PowerShell command given in the README
- npm:
npm install -g @openai/codex - Homebrew:
brew install --cask codex
Then you run codex in your project folder. To sign in, the README recommends using your ChatGPT account if you have a Plus, Pro, Business, Edu or Enterprise plan. An API key is also supported, which needs extra setup described in the developer documentation.
How does Codex use the AGENTS.md file?
An AGENTS.md is a file of standing instructions for the agent. According to the official guide, Codex builds its instruction chain once per run, so changes take effect when you start a new session:
- Global: in Codex’s configuration folder (
~/.codexby default) it usesAGENTS.override.mdif it exists andAGENTS.mdotherwise. Only the first non-empty file counts. - Project: from the repository root down to the working directory, it checks each folder and takes at most one file per folder.
- Order: it concatenates the files from the root downward. The ones closest to the work come last in the prompt, so they override earlier guidance.
- Limit: it stops adding files once the combined size reaches 32 KiB (
project_doc_max_bytes). If guidance gets cut off, raise the limit or split instructions across nested folders.
The guide suggests putting working agreements there (which test commands or package manager to use), steps before opening a pull request, and rules specific to a team or service. As with other agents, a well-written AGENTS.md reduces repeated decisions. For the format and writing criteria, see CLAUDE.md and AGENTS.md.
Which plans include it?
According to Codex’s official pricing page, checked on October 19, 2026, Codex is included in the ChatGPT Free, Go, Plus, Pro, Business, Edu and Enterprise plans:
| Plan | Monthly price (USD) | What the page says about Codex |
|---|---|---|
| Free | 0 | Quick coding tasks |
| Go | 8 | Lightweight coding tasks |
| Plus | 20 | Web, CLI, IDE extension and iOS; cloud integrations |
| Pro | From 100 (plans at 100, 200 and 500) | Everything in Plus; the 500 plan adds Ultrafast mode |
| Business | 20 per user with annual billing for 2 or more users; 25 if billed monthly | Desktop and mobile, with SAML SSO and MFA |
| Enterprise and Edu | Contact sales | Everything in Business, plus priority processing, SCIM, RBAC and retention and residency controls |
Usage limits are estimates of local messages per five-hour period for Plus and standard Business, with possible weekly limits, and they vary a lot with the model you pick. The page says Pro currently has no five-hour limit. Because Codex’s models, plans and prices change often, confirm the page before you decide. If you use an API key, usage is billed at standard API rates, separate from any subscription, and cloud features such as GitHub review or Slack are not included.
Why does it matter to a designer?
Because it gives you another way to turn a design into code inside your project. If you already use an agent for agent tasks or work with Claude Code, Codex is one more option to compare on the same case: the same prototype, the same repo, two tools. That teaches you more about what your work needs than reading any comparison. What makes the difference is usually the instructions file, not the agent’s brand.
When should you NOT use Codex?
- When you need cloud features and only have API-key access. Those features are not included.
- When your team already has a solid workflow with another agent. Switching without a concrete reason creates friction.
- When you have no version-controlled repo. Without git, reviewing changes is harder.
- When your plan’s usage limits do not cover your long sessions. Check the plan before relying on it for a delivery.
Example
Illustrative example: a designer has a repo with a component system and an AGENTS.md that says to use the tokens in tokens.json. They want to compare tools: they ask Codex for a settings screen in the IDE extension and another agent for the same screen. They review both diffs against the design and note which tokens each one respected, what it invented and how much spacing they had to fix by hand. Then they update the AGENTS.md with the rules the agent skipped and repeat the test.
What they learn: the comparison says more about your project than any review, and the AGENTS.md rules weigh as much as the tool.
Common mistakes
- Choosing a plan by price without checking whether it includes what you will use.
- Assuming the API and the ChatGPT plan offer exactly the same thing.
- Leaving AGENTS.md without rules and expecting the agent to know your system.
- Writing an AGENTS.md so long that it passes the 32 KiB limit and gets cut off.
- Accepting a large change without reviewing it in parts.
- Using the same session for different tasks and mixing contexts.