OpenAI Codex: How to Install It and What the Limits Are

Install Codex with one command, sign in with ChatGPT, and start on Plus ($20 a month) if you want it on the web, CLI, IDE and iOS. Your limit depends mostly on the model you pick: on Plus, GPT-6 Luna gives 350 to 3,000 local…

Published:

Updated:

OpenAI Codex: How to Install It and What the Limits Are

Install Codex with one command, sign in with ChatGPT, and start on Plus ($20 a month) if you want it on the web, CLI, IDE and iOS. Your limit depends mostly on the model you pick: on Plus, GPT-6 Luna gives 350 to 3,000 local messages per five hours, while GPT-6 Astra gives only 5 to 45.

OpenAI’s Codex pricing page calls all of these figures “estimates, not fixed limits.” Codex is included with ChatGPT Free ($0), Go ($8 a month), Plus, Pro (from $100) and Business plans. This guide covers install commands, plans, limits and credits, from OpenAI’s GitHub README and pricing page checked on 19 October 2026.

Quick answer

  • What it is: OpenAI’s coding agent. It “runs locally on your computer” per the GitHub README, with web, IDE and iOS surfaces.
  • Fastest install: npm install -g @openai/codex, or brew install –cask codex on a Mac, or an install script.
  • Sign in: “Sign in with ChatGPT” (Plus, Pro, Business, Edu, Enterprise) or use an API key.
  • Heavy use: Pro currently has no five-hour limit. Everyone else gets estimates that vary by model.

How do I install Codex?

Pick one method. Each one installs the command-line version.

  1. npm: npm install -g @openai/codex
  2. Homebrew on macOS: brew install –cask codex
  3. macOS or Linux script: curl -fsSL https://chatgpt.com/codex/install.sh | sh
  4. Windows PowerShell: powershell -ExecutionPolicy ByPass -c “irm https://chatgpt.com/codex/install.ps1 | iex”

Prebuilt archives are also on the GitHub Releases page for macOS and Linux (ARM and x64). Rename the extracted file to codex. The README also shows how to force the scripts to download from GitHub Releases instead of the default host.

Then run codex and choose “Sign in with ChatGPT.” To use an API key instead, follow the extra setup on OpenAI’s auth page. Scripts that pipe straight into a shell run whatever they download, so read them first if you prefer.

Which plan fits me?

Plan Price Codex
Free $0 Quick coding tasks; GPT-6 Luna at Standard speed in the desktop app
Go $8 a month Lightweight tasks; same model access as Free
Plus $20 a month Adds Codex on web, CLI, IDE extension and iOS, plus GPT-6.1 Sol and GPT-6 Luna
Pro From $100 a month ($100, $200 or $500 tiers) Higher usage; currently no five-hour limit
Business $20 per user a month (annual, 2+ users) or $25 monthly Included
Enterprise and Edu Contact sales Flexible pricing with credits
API key Billed at API rates Cloud features (code review, Slack) not included

The simple rule: Free and Go let you try it, Plus is the first plan with every surface, and Pro is for people who hit limits daily. A team of two or more on Business pays $20 per user on annual billing, which is $5 less than monthly billing.

How many messages do I really get?

For Plus and standard Business, OpenAI lists these estimates of local messages per five hours:

  • GPT-6 Astra: 5 to 45
  • GPT-6.1 Sol: 15 to 160
  • GPT-6.1 Terra: 35 to 285
  • GPT-6 Sol: 15 to 150
  • GPT-6 Luna: 350 to 3,000

The model choice matters more than the plan. Luna’s floor of 350 is 70 times Astra’s floor of 5. Save Astra for hard problems and let Luna handle routine edits.

Cloud tasks use more of your allowance than local messages, and weekly limits may apply. Tasks that look alike can use different amounts, depending on the model, context, reasoning, tool use and caching.

What do Fast mode and credits cost?

  • Fast mode: about 2.5 times the included usage (2 times on purchased credits).
  • Ultrafast: about 8 times (6 times on credits). It is available on Pro at $500 and eligible Enterprise and Edu plans.
  • Images: image generation uses your limits about 3 to 5 times faster than similar turns without images, and it is not on Free.
  • Credits: credit rates per 1M input tokens at Standard speed are 250 for Astra, 50 for Sol, 25 for Terra and 2.5 for Luna. Astra costs 100 times more than Luna per token.

When you hit a limit, finish the current turn, then buy credits (Plus and Pro) or switch to an API key. “ChatGPT Work and Codex share usage.”

Which models are available, and what retired?

The page lists GPT-6 Astra, GPT-6.1 Sol, GPT-6 Sol and GPT-6 Luna, along with GPT-6.1 Terra. GPT-5.5 retires from Codex with ChatGPT sign-in on 14 October 2026, and that date has passed. API-key sessions are unaffected.

What should I do next?

  1. Install with npm or Homebrew and sign in with ChatGPT.
  2. Start on Free or Go to see whether Codex suits your work.
  3. Move to Plus when you want web, IDE and iOS access.
  4. Track usage on the dashboard and switch to Luna when you run low.
  5. Choose Pro only if five-hour limits slow you down every day.

Compare with other tools in Codex vs Claude Code vs Cursor.

Questions and answers about Codex

Is Codex free?

Yes, for quick coding tasks. The Free plan costs $0 and uses GPT-6 Luna at Standard speed in the desktop app. Paid plans add more.

How do I install Codex CLI?

Run npm install -g @openai/codex, use Homebrew, or run the install script from the README. Then run codex and sign in.

How many Codex messages do I get on Plus?

OpenAI estimates 5 to 45 with GPT-6 Astra, up to 350 to 3,000 with GPT-6 Luna, per five hours. These are not fixed limits.

What happens when I hit the limit?

You can finish the current turn. Then buy credits on Plus or Pro, or use an API key billed at API rates.

Does an API key give me everything?

No. Cloud features such as code review and Slack are not included with an API key.

Is Pro really unlimited?

Pro currently has no five-hour limit, though weekly limits may still apply.

Sources

Facts last checked on 19 October 2026. Plans and limits change.

All sections All articles

Latest articles