What Is OpenAI Codex? A 2026 Beginner's Guide
OpenAI Codex is OpenAI's AI coding agent - not the 2021 code-completion model that shared the name. It reads your repo, edits files, runs tests, and opens pull requests, from three surfaces: a CLI, a cloud service, and IDE extensions. Codex ships free inside ChatGPT plans. It is a different product from OpenAI's own "AgentKit" (Agent Builder) and from the affiliate AgentKit (agentkit.best) - though the affiliate kit can run its own skills and workflows inside Codex. This guide covers what Codex is, how each surface works, GPT-5.6 pricing, safe configuration, and where every similarly-named product fits.
- Codex facts move fast (model tiers, pricing, docs domain); everything below was cross-checked against official docs at the time of writing - verify the live docs before you depend on a specific number.
What Is OpenAI Codex?
OpenAI Codex is OpenAI's agentic coding product: it reads a codebase, plans a change, edits files, runs your tests or linter, and opens a pull request, mostly on its own once you hand it a task. That is the core definition worth remembering, and it is why Codex gets compared to a junior engineer more than to autocomplete.
Codex ships in three surfaces that share the same underlying agent: a command-line tool you run in your terminal, a cloud service that spins up parallel sandboxes from the web, GitHub, Slack, or Linear, and IDE extensions for VS Code and JetBrains. You give it an instruction - "add tests for this module," "fix the failing CI job," "open a PR that migrates this endpoint" - and it works through the repo the way a developer would: read files, make edits, run commands, check the result, iterate.
It is built by OpenAI, powered by a GPT-5.6-family model (more on that below), and bundled into ChatGPT plans rather than sold as a separate product. If you have only heard "Codex" mentioned in the context of GitHub Copilot's early history, that is a different, retired product - covered next.
For teams already using Claude Code, the mental model transfers directly: same agent-in-a-loop pattern, different vendor and defaults.
Not the Same as the 2021 Codex Model
The name "Codex" is recycled, and that causes real confusion - Wikipedia itself keeps two separate disambiguation pages for it, which tells you how often people conflate the two.
The original Codex was a 2021 OpenAI model descended from GPT-3, fine-tuned on public code. It powered the earliest version of GitHub Copilot and OpenAI's own Codex API, and it has since been deprecated in favor of newer models.
The Codex you would install today is a 2025+ agent product: a different codebase, a different interaction model (a CLI/cloud/IDE agent instead of an autocomplete API), and a different underlying model family entirely. If an article, video, or forum post describes Codex as a code-completion API you call for suggestions, it is almost certainly describing the retired 2021 product, not the one this guide covers.
Codex vs. AgentKit vs. OpenAI AgentKit - Don't Mix These Up
This is the section every Codex guide skips, and it is where most confusion actually happens. Three products share overlapping names. Keep them straight:
| Name | What it is | Relationship to Codex |
|---|---|---|
| OpenAI Codex | OpenAI's coding agent (this article's subject) - CLI, cloud, IDE. | - |
| AgentKit (agentkit.best) | A third-party, paid kit (CLI ak) that adds prebuilt skills, subagents, and workflows. | Runs inside Codex (and inside Claude Code) as an add-on - it is not made by OpenAI. |
| OpenAI AgentKit | OpenAI's own visual agent-building product (Agent Builder + ChatKit), announced at DevDay on 2025-10-06. | Unrelated to Codex - it is for building customer-facing agents, not for editing your codebase. |
Worth flagging: OpenAI announced on 2026-06-03 that it is winding down Agent Builder and Evals (shutdown 2026-11-30, Evals going read-only 2026-10-31), while ChatKit and the Connector Registry stay. Verify this against OpenAI's deprecations page before you rely on it - but as of this writing, it means the third-party AgentKit (agentkit.best) is the more actively maintained product carrying the name.
If you want the full breakdown, see OpenAI AgentKit vs. AgentKit. For how the third-party kit actually plugs into Codex, see using AgentKit inside Codex or the AgentKit review.
Three Ways to Run Codex - CLI, Cloud, IDE
Codex is one agent, but you can reach it from three different surfaces depending on the job:
| Surface | Where it runs | Best for |
|---|---|---|
| CLI | Your terminal. Open-source (Rust). Installed with a single script, no Node or Bun required. | Local, hands-on sessions; scripting; anyone who lives in a terminal. |
| Cloud | OpenAI's servers, triggered from the web, GitHub, Slack, or Linear. Runs many tasks in parallel sandboxes. | Offloading a batch of tasks (fix this issue, update that dependency) without tying up your machine. |
| IDE | Extensions for VS Code, JetBrains, and compatible forks. | Reviewing diffs and steering the agent inline while you keep coding. |
The CLI is the surface most developers start with, and it is the one this cluster covers in the most depth - see the full Codex CLI install guide. The install itself is a single shell command (no separate runtime to manage), which is part of why it spread fast among developers already using Claude Code's CLI.
Cloud is the surface that surprises people the most: instead of one agent working one task at a time, you can kick off several tasks from a GitHub issue, a Slack message, or the web app, and each runs in its own isolated sandbox. That is useful for the kind of small, parallelizable work - dependency bumps, small bug fixes, boilerplate PRs - that does not need your constant attention. For the full walkthrough, see the Codex Cloud guide.
The IDE extensions matter less as a place to run long tasks and more as a place to review what Codex already did, inline, without leaving your editor.
The Model Behind Codex - GPT-5.6 (Sol / Terra / Luna)
Codex runs on OpenAI's GPT-5.6 model family, which reached general availability on 2026-07-09 - this is the freshest fact on this page, so treat it as a verify-live item and check openai.com/index/gpt-5-6/ before quoting it elsewhere.
GPT-5.6 ships in three tiers, informally named Sol, Terra, and Luna, that trade speed and cost against depth of reasoning: the higher tier thinks longer and handles harder refactors, the lower tier answers faster and burns less of your usage budget on routine edits. Codex picks a sensible default and lets you switch tiers depending on whether you are doing a quick fix or a large migration.
The exact credit rates and per-tier pricing change often enough that we cover them separately, with numbers, in the Codex pricing guide rather than freezing them here.
How Much Does Codex Cost?
Codex does not have its own separate price tag. It is bundled into your ChatGPT plan, so what you pay is whatever plan you are already on (or would upgrade to):
| ChatGPT plan | Approx. price | Codex access |
|---|---|---|
| Free | $0 | Limited |
| Go | ~$8/mo | Basic usage |
| Plus | ~$20/mo | Standard usage |
| Pro | ~$100-200/mo | Highest usage caps |
| Business | ~$20/seat/mo | Team usage, admin controls |
Two things to flag before you budget around this table. First, prices and usage caps move - this is a verify-live number, check learn.chatgpt.com/codex/pricing before you commit. Second, "usage" is not unlimited on any tier; heavier GPT-5.6 tiers (Sol especially) consume your budget faster than lighter ones, which is the real reason the tier picker in the previous section matters. For the full current breakdown by tier and plan, see the Codex pricing guide.
Configuring & Trusting Codex - AGENTS.md, Sandbox, Skills
Three settings decide how much Codex knows about your project and how much it is allowed to touch. Each has its own deep-dive; here is the short version of each.
AGENTS.md. Codex reads project instructions from AGENTS.md, searching in order: ~/.codex/AGENTS.override.md, then ~/.codex/AGENTS.md, then per-directory files from your git root down to your current folder, concatenating root-down with closer files overriding. There is a size cap (32 KiB by default), and - worth knowing if you also use Claude Code - Codex does not read CLAUDE.md. Full detail in the AGENTS.md guide for Codex.
Sandbox and approvals. You choose how much filesystem access Codex gets - read-only, workspace-write (the default), or danger-full-access - and how often it has to ask before acting - untrusted, on-request, or never. Treat these as your actual safety boundary; do not rely on prompt wording alone to stop Codex from touching something it should not. Full detail in sandbox and approval modes.
Skills. Codex supports SKILL.md-based skills, and the format is cross-compatible with Claude Code's skills - write one, use it in both tools. We are hedging the exact canonical catalog link here because OpenAI's own skills and plugins repos have both been archived; the safe reference is the live docs hub. Full detail in Codex Skills explained.
None of these three replace judgment. AGENTS.md tells Codex what your project expects; sandbox settings tell it what it is allowed to do regardless of what it thinks the task requires; skills give it reusable playbooks. Get the sandbox setting wrong and the other two do not save you.
Reviewing Code & Quick Commands
Codex has a built-in /review command with presets for reviewing a diff, your uncommitted changes, a specific commit, or a custom range. Reviewing a GitHub pull request specifically needs the gh CLI installed and authenticated. It is a fast way to get a second pass on a change before you push it, and it is worth running even on code you wrote yourself, not just what Codex generated. Full walkthrough in the Codex code review guide.
Beyond /review, Codex has a set of slash commands worth memorizing rather than looking up every time - we keep an updated list in the Codex CLI cheat sheet.
Codex vs. Claude Code, GitHub Copilot, Gemini CLI
Codex is not the only agentic coding tool, and picking one is less about which is "best" and more about which fits your stack. No verdict here on purpose - each comparison gets its own dedicated page, linked below.
| Tool | Owner | Open source? | Surfaces | Notable trait |
|---|---|---|---|---|
| OpenAI Codex | OpenAI | CLI only | CLI, cloud, IDE | Parallel cloud sandboxes; GPT-5.6 tier picker |
| Claude Code | Anthropic | No | Terminal, web, desktop | Deep subagents/skills/hooks ecosystem |
| GitHub Copilot | Microsoft/GitHub | No | IDE-first, plus CLI | Tightest GitHub/PR integration |
| Gemini CLI | Yes | Terminal | Google Search grounding; free individual tier ended 2026-06-18 |
If you already use Claude Code and are deciding whether Codex is worth adding, the direct comparison is in Claude Code vs. Codex; that page owns the verdict, this one just gives you the landscape. Dedicated head-to-heads against the other two are in Codex vs. GitHub Copilot and Codex vs. Gemini CLI.
You Can Run AgentKit Inside Codex, Too
Be clear about the boundary here, because it is easy to blur: Codex itself - the CLI, the cloud sandboxes, the /goal autonomous mode - is free (or plan-included) and made by OpenAI. Nothing in this section is required to use Codex.
AgentKit is a separate, paid add-on (agentkit.best, not affiliated with OpenAI) that installs prebuilt skills, subagents, and workflows on top of Codex. Confirmed mechanics: install it with ak kit init engineer --target codex (add --global for a user-wide install), then run kit commands from inside a Codex session with $ak:cook ... (note the $ prefix - Claude Code uses /ak:cook instead). On Codex specifically, delivery is native: skills, rules, and agent dispatch work, hooks are partial, and there is no status line or interactive kit-command menu the way there is in Claude Code.
Whether it is worth the price depends on how much of that scaffolding you would otherwise build yourself. If you already have your own AGENTS.md conventions and review habits, you may not need it. If you are starting from a blank Codex install and want a working set of skills and a code-review gate on day one, that is the actual value proposition - see the AgentKit review for the full picture, or the AgentKit-in-Codex guide for setup detail.
Want a working skill set and review gate in Codex on day one? AgentKit's Engineer Kit adds prebuilt skills, subagents, and an ak:cook/ak:review workflow that runs natively inside Codex - no need to hand-roll your own AGENTS.md setup from scratch.
Frequently Asked Questions (FAQ)
Is OpenAI Codex free?
It is not a separate paid product - it is bundled into ChatGPT plans, including a limited free tier. Heavier use needs a paid plan (Go, Plus, Pro, or Business), and usage caps vary by tier and by which GPT-5.6 model tier you pick. Check learn.chatgpt.com/codex/pricing for current numbers.
Is this the same Codex from 2021?
No. The 2021 Codex was a GPT-3-based code-completion model that powered early GitHub Copilot and has since been deprecated. The Codex covered in this guide is a 2025+ agent product with a different codebase and a different interaction model.
Codex vs. ChatGPT - what's the difference?
ChatGPT is a general chat assistant; Codex is the coding-agent product built on top of the same underlying models, accessed through a CLI, cloud sandboxes, or IDE extensions, and it acts directly in your repo instead of just answering questions in a chat window.
Is it safe to let Codex edit my files?
It can be, if you configure the sandbox correctly. Codex's workspace-write default plus approval prompts (untrusted/on-request/never) are your real safety boundary - never give it danger-full-access on a machine with production credentials, and do not assume prompt instructions alone will stop it from wandering outside scope.
Can I use Codex on Windows?
Yes. The Codex CLI installs and runs on Windows, macOS, and Linux, alongside the cloud and IDE surfaces.
What's the difference between Codex and AgentKit?
Codex is OpenAI's coding agent; AgentKit (agentkit.best) is a separate, paid third-party add-on that installs prebuilt skills and workflows inside Codex (and inside Claude Code). They are made by different companies, and AgentKit is optional - Codex works fully without it.
Conclusion - Where to Go Next
OpenAI Codex is a coding agent, not the 2021 model of the same name, and it is not either of the two "AgentKit" products floating around the same conversation. It runs from a CLI, the cloud, or your IDE, on a GPT-5.6 model you can tier for speed or depth, bundled into your ChatGPT plan rather than sold separately.
From here: install the Codex CLI, check current pricing, set up AGENTS.md and sandbox modes, or see how AgentKit layers on top once the basics are working.