9 questions answered. Every answer sourced.

ChatGPT Codex: OpenAI's Coding Agent Explained

Codex is OpenAI's coding agent. It writes, edits and tests code for you, locally on your machine or in the cloud, and it now comes with every ChatGPT plan.

GPTPrompts.AI Editorial

Facts checked against official announcements and documentation, October 2026 · Last updated October 2026

Recommended toolLovableBuild apps and websites by chatting, no coding required.Start building

Affiliate link, we may earn a commission at no extra cost to you.

01 · Basics

What Codex is

Codex is an agent: you give it a task and it works through the steps, rather than answering one prompt at a time.

What is ChatGPT Codex?

Codex is OpenAI's coding agent, included in ChatGPT. It can understand a codebase, write and refactor code, fix bugs, run tests and work on delegated tasks in the cloud while you do something else.

Source: OpenAI: Codex; OpenAI Help: Using Codex with your ChatGPT plan

Where can I use Codex?

In the ChatGPT desktop app, the Codex CLI in your terminal, the Codex IDE extension, and on the web for cloud tasks. OpenAI groups the CLI, IDE extension and desktop workflows as Codex Local, and delegated cloud tasks as Codex Cloud.

Source: OpenAI Help: Using Codex with your ChatGPT plan

Is OpenAI Codex the same as the old Codex model?

No. The original Codex was a 2021 code model behind early GitHub Copilot. Today's Codex is an agent product in ChatGPT that runs on OpenAI's current models.

Source: OpenAI: Codex

02 · Cost

Is Codex free?

Codex usage comes out of your ChatGPT plan, so the plan sets your limits.

Is Codex free to use?

Yes, with limits. OpenAI says Codex is included across ChatGPT plans, including Free and Go. Paid plans get higher usage, and heavy users can buy additional credits.

Source: OpenAI Help: Using Codex with your ChatGPT plan

Which model does Codex use?

Codex runs on OpenAI's latest models; GPT-6 Astra became available in Codex for eligible plans in September 2026, and GPT-6 Sol and Luna were added on September 22.

Source: OpenAI: GPT-6 Astra, a new generation of intelligence; OpenAI: Introducing GPT-6 Sol and Luna

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

Yes. The Codex CLI and IDE extension can also run with an OpenAI API key, billed at API rates, which suits teams who manage usage centrally.

Source: OpenAI Help: Using Codex with your ChatGPT plan

03 · Using it

Getting good results

Codex works best with small, well-described tasks and a codebase it can test.

How do I start using Codex?

Sign in with your ChatGPT account in the desktop app, or install the Codex CLI or IDE extension and connect your account. Open a project folder and describe the change you want, including how to test it.

Source: OpenAI Help: Using Codex with your ChatGPT plan

Codex vs Claude Code: which is better?

Both are capable coding agents with terminal, IDE and desktop options. Codex is included in every ChatGPT plan including Free; Claude Code needs a paid Claude plan (Pro from $20 a month) or an Anthropic Console account. Try both on the same task in your own codebase.

Source: OpenAI Help: Using Codex with your ChatGPT plan; Claude: Plans and pricing; Claude Code Docs: Overview

Is it safe to let Codex change my code?

Use version control, review every diff, and keep tests running. Agents can make confident mistakes, so treat Codex output like a pull request from a new colleague.

Sources

Read and checked October 2026. Policies change, so confirm anything time-sensitive on the source page.

Don't stop here

What to read next

Hand-picked guides our readers explore right after this one.