Skip to content
, ,

OpenAI Codex Guide (November 2026): App vs CLI vs IDE, Pricing, Limits and the Pierre Deal

10โ€“15 minutes
Developer using an AI coding agent in a terminal on a laptop

OpenAI Codex has grown from a terminal experiment in April 2025 into OpenAI’s main agent product: a desktop app merged into ChatGPT, a CLI, an IDE extension, a web version and an iOS client, all sharing one account and one usage budget. This week OpenAI also announced it will buy Pierre Computer Company, the startup whose open-source Trees and Diffs libraries already power file browsing and change review inside the Codex app. If you are trying to work out which Codex surface to use, which plan you need and how the limits work in November 2026, this guide puts it all in one place.

TL;DR

  • What it is: OpenAI’s coding (and increasingly general) agent. It reads your repo, edits files, runs commands and tests, and opens pull requests.
  • Where it runs: desktop app (all plans, even Free), CLI, IDE extension, web and iOS (Plus and higher).
  • Models: GPT-6 Astra (strongest), GPT-6.1 Sol and GPT-6 Sol (everyday), GPT-6 Luna (fast and cheap).
  • Plans: Free, Go $8, Plus $20, Pro $100 / $200 / $500, Business from $20 per seat, or pay per token with an API key.
  • News: OpenAI is acquiring Pierre Computer (Code Storage, Trees, Diffs) to build Git-style code storage into Codex. Terms were not disclosed and the deal needs regulatory approval.

What Is OpenAI Codex in 2026?

The name Codex has had three lives. In 2021 it was a code model behind the first GitHub Copilot. In April 2025 OpenAI reused the name for an open-source terminal agent, the Codex CLI, and in May 2025 for a cloud agent that worked on your GitHub repo in a sandbox. Since then the product has kept absorbing more of OpenAI’s tools:

  • February 2026: a desktop Codex app for running several agents in parallel over long tasks, plus a shared “App Server” that the CLI, VS Code extension, web app and third-party IDEs all talk to.
  • March 2026: a Windows build with native PowerShell and a Windows sandbox, enterprise plugins, the Codex Security agent, and OpenAI’s deal to buy Astral (the team behind the uv and Ruff Python tools).
  • July 9, 2026: the Codex app merged into the ChatGPT desktop app, part of OpenAI’s “superapp” plan that also folds in the Atlas browser.
  • September to October 2026: the GPT-6 family (Astra, Sol, Luna) replaced the GPT-5.x models in Codex. GPT-5.5 left Codex on October 14, 2026, although it stays on the API.

So “Codex” today means one agent with several front ends. You give it a task in plain English (“add rate limiting to the upload endpoint and write tests”), it plans, edits files, runs your test suite and shows you a diff to accept or reject. Usage has grown fast: OpenAI passed 2 million weekly active Codex users by mid-March 2026, and Wired reported Codex usage rising from about 5% to roughly 40% of Claude Code’s between September 2025 and January 2026.

The Pierre Computer Deal: What Changes

On November 5, 2026 OpenAI announced it will acquire Pierre Computer Company. Here is what Pierre brings:

  • Code Storage: a hosted service that lets apps store code and track its history with Git. OpenAI plans to fold it into Codex after the deal closes. Existing customers can keep using it during the transition.
  • Trees, Diffs and Highlights: open-source libraries for file trees, diff views and syntax highlighting. Trees and Diffs already power file browsing and change review in the Codex app, and OpenAI says the projects will stay open source.

Financial terms were not disclosed, and the deal still needs regulatory approval. It lands days after OpenAI disclosed Pando, its own source-control project. Read together, the direction is clear: OpenAI wants Codex agents to have their own place to store, branch and version code, rather than depending only on GitHub. For everyday users nothing changes yet. If you rely on Codex’s review panel, it should only get better, since the people who built it are joining OpenAI.

My take: agents produce far more commits and throwaway branches than humans. A storage layer built for that volume makes sense, and it is also a quiet hedge against Microsoft-owned GitHub. Watch for a “Codex repos” feature in 2027.

Codex App vs CLI vs IDE vs Web

Surface Plans Best for Notes
Desktop app (inside ChatGPT desktop) All, including Free and Go Running several agents in parallel, reviewing diffs visually Voice input costs $0.05 per minute from your usage budget
Codex CLI Plus and higher (ChatGPT sign-in) or any API key Terminal users, scripting, SSH boxes, CI Open source; /status and /usage show limits
IDE extension (VS Code, Cursor, JetBrains via App Server) Plus and higher Working inside your editor with inline diffs Same account and limits as the CLI
Codex web (chatgpt.com/codex) Plus and higher Cloud tasks on GitHub repos, PRs while you are away Runs in OpenAI’s sandbox, not your machine
iOS Plus and higher Starting or checking tasks from your phone Good for approving PRs on the go

If you are on the Free or Go plan, the desktop app is your only option. The CLI and IDE need Plus or an API key.

How to Install and Sign In to Codex CLI

The CLI needs Node.js 18 or newer on Windows, macOS or Linux.

# npm (any OS)
npm install -g @openai/codex

# or Homebrew on macOS
brew install --cask codex

# start it inside your project folder
cd my-project
codex

The first run asks how you want to sign in:

  1. Sign in with ChatGPT (recommended for Plus and Pro). Usage counts against your plan’s 5-hour and weekly limits. No per-token bill.
  2. Use an API key. Set OPENAI_API_KEY and you pay per token at API prices, with no 5-hour window or weekly cap. Good for CI jobs or heavy bursts.

Useful commands inside the CLI:

  • /model switches between Astra, Sol and Luna and sets reasoning effort.
  • /status and /usage show remaining limits and token totals.
  • /approvals controls whether Codex asks before running commands or editing files.
  • codex exec "task" runs a one-shot, non-interactive task, handy in scripts.

Note that the old codex mcp-server command was removed on September 5, 2026. Codex still uses MCP servers as a client (add them in ~/.codex/config.toml); see my best MCP servers list for good ones.

Codex Pricing and Plans (November 2026)

Codex is not sold separately. It comes with ChatGPT plans, or you pay per token with an API key. Prices below come from OpenAI’s pricing page as summarized by Morph’s tracker (updated October 22, 2026); check OpenAI’s page before you buy.

Plan Price Codex models Codex access
Free $0 GPT-6 Luna Desktop app only
Go $8/month GPT-6 Luna Desktop app only, no credit top-ups
Plus $20/month Astra, 6.1 Sol, Sol, Luna All surfaces; 5-hour and weekly limits; can buy credits
Pro 100 $100/month Same as Plus No 5-hour window, weekly limit applies
Pro 200 $200/month Same as Plus More weekly usage
Pro 500 $500/month Plus Astra Ultrafast Highest usage; only plan with Ultrafast
Business $20/seat/month annual ($25 monthly) Astra, Sol, Luna Plus-level limits per seat
Business Premium $100/seat/month annual ($125 monthly) Astra, Sol, Luna About 5x usage, no 5-hour window
API key Per token Any model your key can call No time windows

For a full look at the ChatGPT side of these plans, see my ChatGPT Free vs Go vs Plus vs Pro comparison.

Usage Limits, Credits and How to Check Them

On Plus, Codex counts “local messages” per rolling 5-hour window, and a weekly limit sits on top. The ranges are wide because a message that reads a large repo and runs long tool loops costs far more than a quick question.

Model Plus messages per 5 hours (range) Credits per 1M tokens (in / cached / out) API price per 1M (in / out)
GPT-6 Astra 5 to 45 250 / 25 / 1,250 $10 / $50
GPT-6.1 Sol 15 to 160 50 / 2.5 / 250 $2 / $10
GPT-6 Sol 15 to 150 50 / 5 / 250 $2 / $10
GPT-6 Luna 350 to 3,000 2.5 / 0.25 / 12.5 $0.10 / $0.50

One credit is listed at $0.04. When you hit a limit on Plus you can either wait for the window to reset or buy credits. Check where you stand at chatgpt.com/codex/settings/usage, or type /status in the CLI. The full per-token rate card is in my OpenAI API pricing guide.

Which Model to Pick Inside Codex

  • GPT-6 Astra for hard problems: large refactors, tricky bugs, architecture changes. It burns limits fastest (5 to 45 Plus messages per window), so use it when Sol has already failed or the task is clearly hard. OpenAI says Astra even designed a working hardware prototype in under a week.
  • GPT-6.1 Sol as your default. Same API price as GPT-6 Sol but cheaper cached input, which matters because Codex re-reads your repo constantly.
  • GPT-6 Luna for small edits, explanations, commit messages and quick scripts. At 2.5 credits per million input tokens it is about 100 times cheaper than Astra.

Practical Tips to Stretch Your Limits

  1. Write an AGENTS.md file in your repo root with build commands, test commands and style rules. Codex reads it every session, so it stops guessing and wastes fewer turns.
  2. Start fresh threads for unrelated tasks. A long thread drags its whole history into every request.
  3. Plan with Astra, build with Sol. Ask Astra for a plan, then switch to Sol or Luna to execute it.
  4. Use an API key for CI. Pay-per-token has no 5-hour window, so batch jobs never stall overnight.
  5. Compare with alternatives if you keep hitting caps. Claude Code, Cursor and Cline all have different limit models; my coding agent comparison goes through them.

Troubleshooting Common Codex Problems

Most Codex problems fall into a few groups: install and PATH issues, sign-in issues, limits, and the agent being too cautious or too eager. Here are the ones people hit most often and what usually fixes them.

Problem Likely cause Fix
codex: command not found after installing npm’s global bin folder is not on your PATH, or the terminal was opened before the install Open a new terminal. Run npm prefix -g to find the global folder and add it to PATH (its bin subfolder on macOS and Linux), or install with Homebrew on macOS.
Install fails or the CLI crashes on start Node.js is older than version 18 Check with node -v, upgrade Node, then reinstall the package.
Sign-in hangs on a server or SSH box The ChatGPT sign-in flow opens a browser, which a headless machine does not have Use an API key on that machine by setting OPENAI_API_KEY, or sign in on a machine with a browser. OpenAI’s Codex authentication docs cover other options.
Codex keeps using the wrong account or plan Old cached login details Logins are cached in ~/.codex/auth.json or your OS credential store. Log out, then sign in again with the account you want.
“Usage limit reached” in the middle of a task The 5-hour window or the weekly limit is used up Check /status, wait for the reset, buy credits on Plus, or switch to a cheaper model such as Luna for the rest of the task.
Codex asks for approval on every command A strict approval mode is set Use /approvals to allow edits and safe commands inside the project, and keep approval on for anything risky.
Codex repeats the same mistake or ignores your test command It is guessing how your project builds and tests Add the exact build and test commands to AGENTS.md, then start a fresh thread so the old wrong attempts are not in context.
A web task cannot see your latest code Codex web works on your GitHub repo, not your local folder Push your branch first, or run the task from the CLI or IDE extension on your machine.

If none of these fit, run the same task with a smaller scope (“only change this one file”) to see whether the problem is the setup or the size of the request. Large, vague tasks are the most common reason an agent wanders off course.

Frequently Asked Questions

Is OpenAI Codex free?

Partly. Free and Go users can use the Codex desktop app with GPT-6 Luna. The CLI, IDE extension, web and iOS versions need Plus ($20 a month) or higher, or an API key.

Is the Codex CLI open source?

Yes. The CLI has been open source since its April 2025 launch. You still need a ChatGPT plan or an API key to use OpenAI’s models with it.

What is Pierre Computer and why did OpenAI buy it?

Pierre built Code Storage, a Git-based code hosting service for apps, and open-source Trees, Diffs and Highlights libraries. Trees and Diffs already run inside the Codex app. OpenAI plans to fold Code Storage into Codex; terms were not disclosed.

Codex vs Claude Code: which is better?

Both are strong. Codex wins on plan flexibility (it works from the $8 Go plan in the desktop app) and parallel agents in the app; Claude Code is often preferred for long autonomous terminal sessions. Try both on the same task in your own repo.

How do I check my Codex usage?

Open chatgpt.com/codex/settings/usage, or type /status or /usage inside the Codex CLI.

Can I use Codex with an API key instead of a ChatGPT plan?

Yes. Set OPENAI_API_KEY and the CLI bills you per token at API prices, with no 5-hour window or weekly cap. Many people use a ChatGPT plan for daily work and an API key for CI jobs and scripts.

Why does the Codex CLI say “command not found” after I install it?

Usually your terminal cannot see npm’s global bin folder. Open a new terminal, check that Node.js is version 18 or newer, and add the folder shown by npm prefix -g to your PATH (use its bin subfolder on macOS and Linux).

Final Thoughts

For most developers the sweet spot is ChatGPT Plus with GPT-6.1 Sol as the default model and Astra kept for hard problems. Move to Pro 100 only once you hit the 5-hour window every day, and keep an API key for CI. The Pierre deal will not change anything you do this month, but it shows Codex heading toward a full development platform with its own code storage. If you want an assistant that works fully offline instead, see my guide to running a local LLM with Cline in VS Code.

Sources