Codex is OpenAI’s coding agent, and it changes how software gets built. Instead of copying code back and forth between a chat window and your editor, you hand codex a task in plain language and it works through the job itself: it reads your project, plans the steps, edits the files, runs commands and tests, and reports back on what happened. It is built for developers who want a capable helper for real work — writing features, fixing bugs, explaining unfamiliar code, and handling the routine jobs that eat up a working day — while keeping the human firmly in charge of the final decision.
What Is Codex?
Codex is a coding agent for software development, designed to work inside your actual codebase rather than beside it. When you give it a task, it follows a loop: read the relevant files, make edits, run the project, observe the result, and repeat until the work is done or it needs your input. That loop is what separates an agent from a chatbot. A chatbot answers questions; Codex carries out multi-step work and shows you what it did along the way.
The agent reads more than just the file you point it at. It can study the structure of a whole repository, follow how different parts of a project connect, read Git history to understand why a change was made, and follow project instructions such as the guidance in an AGENTS.md file. That context matters, because good coding decisions depend on understanding the project, not just the single function in front of you. When it explains an unfamiliar codebase, it can trace how data flows, where a feature lives, and which files are involved — the kind of orientation work that normally takes a new developer days.
What Codex can do covers the full range of everyday development. It writes new code, explains code you did not write, finds and fixes bugs, refactors messy sections, and runs your test suite to check its own work. It can automate routine development tasks such as updating dependencies, renaming things consistently across a project, or tidying up repeated patterns. It can also review pull requests, reading the diff and the applicable project guidance and posting its findings directly on GitHub. Think of it as a junior pair programmer: fast, tireless, and genuinely useful — but one whose work you always review before it ships.
How to Use Codex
Codex is not a single tool. It is a family of surfaces that share one account, so you can start a task in one place and pick it up in another. The right surface depends on where you already work and how much control you want over each step. The four main ways to use it are the terminal, your editor, a remote cloud sandbox, and GitHub itself.
codex in the terminal, the IDE, and the cloud
The Codex CLI is the most direct way in. Install it with npm install -g @openai/codex — it is also available through Homebrew with brew install --cask codex and through a standalone install script. Then open a terminal in a project folder, run codex, and sign in with ChatGPT or an API key. The CLI is open source under the Apache-2.0 licence on GitHub, which means its behaviour is public and the community can inspect and improve it. Once running, you describe the task in plain language and watch it work through the files, commands, and tests in your project.
If you live in your editor, the IDE extension brings Codex into VS Code and JetBrains, so you can ask questions and request edits without leaving the code. The desktop app is another route: Codex lives inside the ChatGPT desktop app on macOS, Windows, and Linux. Download it from openai.com/codex, sign in, and switch to Codex in the app switcher. It gives you the agent in a friendly window, with your projects and conversations in one place.
The cloud agent works differently. It runs in a remote sandbox rather than on your machine, so it can work on a task while you do something else, then open a pull request with its changes for you to review. That makes it a good fit for larger, well-defined jobs: fixing a reported bug, implementing a small feature, or updating documentation across a repository. The GitHub bot works the same way from inside your workflow — tag @codex on an issue or a pull request, for example with “@codex review” to request a code review, and it responds there. There is also Slack integration, so you can mention @Codex in a channel and bring the agent into a team conversation.
| Surface | Where it runs | Best use |
|---|---|---|
| Codex CLI | Your terminal | Hands-on coding, debugging, and running tests in a project folder |
| IDE extension | VS Code / JetBrains | Asking questions and making edits without leaving your editor |
| Cloud agent | Remote sandbox | Larger bounded tasks that end in a pull request for review |
| GitHub bot | GitHub issues and PRs | Code review and fixes triggered from an issue or pull request |
Sandbox Modes and Approvals: Staying in Control
The most important thing to understand about Codex is its safety model. The agent works inside sandbox modes with approval settings that control what it is allowed to do on its own. It shows you the commands it runs and the edits it makes as it works, and it asks before stepping outside its sandbox. That transparency is the whole point: you can see every change before it becomes permanent.
Start in the most restrictive sandbox and give Codex bounded tasks. A bounded task has a clear scope, a clear definition of done, and a small blast radius — one function, one screen, one failing test. Always read the diff before merging anything, just as you would review a colleague’s pull request. Never run the agent unsupervised with full permissions on day one. As you learn how it behaves on your codebase, you can widen what it is allowed to do, but the habit of reading the diff should never go away. The agent is a helper, not an autopilot.
Good first tasks are small and specific. Instead of “fix the login system”, try something like: “Trace the failing password-reset test and explain the cause. Do not edit files yet.” That gives you a clear, checkable result and teaches you how the agent reasons. Another good starter is “add a dark mode toggle to the settings screen” — a contained feature with an obvious result you can test yourself. Small wins build trust, and trust is what lets you hand over bigger jobs later.
- Pick one small, specific task with a clear result you can check.
- Start in the most restrictive sandbox mode.
- Tell Codex whether it may edit files, or only explain first.
- Watch its commands and edits as it works.
- Read the full diff before you merge or accept anything.
- Run the tests yourself after the agent finishes.
Codex Pricing and Plans
Codex is included in ChatGPT plans, as reported in October 2026: Free at $0, Go at $8 per month, Plus at $20 per month, Pro at $100 or $200 per month, along with Business, Edu, and Enterprise plans. Free and Go include Codex in the ChatGPT desktop app, so even the no-cost plan gives you a way to try the agent. Prices change often, so check OpenAI’s Codex pricing page before deciding which plan fits your work.
There is also an API-key route. If you sign in with an API key, access is billed separately at API rates, and it supports the CLI, the SDK, and the IDE extension. Note that API-key access does not include cloud features such as GitHub code review, which need a ChatGPT plan. For most individual developers, a ChatGPT plan is the simpler choice: one subscription covers the desktop app, the IDE, and the cloud agent. For teams building Codex into automated workflows, the API route is the one to price out carefully, because usage-based billing depends on how much work the agent does.
Beyond the core agent, Codex supports extras that extend what it can reach. MCP server support lets it connect to external tools and data sources, the Computer Use plugin lets it work with desktop apps, and plugins and skills let you teach it project-specific routines. These are power features: useful once you are comfortable with the basics, but not needed for your first tasks. Start with the agent itself, learn its strengths and limits on your own code, and add extensions only when a real job calls for them.
FAQs About Codex
What is Codex used for?
Codex is used for software development tasks: writing code, explaining unfamiliar codebases, finding and fixing bugs, refactoring, running tests, automating routine development work, and reviewing pull requests. It works in a loop of reading, editing, running, and observing, so it can carry multi-step jobs through to a result you can review.
How do I install the Codex CLI?
Install it with npm install -g @openai/codex, or with Homebrew using brew install --cask codex, or with the standalone install script. Then run codex in a project folder and sign in with ChatGPT or an API key. The CLI is open source under the Apache-2.0 licence.
Can Codex review my pull requests?
Yes. Tag @codex on an issue or pull request — for example, “@codex review” — and it reads the diff and the applicable AGENTS.md guidance, then posts its findings on GitHub. The cloud agent can also open pull requests with its own changes for you to review.
Is Codex free?
Codex is included in ChatGPT plans as reported in October 2026, starting with the Free plan at $0, which includes Codex in the ChatGPT desktop app. Paid plans are Go at $8 per month, Plus at $20 per month, and Pro at $100 or $200 per month, plus Business, Edu, and Enterprise. API-key access is billed separately at API rates. Prices change often, so check OpenAI’s Codex pricing page for the current figures.
Is it safe to let Codex edit my code?
It is safe when you use its controls properly. Start in the most restrictive sandbox, give it bounded tasks, watch the commands and edits it shows you, and always read the diff before merging. Treat it like a junior pair programmer whose work you review — never run it unsupervised with full permissions on day one.
In the end, codex is most valuable when you treat it as a capable junior colleague rather than a magic answer machine. Give it small, specific jobs, keep it inside a restrictive sandbox, read every diff, and run the tests yourself. Used that way, it takes over the routine work — the explaining, the tracing, the refactoring, the first draft of a fix — and leaves you with the part that matters most: deciding what good code looks like and shipping it with confidence.
