What is OpenAI Codex? The cloud agent, CLI, IDE extension and plans
OpenAI Codex is OpenAI's coding agent. It reads your code, edits files, runs commands and tests, and proposes changes you review. You can use it in the ChatGPT desktop app, in a command-line tool, in an IDE extension, on the web as a cloud agent that works on its own copy of your repository, and from your phone. As of October 2026 it is included in ChatGPT Free, Go, Plus, Pro, Business, Edu and Enterprise plans, or usable with an API key.
What is OpenAI Codex?
Codex is a software engineering agent: you give it a task in plain English, such as fix this failing test or add a settings page, and it works through the steps. It inspects the repository, makes edits, runs the commands and tests the project already has, and shows you the result to approve, adjust or discard. OpenAI describes the product in its Codex documentation as a way to build with the Codex CLI, IDE extension and cloud automation.
The useful mental model is one agent in several places. The same Codex shows up in a desktop app, a terminal, your editor, the web and a phone, and you pick the place that fits the task. This page is the overview. For the terminal tool in depth, see the Codex CLI guide.
Where can you use Codex?
| Surface | What it is | Best for | Sign-in |
|---|---|---|---|
| ChatGPT desktop app | Codex inside the ChatGPT app for macOS, Windows and Linux, with projects and long-running work | Running several tasks in parallel with your files in view | ChatGPT account or API key |
| Codex CLI | An agent in your terminal, installed with a standalone installer | Working in a local repository, scripting, CI | ChatGPT account or API key |
| IDE extension | A sidebar in VS Code, Cursor and Windsurf; also available in Xcode and JetBrains IDEs | Focused edits with your open files and selection as context | ChatGPT account or API key |
| Codex cloud | Tasks run on OpenAI's infrastructure in an environment you configure, started from web, mobile or desktop | Longer tasks that should keep running while your computer sleeps | ChatGPT account only |
| Mobile | Start, guide, approve and review tasks on a connected computer from your phone | Checking in on running work | ChatGPT account |
| Code review and Slack | Automatic code review on pull requests and a Slack integration | Team workflows | ChatGPT paid plan |
| SDK and App Server | Programmatic control of local Codex agents, and a protocol to embed Codex in a product | Building your own tooling | See the SDK docs |
Sign-in rules come from the authentication page: the desktop app, CLI and IDE extension support both ChatGPT sign-in and an API key for local work, and Codex cloud requires signing in with ChatGPT.
How does the Codex cloud agent work?
Codex cloud runs coding tasks away from your laptop. According to the Codex Cloud docs, each task has its own workspace and can keep working while your computer is asleep. You review changed files and test results, ask for follow-ups, and commit or open a pull request when you are happy.
- Open ChatGPT on the web, mobile or in the desktop app and sign in.
- Create or select an environment. On web or desktop choose Work in, then Cloud, then Select environment. An environment holds the repositories, tools and access the project needs.
- Let Codex prepare the project. Choose your GitHub repositories and connect GitHub if asked. Codex inspects them, installs dependencies and tools, and tests the workflow.
- Review and publish the environment. Check the setup and test results, save, and select Publish.
- Start a task. Describe it, send it, then review the changes and test results.
Environments can be reused across tasks, with each task keeping its own working state. You can limit the environment's network destinations and supply secrets for allowed HTTPS services. Treat those settings as the safety boundary for anything the agent can reach. You can also start cloud work from the CLI or delegate a bigger job from the IDE extension.
Which plans include Codex?
Codex is part of ChatGPT rather than a separate product. The pricing page states that ChatGPT Work and Codex are included in your Free, Go, Plus, Pro, Business, Edu or Enterprise plan, and that they share usage. Prices below are in US dollars, as of October 2026.
| Plan | Price | What the pricing page lists |
|---|---|---|
| Free | USD 0 | Quick coding tasks. GPT-6 Luna at Standard speed in the desktop app, subject to rollout |
| Go | USD 8 a month | Lightweight coding tasks. GPT-6 Luna in the desktop app, subject to rollout |
| Plus | USD 20 a month | Codex on the web, in the CLI, in the IDE extension and on iOS; cloud integrations such as automatic code review and Slack; GPT-6.1 Sol and GPT-6 Luna; credits to extend usage |
| Pro | USD 100, USD 200 or USD 500 a month | Everything in Plus with more usage; Ultrafast mode on the USD 500 plan |
| Business | USD 20 per user a month billed yearly (USD 25 billed monthly), 2 or more users | Larger virtual machines for cloud chats, admin controls, SAML SSO, no training on business data by default |
| Enterprise and Edu | Contact sales | Priority processing, SCIM, audit logs, data residency controls |
| API key | Pay by API pricing | Codex in the CLI, SDK or IDE extension only. No cloud-based features such as GitHub code review or Slack |
Model names change quickly. The pricing page lists GPT-6.1 Sol and GPT-6 Luna on the Plus card, and it announces that GPT-5.5 retires from Codex with ChatGPT sign-in on October 14, 2026, while API key sessions are not affected. Check the page for the current list before you choose a model.
How do Codex usage limits work?
Your plan gives you a usage allowance, not a fixed number of tasks. OpenAI says the number of messages depends on the model, the size and complexity of the task, and whether it runs locally or in the cloud. Small scripts use a fraction of the allowance, long-running tasks use significantly more, and tasks that look similar can cost different amounts. Prompt length alone is not a reliable estimate.
- Local messages and cloud chats share one allowance. Cloud tasks may use more of it than local messages.
- Plus and standard Business have a five-hour window and may also have weekly limits. Pro plans currently have no five-hour limit.
- Estimates, not guarantees. For Plus, OpenAI's table of local messages per five-hour period ranges widely by model, from 350 to 3,000 for GPT-6 Luna to 15 to 160 for GPT-6.1 Sol.
- Fast and Ultrafast modes burn the allowance faster. Fast uses 2.5 times the included subscription usage of Standard for the same model, and Ultrafast uses 8 times on the models that support it.
- When you run out, Plus and Pro users can buy ChatGPT credits to continue. Business, Edu and Enterprise plans with flexible pricing can buy workspace credits. Anyone can also run extra local chats on an API key at standard API rates.
- See where you stand on the usage dashboard at chatgpt.com/codex/settings/usage, or run /status in a CLI session.
A practical consequence: reserve the biggest models for the hard problem and use a smaller one for routine edits. The pricing page itself advises checking the dashboard every week or two and considering a smaller model or tighter scope if usage runs high.
How do you give Codex project instructions?
Codex reads AGENTS.md files before it does any work. Per the AGENTS.md documentation, it builds an instruction chain once per run: first a global file in your Codex home directory (by default ~/.codex), then files from the project root down to your current directory, concatenated so the ones closest to you override earlier guidance. It stops adding files once the combined size reaches 32 KiB by default. The format is shared with other tools, and the AGENTS.md guide explains it.
# [Project name] ## What this project is [One sentence.] ## How to run it - Install: [command] - Start: [command] - Test: [command]. Run the tests after every change and report the result. ## Rules - Make the smallest change that solves the task. - Ask before adding a dependency or changing the database schema. - Do not touch [folders or files that must not change]. - Never commit secrets. Read them from environment variables. ## Done means - Tests pass, and you have listed the files you changed and why.
Which Codex surface should you start with?
| If you... | Start with | Why |
|---|---|---|
| Are new to coding agents and want a window, not a terminal | The ChatGPT desktop app | Projects, files and tasks in one place with your ChatGPT sign-in |
| Live in a terminal or need to script runs | Codex CLI | Works against your local repository and can run non-interactively; see the CLI guide |
| Spend your day in VS Code, Cursor or a JetBrains IDE | The IDE extension | Open files and selections go straight into the prompt; changes appear beside your code |
| Have a long task and want your laptop free | Codex cloud | Runs on its own workspace and can continue while your computer is asleep |
| Want review on every pull request | Codex code review on a paid plan | Cloud-based integration, not available with an API key alone |
Whichever you pick, create a Git checkpoint before and after each task so you can revert. OpenAI's IDE documentation recommends this itself. To weigh Codex against Anthropic's agent, read Claude Code vs Codex, and for a wider view see the best AI coding tools.
What should you point Codex at first?
Start with a task you can verify. Fix one failing test, add one small feature to a repository you know, or write the tests for a function that has none. A good first project is a small tool with a single input and output, and the board has plenty. For example, Which of your abandoned repos is closest to finished was posted for exactly this kind of build. You can browse developer tools ideas for more.
Task: [one sentence describing a single change]. Context: the relevant files are [paths]. Do not edit anything outside them. Done when: [a command that must pass, such as the test suite] and [one behavior I can check by hand]. Before editing, list the files you plan to change and the tests you will add, then wait for my go-ahead.
Review the diff as you would a colleague's pull request. The agent can run commands and edit files, so keep permissions as tight as the task allows, and keep secrets out of the repository.
Frequently asked questions
What is OpenAI Codex?
OpenAI Codex is OpenAI's coding agent. It reads a repository, edits files, runs commands and tests, and proposes changes for you to review. It is available in the ChatGPT desktop app, a command-line tool, IDE extensions, a cloud agent on the web and on mobile, and it is included in ChatGPT plans.
Is OpenAI Codex free?
A Free ChatGPT plan includes access to Codex for quick coding tasks, and Go at USD 8 a month adds lightweight use. As of October 2026 those cards list the desktop app, subject to rollout. Plus at USD 20 a month adds the web, CLI, IDE extension, iOS and cloud integrations, with higher limits.
What is the difference between Codex and Codex CLI?
Codex is the whole product, the same agent offered in several places. Codex CLI is one of them: the version you run in a terminal against a local repository. The others are the desktop app, IDE extension, cloud agent and mobile. They share a plan and a usage allowance.
Can I use Codex with an API key?
Yes. The CLI, SDK and IDE extension accept an API key, and usage is billed at standard API rates. An API key does not give you cloud-based features such as GitHub code review or Slack, and Codex cloud requires signing in with ChatGPT.
Does Codex run on my computer or in the cloud?
Both. The CLI, IDE extension and desktop app can work against your local files. Codex cloud runs tasks on OpenAI's infrastructure in an environment you configure from your GitHub repositories, and keeps working while your computer is asleep. You review the changes and open a pull request when ready.
What is AGENTS.md in Codex?
AGENTS.md is a plain Markdown file of instructions Codex reads before working: how to run the project, your rules and what done means. Codex reads a global file from your Codex home folder and then files from the project root down, with closer files overriding earlier ones, up to 32 KiB by default.
Created with AI assistance and edited for this site. Examples are illustrative and do not represent customer research. About the publisher.