Short answer
Both are coding agents that read your project, edit files and run commands, and both start at $20 a month for real use. Codex has a free and an $8 entry point and turns its sandbox on by default, while Claude Code needs a paid plan, starts with its sandbox off, and gives you Anthropic's Opus 5.5, which leads Anthropic's own terminal-coding tests.
Follow-up question Which one should a solo developer pay for?
Claude Code, from Anthropic, and Codex, from OpenAI, do the same basic job. You describe a change in plain language, and the agent reads your code, plans, edits several files, runs your tests and reports back. Both work in a terminal, in code editors, in a desktop app and on the web, and both can review pull requests on GitHub. In everyday use the gap between them is smaller than the marketing suggests.
The differences that matter for a learner sit in four places: what each plan costs, which models you get, how usage limits are counted, and how much the agent may touch on your computer before it asks. All figures below are as of October 2026.
Plans and prices side by side
| Claude Code (Anthropic) | Codex (OpenAI) | |
|---|---|---|
| $0 | Not included in Claude Free | ChatGPT Free: GPT-6 Luna in the desktop app, subject to rollout |
| $8 a month | No plan at this price | ChatGPT Go: GPT-6 Luna for light tasks |
| $20 a month | Claude Pro ($17 if paid yearly), with Opus, Sonnet and Haiku | ChatGPT Plus: web, CLI, editor extension, iOS and cloud code review; models GPT-6.1 Sol and Luna |
| Heavy use | Max from $100: 5x or 20x Pro usage | Pro at $100, $200 or $500; no five-hour limit for now |
| Pay as you go | API credits at standard token rates | API key in the CLI and editor, without cloud features |
At $20 the two are level. The real difference is at the bottom: Codex lets you try agentic coding without paying, on a small model, while Claude Code needs Pro or higher.
Which models you get
Claude Code runs Anthropic's own models. On Pro you can pick Opus 5.5 for hard work, Sonnet 5.5 for most coding, and Haiku 5.5 for quick helper jobs. Codex on Plus gives you GPT-6.1 Sol, OpenAI's mid-priced model aimed at long coding sessions, and the light GPT-6 Luna; GPT-6 Astra, OpenAI's top model, appears in Codex's usage tables with a much smaller allowance.
On published tests, Anthropic reports Opus 5.5 at 66.4% on Terminal-Bench 4.0, a test of multi-step work in a command line, while OpenAI says GPT-6.1 Sol nearly matches Astra at a fifth of the price. Each company chose and ran its own tests, so treat both claims as a reason to try, not as a verdict.
How usage limits work
Neither company sells a fixed number of messages. Anthropic resets limits on a rolling five-hour window, adds weekly limits on paid plans, and counts Claude Code and chat from the same pool. OpenAI publishes estimates instead: on Plus, roughly 15 to 160 local messages per five hours with GPT-6.1 Sol, 350 to 3,000 with Luna, and 5 to 45 with Astra, with weekly limits possibly on top. Long tasks, large projects and cloud runs use more.
Both let you keep going after a limit: Claude by turning on usage credits at API rates, Codex by buying ChatGPT credits or switching to an API key. In Codex, the /status command shows what is left; in Claude, the usage page in settings does.
Safety defaults
This is the difference beginners most often miss. Claude Code's sandbox, an operating-system fence that limits which folders and websites the agent's commands can reach, is off by default. You switch it on by typing /sandbox in a session. Once on, commands can write only inside your project and a temp folder, and network access starts with an empty list of allowed sites. On native Windows it does not run at all; you need WSL2.
Codex works the other way: its default permission mode runs commands inside a sandbox automatically, and it asks before going further, such as using the internet.
A safe first session in either tool looks like this:
Before changing anything, read this project and tell me in five lines what it does and how its tests run. Then fix the failing test in tests/test_dates.py. Do not install new packages, do not touch files outside src/ and tests/, and show me the diff before you finish.Try it: Make a throwaway copy of a small project, turn on the sandbox if you use Claude Code, and give your agent the prompt above. Note how long it took, how many changes you had to correct, and how much of your five-hour allowance it used.
Which one should a solo developer pay for?
If you are not ready to pay, start with Codex on ChatGPT Free or Go. Luna is a small model, so keep tasks small and well described, but you will learn the habits that carry over: clear instructions, tests first, and reading every diff.
If you are ready to spend $20 a month, the deciding question is less about raw quality than about fit. Choose Claude Pro if you want Opus 5.5 and Sonnet 5.5 for long, sprawling changes and you are comfortable switching the sandbox on yourself. Choose ChatGPT Plus if you want Codex's published usage estimates, the sandbox on from the first command, and cloud code review on your GitHub pull requests. If you already pay for one company's chat app, that plan is usually the better buy, because the same subscription covers the agent.
Move up to Max or Pro only after you have hit your limits for a few weeks running. Many solo developers find that one $20 plan, used with the mid-tier model by default, covers their week. If you outgrow it, compare the cost of a bigger plan with pay-as-you-go API use before you upgrade.
Sources
- Pricing | Claude — Anthropic, October 28, 2026
- Codex pricing — OpenAI, October 28, 2026
- Sandboxing - Claude Code Docs — Anthropic, October 28, 2026