Asset 20 8 2
Does AI recommend your business? Run the free check →

Join 15,000 business owners, marketers and entrepreneurs. The Sunday newsletter you'll be annoyed only arrives once a week.

Article

Codex vs Claude Code: Which AI Coding Agent Suits Your Work?

Codex and Claude Code are both AI coding agents that read your project, edit files and run commands for you. Codex is OpenAI's, comes with ChatGPT plans and has an open-source command-line tool plus a cloud mode; Claude Code is Anthropic's, runs on Claude models and works in your terminal, editor, desktop app and browser.

The detail most comparisons skip is what "included" means. OpenAI's help centre says Codex is included on every ChatGPT plan, Free and Go too, but Codex Cloud, the part that runs tasks on OpenAI's computers while your laptop sleeps, isn't part of Free or Go. On the Anthropic side, most ways of using Claude Code need a Claude subscription or an Anthropic Console account.

Codex and Claude Code side by side

OpenAI CodexClaude Code
MakerOpenAIAnthropic
Where it runsCodex CLI in the terminal, an IDE extension for editors such as VS Code and Cursor, the ChatGPT desktop app and Codex webTerminal, VS Code and Cursor extension, JetBrains plugin, desktop app, the web and the Claude mobile apps, plus Slack
ModelsOpenAI models; you switch model and reasoning effort inside the toolAnthropic's Claude models
Open source?The Codex CLI is open source under the Apache-2.0 licenceNo; Anthropic keeps all rights and use falls under its commercial terms
Cloud tasksCodex Cloud on eligible Plus and higher plansClaude Code on the web and cloud scheduled tasks
Project instructionsAn AGENTS.md file in your repoA CLAUDE.md file, and it can read an existing AGENTS.md
Sign-inYour ChatGPT account, or an API key with extra setupA Claude subscription or Anthropic Console account on most surfaces
Best forPeople who already pay for ChatGPT and want local and cloud coding in one placePeople who live in the terminal or a JetBrains IDE and want fine-grained permission rules

The catch: "Codex is free" and "Codex Cloud is free" aren't the same sentence. On Free and Go you get Codex on your own machine with usage limits, not the cloud version that keeps working on tasks after you close the lid.

Same task, two styles

Fixing a bug

Say a contact form on your site stops sending emails. In Claude Code you'd open the project in your terminal, start a session and describe the problem in plain words, pasting the error if you have one. It reads the files, traces the issue, proposes an edit and asks before it changes anything, unless you've told it otherwise. You watch it work step by step and approve as it goes.

In Codex you could do exactly the same in the Codex CLI, which feels very similar. The difference shows up when you don't want to sit there: on an eligible plan you can hand the task to Codex Cloud, where it works in a separate environment and comes back with the change for you to review.

Adding a feature

For something bigger, like adding a booking calendar to a page, both tools do best when you ask them to plan first. Claude Code has a Plan mode that reads your files without editing them, so you can agree the approach before a line changes. With Codex you'd ask for a plan in the chat, then use the permissions setting to decide when it can edit files or run commands without checking in.

Who should pick which

  • Solo founder who already pays for ChatGPT: try Codex first. You've already got access, and the cloud mode is handy for running a few small jobs at once.
  • Developer or agency working across many client repos: Claude Code's permission rules and modes are detailed and can be shared through settings files, which helps when several people work on the same project. Codex's open-source CLI suits teams that want to read or adapt the tool itself.
  • Non-coder building a small site or tool: either works, but start in a browser or desktop app rather than the terminal. Ask for one small change at a time and read every summary before you accept it.
  • Anyone undecided: both can sit on the same project. A shared AGENTS.md file keeps your instructions in one place for both.

If you're starting from scratch with either one, I've written walk-throughs on how to use Claude Code and how to use OpenAI Codex.

Safety settings before you let either touch your code

An agent that can run commands can also break things quickly. Set these up once and you'll sleep better.

Work with me

Want AI doing the heavy lifting in your marketing?

I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.

  1. Work on a branch, never straight on main. If the change is wrong, you throw the branch away. Both tools are comfortable working with git.
  2. Start in the ask-first mode. In Claude Code that's Manual, the default, which asks the first time it wants to use each tool. In Codex, use the permissions setting to choose when it can edit files or run commands without asking.
  3. Plan before you build. Use Claude Code's Plan mode, or ask Codex for a plan in words, before any big change.
  4. Keep secrets out of reach. Don't let either tool read files holding passwords or API keys. Claude Code lets you add deny rules for paths you never want touched.
  5. Read every diff before you accept it. If you can't follow a change, ask the agent to explain it line by line.
  6. Run your tests. Ask the agent to run them after each change, and run them yourself before anything goes live.
  7. Save the skip-all-checks modes for throwaway environments. Anthropic says its bypass mode should only be used in isolated containers or virtual machines, not on the computer you use every day.
  8. Check your training setting. On personal ChatGPT plans, OpenAI's Improve the model for everyone setting also covers your Codex tasks, so switch it off if you don't want your code used.

Both products update often. If a menu or mode name here doesn't match what you see, search the tool's settings or help for the word, such as "permissions" or "plan".

My verdict

If you already use ChatGPT, I'd start with Codex because it costs you nothing extra to try. If you want the tightest control over what an agent can and can't do, I'd pick Claude Code. And if neither feels right, there are good Claude Code alternatives worth a look.

Frequently asked questions

Is Codex free to use?

Codex is included on ChatGPT Free and Go with usage limits, according to OpenAI. Codex Cloud, which runs tasks on OpenAI's computers, needs an eligible Plus or higher plan.

Is Claude Code open source?

No. Its public repository states that Anthropic keeps all rights and that use falls under Anthropic's commercial terms. The Codex CLI, by contrast, is open source under the Apache-2.0 licence.

Can I use Codex and Claude Code on the same project?

Yes. They work on the same files and git history. Keep shared instructions in an AGENTS.md file, which Codex uses and Claude Code can read, and don't run both on the same branch at once.

Which is easier for a non-coder?

Both are usable if you stay out of the terminal at first. Codex works inside the ChatGPT desktop app and on the web, and Claude Code has a desktop app and a browser version. Ask for small changes and read every summary.

Published and maintained by the Lilach Bullock team, covering marketing, AI and business growth.
Your buyers are asking AI who to use. Does it say you?

See for free whether ChatGPT, Claude, Perplexity, Gemini and Google name you, and get the plan to become the answer.

Check my AI visibility →
Sundays only

Get the Sunday newsletter.

One email a week. AI experiments, marketing tactics, and the workflows Lilach is building right now in her own business.

Subscribe free

Let’s get your marketing running on AI.

Book a free 30-minute call

We figure out what you need, where AI fits in, and what working together would look like.

Book the call →

Or take the 30-second calculator

You’ll see the hours and the money quietly leaking out of your week, and the three workflows worth building first.

Take the calculator →

Or grab the free AI resource library

Prompt packs, templates, checklists, and swipe files. The exact tools I build for paying clients. Yours, free.

Get the library →
Keep reading

More from the blog.