“Codex” has meant three different things in five years. In 2021 it was a model. In 2025 it became a coding agent. And in November 2026 it’s a whole family of places where that agent runs: a terminal tool, an editor extension, the ChatGPT apps and a cloud service that keeps working while your laptop sleeps. No wonder people search for OpenAI Codex explained in plain English.
This guide sticks to OpenAI’s own documentation, checked on 16 November 2026. We didn’t run Codex for this article (it isn’t installed on the PC we write on), so you won’t find invented test results here. What you will find is how the cloud agent and the CLI differ, what each costs, and when to use which.
Quick answer: OpenAI Codex is a coding agent that reads your code, edits files, runs commands and proposes changes. The Codex CLI runs on your own computer, inside your project folder, with you watching. Codex Cloud runs each task in its own remote workspace, so you can hand off several jobs, close the laptop, and review the results later.
- Codex is included in every ChatGPT plan, from Free ($0) to Pro and Enterprise. Usage limits differ a lot.
- The CLI is open source under Apache-2.0 and also works with an API key. Cloud features need a ChatGPT sign-in.
- Cloud tasks can use more of your allowance than local messages, according to OpenAI’s pricing docs.
- Codex can also review GitHub pull requests when you comment
@codex review.
OpenAI Codex explained in plain English
Codex is OpenAI’s software engineering agent. You give it a goal (“fix the failing login test”, “add dark mode to the settings page”) and it inspects the code, makes changes, runs commands to check them, and hands back a result you can review.
The old meaning still causes confusion. The original Codex from 2021 was a language model, the one behind the first version of GitHub Copilot, and it was retired years ago. Today’s Codex isn’t a model at all. It’s the agent, and you pick which GPT model it runs on.
According to the Codex documentation, it’s available in the ChatGPT desktop app, the mobile app, ChatGPT on the web, the Codex CLI, an IDE extension and Codex Cloud. It also plugs into GitHub, Slack and Linear, with GitLab in beta.
How does OpenAI Codex work?
Every surface runs the same loop. Codex reads the relevant files, plans a change, edits code, runs commands such as your tests or linter, looks at the output, and repeats until it thinks the task is done. Then it shows you what changed.
Two things shape its behaviour. The first is the model and reasoning effort you choose, set with /model in the CLI. The second is your project instructions. Codex reads an AGENTS.md file in your repo, where you can write the build commands, code style and rules it should follow. If you’ve used Claude Code, it’s the same idea as CLAUDE.md, which our Claude Code tutorial walks through.
The big difference between surfaces is where that loop runs. That’s the whole cloud vs CLI question.

The Codex CLI runs on your machine
The Codex CLI is a terminal program. You open a project folder, type codex, sign in, and chat with an agent that works directly on your files. OpenAI’s CLI page sums it up as a way to “inspect code, make changes, run commands, and automate repeatable work without leaving your terminal.”
Installing it on Mac, Linux or Windows
The official GitHub repository lists an install script for macOS and Linux, a PowerShell script for Windows, an npm package and a Homebrew cask:
# macOS / Linux
curl -fsSL https://chatgpt.com/codex/install.sh | sh
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
# or with npm / Homebrew
npm install -g @openai/codex
brew install --cask codex
# start in your project folder
cd my-project
codex
The first run asks you to choose Sign in with ChatGPT or another method. An API key works too, which is how teams run Codex in CI.
Commands worth knowing
codexstarts an interactive session.codex execruns it non-interactively, for scripts and pipelines.codex resumereopens a saved chat./modelpicks the model and reasoning effort;/permissionssets what it may do without asking./reviewasks for a code review, and/initcreates a starter AGENTS.md.codex cloudhands work to the cloud agent from your terminal.
Permission modes
Locally, Codex has a sandbox. OpenAI’s permission modes page lists “Ask for approval” (it works inside your workspace and asks before touching outside files or the internet), “Approve for me” (only potentially unsafe actions get flagged, and an automatic reviewer handles them), “Full access” and a custom mode set in config.toml. OpenAI suggests starting with Ask for approval. We agree. Full access means any file on your computer and the open internet.
The IDE extension is the same local agent with a friendlier face. It works in VS Code and compatible editors like Cursor and Windsurf, while JetBrains IDEs and Xcode have their own integrations.
Codex Cloud works while you don’t
Codex Cloud runs tasks on OpenAI’s machines. The Codex Cloud docs say each task gets its own workspace and keeps going when your computer is off or asleep. You can start one from ChatGPT on the web, desktop or mobile, from the IDE extension, or from the CLI.
Before the first task, you set up an environment. You pick repositories from your connected GitHub or GitLab account, and Codex installs dependencies and tests the workflow. You then publish it so later tasks start from the same prepared setup.
Each task runs in a VM. On Plus, that’s 2 vCPUs, 8 GiB of memory and 8 GiB of disk. Pro, Business, Enterprise and Edu get 4 vCPUs, 16 GiB and 32 GiB, per the cloud environments page. Internet access is a setting per environment: allow everything, allow only package managers, or list specific domains. A task’s saved state stays recoverable for up to seven days after you last used it.
When the task finishes, you look at the changed files and check results, ask for follow-up changes, and then commit or open a pull request. Because every task has its own workspace, you can run several side by side without them stepping on each other.
Code review on GitHub
This is the cloud feature many teams start with. Connect a repo, then comment @codex review on a pull request. Codex posts a normal GitHub review and, according to the GitHub integration docs, flags only P0 and P1 issues, so you aren’t buried in style nitpicks. You can also switch on automatic reviews, and put review rules under a “Code Review Rules” heading in AGENTS.md.
Cloud agent vs CLI, side by side
| Codex CLI (local) | Codex Cloud | |
|---|---|---|
| Where code runs | Your computer | A VM on OpenAI’s side |
| You need to watch? | Usually, yes | No, it keeps going offline |
| Setup | Install, sign in, open folder | Connect repo, build environment |
| Uses your local tools/secrets | Yes | Only what you put in the environment |
| Parallel tasks | One session per terminal | Several, each isolated |
| Works with API key only | Yes | No (needs ChatGPT sign-in) |
| GitHub PR review | /review locally | @codex review on GitHub |
Pick the CLI when you’re actively coding, need your local database or private network, or want to see every step. Pick Cloud when the task is well defined and can run unattended: a batch of small bugs, a dependency upgrade, a first draft of tests. A common pattern is to start a cloud task from the CLI, carry on with local work, and review the cloud result when it’s ready.
The part most guides skip: Codex Cloud isn’t free extra capacity. OpenAI’s pricing docs say local messages and cloud chats share one allowance, and “cloud tasks may use more of your allowance than local messages.” On Plus, firing off five cloud tasks before lunch can eat the budget you wanted for afternoon coding. And if you only have an API key, cloud features such as GitHub review and Slack aren’t available at all.
Is OpenAI Codex free?
Partly. OpenAI’s pricing page says Codex is included in ChatGPT Free, Go, Plus, Pro, Business, Edu and Enterprise. Free is pitched for “quick coding tasks” and Go ($8 a month) for “lightweight coding tasks”, with no published numbers. Plus at $20 is described as enough to “power a few focused coding sessions each week.” Pro starts at $100 a month and, for now, has no five-hour limit.
For Plus, OpenAI gives rough local message estimates per five hours, and they depend heavily on the model:

The gap is huge. GPT-6 Luna allows roughly 350 to 3,000 local messages per window, while GPT-6 Astra allows 5 to 45. OpenAI stresses these are estimates, not fixed limits. If you keep hitting the wall, switching models helps more than anything else. Our GPT-6.1 Sol vs Terra vs GPT-6 Luna comparison explains which model suits which job.
With an API key instead, you pay standard API rates per token and get the CLI, SDK and IDE extension, but no cloud features.
Common myths about Codex
- “Codex is a model.” Not anymore. It’s an agent that runs GPT models you choose.
- “You need a paid plan.” Free and Go include Codex, with tighter usage.
- “The cloud agent can see my whole computer.” It only sees the repos and setup in its environment.
- “Full access is fine for speed.” It removes the sandbox. Use it only in a throwaway machine or container.
What to use today
If you’re new, install the CLI or the IDE extension, sign in with your ChatGPT account, keep Ask for approval on, and give it one small, testable task. Add an AGENTS.md once you see what it gets wrong. Try Codex Cloud after that, starting with @codex review on a pull request, because review is low risk and shows you how the agent thinks.
Skip Codex Cloud if your project needs local services, private data you can’t upload, or hardware the VM doesn’t have. Skip the CLI on a shared server if you don’t want to manage sandbox settings.
Already paying for GitHub instead of ChatGPT? Our GitHub Copilot tutorial covers its agent. Next: see how Codex stacks up against its two biggest rivals in Claude Code vs Codex vs GitHub Copilot.
FAQ
What does OpenAI Codex do?
It reads a codebase, edits files, runs commands like tests, and proposes changes or pull requests. It can also review GitHub pull requests.
How do I use OpenAI Codex on Windows?
Install the CLI with the PowerShell script from OpenAI’s GitHub repo (or npm), then run codex in your project folder. OpenAI also documents a Windows sandbox and WSL setup.
Is OpenAI Codex good?
It depends on your tasks and the model you pick. Test it on a real but small issue in your own repo before trusting it with bigger work, and always review the diff.
Is Codex the same as ChatGPT?
They share an account and a usage allowance, and Codex runs inside the ChatGPT apps. But Codex is built for working on code and repos, not general chat.