You can use OpenAI Codex for free in 2026 two ways: the Codex CLI is open source under Apache-2.0 and runs locally on your machine at no charge, and Codex is included across all ChatGPT plans — including Free and Go — though usage limits scale up with paid plans (OpenAI Help Center). The fastest zero-cost start is to install the CLI, sign in with a free ChatGPT account, and hand the agent real jobs from a single workspace; you don't need a Plus/Pro subscription to begin, and you don't need to write code yourself. This guide gives you every free lane, the exact install commands, what each plan actually unlocks, and how to stack jobs the same way power users do.
Last verified: 2026-07-30 · Free path: Codex CLI (open source) + ChatGPT Free plan login · Limits climb on Go ($5), Plus ($20), Pro ($200) · Pricing/limits change often — re-check OpenAI's pricing page before you scale.
What is OpenAI Codex?
OpenAI Codex is an agentic coding assistant that writes, reviews, debugs, and ships code on your behalf. It runs four official surfaces — the Codex CLI (open source, local terminal), a Codex IDE extension (VS Code, Cursor, Windsurf), the Codex Web agent at chatgpt.com/codex, and Codex in the ChatGPT desktop app ("Codex mode") (OpenAI Help Center). The original code-davinci-002 completion API was deprecated; today's "Codex" is the agentic tool, not the old model.
Note: codex ≠ just a chatbot. It can read a whole codebase, run terminal commands, execute multi-file edits, run tests, iterate on a failing build, and open a pull request. The free tier just rate-limits how much of that you get per day.
How can you use OpenAI Codex for free?
You have three free lanes, in order of effort:
- Use Codex in the ChatGPT desktop app (Codex mode) while signed into a free ChatGPT account. The desktop app's Codex mode is the closest thing to a "mission control" for the agent — one window, multiple parallel jobs, files and previews inline (OpenAI Codex docs). Free plans get limited Codex access (OpenAI pricing).
- Install the open-source Codex CLI locally and sign in with your free ChatGPT account. The CLI runs in your terminal;
codexthen "Sign in with ChatGPT" uses your existing plan quota (openai/codex README). No payment, no API key needed. - Use Codex Web at
chatgpt.com/codexwith the same free ChatGPT login — the cloud agent, browser-only.
The cheapest unlimited path is to combine the open-source CLI with a free ChatGPT login and only pull a real OpenAI API key once you've burned the free quota. Avoid third-party "free Codex API" proxies — those re-sell access to the open-source Codex CLI behind a paywall and add a middleman; you can run the same CLI yourself for zero. (For a deeper look at how to keep AI tool bills near zero using a similar delegate-to-free pattern, see our Hermes Agent token-cost strategy guide.)
Step-by-step: How to set up Codex CLI for free
This is the path that costs nothing and works on macOS, Linux, and Windows.
Step 1 — Install Codex CLI (pick one)
# Mac or Linux (recommended one-liner from OpenAI)
curl -fsSL https://chatgpt.com/codex/install.sh | sh
# Or via npm (requires Node.js 18+)
npm install -g @openai/codex
# Or via Homebrew on macOS
brew install --cask codex
On Windows:
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
All three Mac/Linux paths install the same binary — they just download it from releases.openai.com/codex with a GitHub Releases fallback. The package is open source under Apache-2.0 (openai/codex on GitHub), so you can also build from source.
Step 2 — Sign in with your free ChatGPT account
Run codex, then select "Sign in with ChatGPT" when prompted. This is the free path: it draws your usage from the Codex allowance that is included with your ChatGPT plan — Free included — instead of billing an API key (openai/codex README).
If you'd rather use an API key, OpenAI's codex auth docs walk through it — but a new API key path is metered, not free-tier. Stick to the ChatGPT login for the zero-cost lane.
Step 3 — Verify it works
From any project folder, run:
codex "explain what this project does"
If it returns a plain-English summary of the codebase, your install is good. Now hand it a real job in plain words — for example:
codex "add input validation to the signup form and add a unit test"
You're not writing code. You're describing a result in plain English; the agent opens files, edits, and runs the test suite for you.
Step 4 — Pick the right Codex surface for the job
| Surface | Best for | Free? | When to use |
|---|---|---|---|
| Codex CLI (terminal) | Local repo work, scripts, multi-file edits, terminal commands | Yes — open source + free ChatGPT login | When you already live in the terminal |
| Codex IDE extension (VS Code/Cursor) | In-editor refactors, inline chat | Yes (uses same ChatGPT login) | When you want Codex inside your editor |
| Codex in the ChatGPT desktop app | Long-running parallel jobs, files + previews in one workspace | Limited on Free; yes on Plus/Pro | The "mission control" use case |
Codex Web (chatgpt.com/codex) |
Cloud runs, no install | Limited on Free; yes on Plus/Pro | When you want it to run somewhere else |
The four clients are documented in OpenAI's Codex plan help page. They all share one usage pool, so mixing them doesn't double your quota.
How much does Codex cost on each ChatGPT plan?
Codex itself is included on every ChatGPT plan, but the allowance climbs steeply with paid tiers. Here is the per-plan access, verified against OpenAI's pricing page and the official Codex-plan help article:
| Plan | Price | Codex access | Best for |
|---|---|---|---|
| Free | $0 | Limited — a small daily allowance of parallel jobs | Trying Codex on real work, learning the loop |
| Go | ~$5/mo | Limited (slightly more than Free) | Light daily use, longer conversations |
| Plus | $20/mo | Expanded usage — much higher concurrent task limits | Daily power-user with multiple stacked jobs |
| Pro | $200/mo | Maximum Codex tasks, 5–20x more usage than Plus | Research-grade, very long runs |
| Business / Enterprise | Custom | Configurable via workspace admin | Teams that need RBAC + compliance |
Volatile: Pricing and exact daily limits change often. OpenAI does not publish per-plan daily Codex counts; "Limited" / "Expanded" / "Maximum" are the official labels on OpenAI's pricing page as of 2026-07-30. Always re-check before you commit a workflow to a specific tier.
A useful framing: on the free tier you can finish small scripts and a couple of real refactor tasks a day; that's enough to actually test whether Codex fits your workflow before you pay. If you find yourself running out of allowance mid-task, that's the signal to move up to Plus — the Pro tier is rarely worth it unless you're running Codex 4+ hours a day on a large repo. (We've documented the same delegate-to-free mental model in our guide to keeping AI agent token costs near zero.)
How do you stack multiple jobs the way power users do?
The trick that experienced Codex users lean on is not waiting serially — line up several independent jobs so they finish in parallel while you do something else. Each Codex surface supports this differently:
- Codex in the ChatGPT desktop app Codex mode has the cleanest "mission control" view — multiple chats/projects open side-by-side, each with its own long-running agent (Codex app docs). Start each one, then walk away.
- Codex CLI — open multiple terminal sessions, one per task; each is a separate
codexinvocation against a different repo or branch. - Codex Web (
chatgpt.com/codex) — cloud-delegated long runs that keep going while your laptop is closed.
Practical job patterns that work well in parallel:
- "Write a fresh landing page for X" + "Audit these six FAQs and rewrite each one" + "Take this long blog post and split it into ten short social posts."
- "Add input validation to the signup form" + "Write a unit test for the worker pool" + "Find and fix the race condition in the email queue."
The key is that each job should be independently completable — don't stack jobs that depend on each other, or the second will start before the first's output exists. (For a broader runbook on stacking AI agents for productivity — not Codex-specific — see our 6-step productivity workflow guide.)
Can non-coders actually use Codex?
Yes — this is the part most people get wrong. You do not write code to use Codex; you describe outcomes in plain English and the agent writes, edits, runs, and verifies the code. Real non-coder jobs that work today:
- Build a one-page site. "Build a landing page that shows how AI automation saves small-business owners time. Use this copy: …" — Codex writes the HTML/CSS, previews it, and you tweak the copy.
- Draft a folder of canned replies. "Here are the ten most-asked customer questions we get. Write a clean, friendly answer to each one and save them as separate markdown files." One job, a folder of ready replies.
- Repurpose one long piece into ten short posts. "Take this 2,000-word article and turn it into ten short social posts — different angles, same core idea." Minutes, not an hour.
These are the same patterns Codex was built for — they just don't require you to know the language the agent is typing. The job description, not the code, is the bottleneck. (If you want a model whose specific training bias is writing PRs from natural language, our Laguna S 2.1 open-weight coding model guide is a separate path worth knowing.)
What's the catch with the free path?
A few honest caveats, since the "free" promise has real edges:
- Setup takes 15–45 minutes the first time. You install the CLI, sign in, pick the working folder, and possibly authorize terminal access. There is no one-click path; OpenAI's quickstart deliberately has multiple steps so you understand what the agent can touch. Don't expect instant.
- Free-tier limits are real and rate-limit silently. You won't get a clear "you have N tasks left today" counter — Codex just becomes slower or queues the job. The official label is "Limited Codex access" on Free (OpenAI pricing).
- Free-tier jobs share the agentic pool with ChatGPT Work and Workspace Agents when those are on your plan — so if you're already using those features, your Codex allowance drains faster (OpenAI Codex plan help).
- The CLI is local, so it sees what's on your machine. That's a feature (it can read your repo) and a risk (don't point it at sensitive folders without reading the security docs). Codex asks for explicit approval before destructive or network actions by default.
- Don't confuse "free" with "no limits." A long autonomous run can still hit your daily allowance before it finishes. For real production-sized work, Plus ($20/mo) is the honest minimum.
How does Codex compare to other free coding agents in 2026?
There are real alternatives if Codex isn't the right fit; the "free coding agent" lane is wider than one product:
| Tool | Free path | Best for | Notes |
|---|---|---|---|
| OpenAI Codex CLI | Apache-2.0 open source + free ChatGPT login | Day-to-day codebase work, multi-file edits, PRs | The reference agentic coding CLI |
| Claude Code | Generous free credits + free tier | Long-context reasoning, deep refactor | Anthropic's CLI for the Claude models |
| Gemma 4 + Ollama local agent | 100% free, runs offline on your own hardware | Privacy-sensitive work, no cloud dependency | See our Gemma 4 + Ollama local coding agent guide |
| Aider + any open model | Open source; works with free local models | Terminal-native diff-style editing | The DIY power-user choice |
| Continue in VS Code | Open source extension | In-editor autocompletion + chat | Pair-programming oriented |
The honest comparison: Codex CLI is the most polished zero-cost agentic path in 2026 if you're already in the OpenAI ecosystem; local-first setups like Gemma 4 + Ollama win on privacy and offline use; and Claude Code wins on long-context reasoning per dollar. None of these has a hard requirement that you pay to start. (Want a broader list? Our 11 free open-source AI tools on GitHub rounds up the wider field.)
What this means for you
If you run a small business or you're a solo builder:
- You can put Codex to work today for zero dollars — install the CLI, sign in with free ChatGPT, hand it your most boring repeatable task. The setup friction is one evening; the savings are recurring.
- Use the desktop app's Codex mode as your "mission control." One window, multiple stacked jobs, files and previews inline — that's the real version of the "Agent OS" pattern that's worth learning.
- No coding skills required. Describe outcomes; the agent writes the code. The skill you actually need is writing clear task descriptions — and that compounds.
- Don't pay before you've tested. The Free tier is enough to evaluate whether Codex fits your workflow. Move to Plus only when you actually start hitting the free limit mid-job — not preemptively.
If you're a developer, the same setup gets you the open-source CLI under Apache-2.0 plus your existing pro-plan allowance; the only nuance is that Codex Web/Desktop share a pool with ChatGPT Work and Workspace Agents when those are on your plan.
FAQ
Q: Is OpenAI Codex actually free to use?
A: Yes — Codex is included across all ChatGPT plans, including Free and Go, with usage limits that scale up on paid tiers (Plus/Pro) (OpenAI Help Center). You can also run the open-source Codex CLI on your own machine at no charge (openai/codex README).
Q: Do I need a ChatGPT Plus or Pro subscription to use Codex?
A: No. A free ChatGPT account gets "Limited Codex access," which is enough to finish small scripts and a few real daily tasks (OpenAI pricing). Plus ($20/mo) unlocks "Expanded" usage; Pro ($200/mo) unlocks "Maximum" task limits. Move up only when you actually hit the daily allowance mid-job.
Q: What is the difference between Codex CLI and Codex in the ChatGPT app?
A: The Codex CLI is a terminal tool that runs locally on your machine, open source under Apache-2.0 (openai/codex). Codex in the ChatGPT desktop app is a GUI "Codex mode" with multiple parallel jobs and inline file previews (Codex app docs). Both draw from the same ChatGPT-plan usage pool.
Q: Can I use Codex without an OpenAI API key?
A: Yes. Run codex and choose "Sign in with ChatGPT" — this uses your ChatGPT plan quota and does not require an API key (openai/codex README). The API key path is metered separately and is not the free lane.
Q: How do I install Codex CLI on macOS, Linux, and Windows?
A: On macOS or Linux, run curl -fsSL https://chatgpt.com/codex/install.sh | sh (or npm install -g @openai/codex, or brew install --cask codex on macOS). On Windows, run powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex". All paths install the same binary — the source is on GitHub under Apache-2.0.
Q: Can a non-coder use Codex for real work?
A: Yes. You describe outcomes in plain English ("build me a landing page that explains X"), and the agent writes, edits, runs, and previews the code itself. Non-coder-friendly jobs include building simple pages, drafting canned replies, and repurposing one long piece into ten short posts.
Q: Are there third-party "free Codex API" services I should be careful of?
A: Yes — some sites resell access to the same open-source Codex CLI behind a paywall and add a middleman. The same CLI is free to run yourself from OpenAI's repo, so paying a third party for "free Codex" is usually a worse deal than installing the CLI directly. Always verify the reseller adds real value (compliance, stronger SLAs, billing) before paying.

Discussion
0 comments