Loading...


Updated 3 June 2026 • 5 mins read

OpenAI Codex is an AI coding agent that works in the cloud, the terminal, your IDE, and your code host. This guide explains what it is, every surface and integration, how pricing works across ChatGPT plans, the API, and the open-source CLI, the costs that surprise teams, practical ways to save, and how Opslyft keeps Codex and AI spend visible and allocated.
Quick answer: OpenAI Codex is an AI coding agent that can read your code, make changes, run tasks, and open pull requests on your behalf. You can use it in four main places: the Codex cloud agent inside ChatGPT, the open-source Codex CLI in your terminal, an IDE extension, and through your code host such as GitHub. For most people Codex is included with a paid ChatGPT plan (Plus, Pro, Business, or Enterprise) with usage limits that scale by tier, and it is also available through the API on a pay-per-token basis. The CLI itself is free and open source; what you pay is the plan or token usage it consumes. Always confirm current limits and rates on OpenAI's official pages.
Codex is OpenAI's answer to the agentic coding wave: instead of just autocompleting lines, it takes a task, works through it across your codebase, and comes back with a result you can review. It runs in the cloud, in your terminal, in your editor, and inside your code host, which makes it powerful and also easy to lose track of from a cost perspective.
That is the catch. Codex usage is bundled into plans, billed per token through the API, and spread across surfaces and team members, so the spend rarely shows up in one tidy place. For any team running it at scale, Codex is as much a FinOps question as an engineering one.
This guide explains what Codex is, every way you can use it, how the pricing works, the costs that catch teams off guard, practical ways to save, and how opslyft keeps that spend visible and allocated.
Codex is a cloud-based software engineering agent powered by OpenAI's coding-optimized models. Unlike a simple autocomplete tool, it can take a written instruction, explore your repository, write and edit code, run tests in an isolated sandbox, and propose changes as a pull request. You describe the outcome you want, and Codex does the multi-step work to get there. You can learn more on OpenAI's Codex page.
In practice, teams use Codex to fix bugs, implement features, write tests, refactor code, answer questions about a codebase, and handle routine maintenance. It is designed to run several tasks in parallel, so a developer can delegate a batch of work and review the results rather than doing each step by hand.
A few ideas explain most of how Codex behaves and, importantly, why it costs what it does:
Codex earns its keep on the work developers would rather not do by hand. Common uses include:
The pattern is delegation: a developer describes the outcome, Codex does the multi-step work, and the human reviews and merges. That is also why costs scale with how much you delegate, which is the theme of the rest of this guide.
Codex is not a single app. It shows up across your workflow through several surfaces and integrations, and the same task can often be started from any of them.
| Surface / integration | What it is | Best for |
|---|---|---|
| Codex cloud (in ChatGPT) | Delegate tasks to the cloud agent from the ChatGPT interface, run them in parallel, review and merge results | Hands-off, multi-task work and reviews |
| Codex CLI | Open-source terminal agent that runs locally and can act on your machine and repo | Developers who live in the terminal |
| IDE extension | Codex inside your editor (such as VS Code and compatible IDEs) for in-context help and edits | Coding alongside the agent in your editor |
| Code host integration | Connect repositories on your code host (such as GitHub) so Codex can open pull requests and review code | Fitting Codex into a normal git workflow |
| Team chat integration | On some plans, trigger Codex from a chat tool such as Slack | Kicking off tasks from where teams talk |
| Codex SDK / API | Programmatic access to build Codex into your own tools, scripts, and CI pipelines | Automation and custom workflows |
The Codex CLI is open source, and you can find it on GitHub. It can connect to external tools through the Model Context Protocol, which lets the agent use additional capabilities beyond editing code.
Codex is one of several agentic coding tools, and they overlap a lot. The differences are mostly about where each one lives and how it is billed. This is a high-level positioning view, not a feature scorecard, and you should confirm current details with each vendor.
| Tool | What it is | How it is billed |
|---|---|---|
| OpenAI Codex | Cloud, CLI, IDE, and code-host coding agent that runs parallel tasks | Included in paid ChatGPT plans by tier, plus API per token |
| GitHub Copilot | AI pair programmer and agent integrated with GitHub and editors | Per-seat subscription tiers |
| Anthropic Claude Code | Agentic coding tool that works in the terminal and editors | Through Claude plans and API usage |
| Cursor and similar IDEs | AI-native code editors with built-in agents | Per-seat subscription, often with usage tiers |
There are three ways to pay for Codex, and many teams end up using more than one at once. Confirm current numbers on OpenAI's pricing page, since limits and rates change often.
For most individuals and teams, Codex comes bundled with a paid ChatGPT plan, with usage limits that scale by tier. The more expensive the plan, the more Codex work you can do before hitting a limit or needing extra credits.
| Plan | Price | Codex access |
|---|---|---|
| ChatGPT Plus | $20 / month | Included, standard usage limits |
| ChatGPT Pro ($100) | $100 / month | Included, much higher limits |
| ChatGPT Pro ($200) | $200 / month | Included, highest individual limits |
| ChatGPT Business | ~$20 to $25 / seat | Included per seat, with admin controls |
| ChatGPT Enterprise | Custom | Included, highest limits and governance |
Limits are often expressed as a multiple of the Plus tier, and promotional boosts on newer plans can change over time, so the practical ceiling on a given plan is worth checking before you rely on it.
If you build Codex into your own tools or CI, you use the API and pay per token, like any other model. A smaller, faster coding model is priced low for high-volume and low-latency work, while more capable models cost more. As a rough illustration, the smaller Codex model has been priced in the region of a few dollars per million tokens, with a discount for cached input. Treat any figure as approximate and confirm the live rate before budgeting.
The Codex CLI itself is free and open source. It is not a separate charge; it authenticates either with your ChatGPT plan, in which case it draws on your plan usage, or with an API key, in which case it bills per token. The tool is free, but the work it does is not.
Plan-based pricing makes team cost mostly a seat question, until overages and API usage enter the picture. Here is a simple illustration for a ten-developer team, to show how the pieces add up. The figures are examples, not quotes.
| Scenario | Setup | Rough monthly cost |
|---|---|---|
| All on Plus | 10 seats × $20 | ~$200, plus any credit overages |
| Mixed by need | 6 Plus + 4 Pro $100 | ~$520, fewer overages on heavy users |
| Business plan | 10 seats × ~$25 | ~$250, plus admin and governance features |
| Add API automation | Codex in CI via the API | Pay-per-token on top, varies with volume |
Most Codex bills can be trimmed without slowing developers down. In rough order of impact:
The hardest part of controlling Codex spend is that it hides: bundled in plans, billed per token, and spread across surfaces and people, with no native breakdown by team or project. opslyft was built to fix exactly that. With opslyft FinOps360, Codex and other OpenAI costs sit in one allocated view alongside your cloud, SaaS, and other AI spend, so finance and engineering work from the same numbers.
opslyft helps you cut Codex and AI costs across the lifecycle:
Explore cost allocation without perfect tagging, read more on the opslyft blog, or book a 20-minute demo.
Codex is an AI coding agent that can read a codebase, write and edit code, run tasks in a sandbox, and open pull requests from a written instruction. It works in the cloud, the terminal, the IDE, and your code host, and is designed to run tasks in parallel.
The Codex CLI is free and open source, but the work it does is not. It runs on either your paid ChatGPT plan usage or pay-per-token API usage. For most people, Codex access is included with a paid ChatGPT plan, with limits that scale by tier.
It depends on how you access it. Through ChatGPT, it is included in paid plans from $20 per month up to custom Enterprise pricing, with usage limits by tier and credits for overages. Through the API, you pay per token, with a cheaper small model and pricier capable models. Confirm current rates on OpenAI's pricing page.
The CLI runs in your terminal and acts locally, the IDE extension brings Codex into your editor, and the cloud agent runs tasks in isolated cloud sandboxes from ChatGPT and can run many tasks in parallel. They are different front doors to the same agent.