Claude Code vs Codex vs Copilot CLI: an honest comparison
Three terminal coding agents, one loop. How they differ in plans, models, limits and setup, and how to test them fairly.

Key takeaways
- All three run the same loop in your project folder: read, plan, edit, run, check.
- Claude Code is the most configurable; Codex comes with every ChatGPT plan; Copilot CLI lets you switch between models from several providers.
- Usage is counted differently: Claude in five-hour and weekly limits, Codex in five-hour windows on Plus, Copilot in monthly AI credits.
- Test them on the same real task from a clean Git state and judge the diff, not the summary.
Claude Code, OpenAI's Codex CLI and the GitHub Copilot CLI are three coding agents that work the same basic way: you run them in a project folder, describe a task, and they read files, plan, edit and run commands until the job is done. The biggest practical differences are which subscription you already pay for, which models you get, and how each one handles permissions and billing. If you already have Claude Pro, ChatGPT Plus or a Copilot plan, the agent that comes with it is usually the best place to start.
Below is an honest side-by-side, followed by a simple way to test them on your own code before you commit to one.
How terminal coding agents work
All three run a loop on your machine. They read the relevant files, propose a plan, change files, run your build or tests, look at the result, and go round again until the check passes or they need you. Each one asks for permission before risky actions unless you tell it not to.
Because the loop is the same, quality depends mostly on the model behind it and on the context you give it: a clear task, the right files, and an instructions file that explains how your project is built.
Side-by-side comparison
Facts below come from each vendor's own documentation and pricing pages in December 2026. Prices and limits change often, so follow the links before you buy.
| Claude Code | Codex CLI | Copilot CLI | |
|---|---|---|---|
| Made by | Anthropic | OpenAI | GitHub |
| Sign in with | Claude Pro, Max, Ultra, Team, Enterprise, or a Console (API) account | Any ChatGPT plan, Free included, or an API key | Any Copilot plan, Free included |
| Cheapest paid plan | Claude Pro, $20 a month (or $17 a month billed yearly) | ChatGPT Go, $8 a month; Plus is $20 | Copilot Pro, $10 a month |
| Models | Anthropic's Claude models | OpenAI's models | A choice of models from several providers |
| How usage is counted | Five-hour session and weekly limits, shared with the Claude apps | Messages per five-hour window on Plus; weekly limits may apply | Monthly AI credits, priced by tokens and model |
| Project instructions | CLAUDE.md | AGENTS.md | Custom instruction files |
| Source code | Closed | Open source (Apache-2.0) | Closed |
| Other ways to use it | Claude desktop app, VS Code and JetBrains | ChatGPT desktop app, IDE extension, cloud tasks | Editors, GitHub Copilot app, cloud sandbox |
Claude Code: strongest when you live in one project
Claude Code is the most configurable of the three. A CLAUDE.md file at the root of your project tells it how to build, test and style the code. It supports subagents for parallel work, hooks that run your own scripts before or after its actions, MCP servers for outside tools, and a plan mode for agreeing the approach first. It installs on macOS, Linux and Windows, natively or inside WSL (see running Claude Code on Windows).
The catch is usage. Pro and Max have a five-hour session limit and a weekly limit, and both count your Claude chats too. Heavy agent work on Pro can reach the limit in an afternoon. Our guide on what to do when you hit the Claude limit covers the options.
Codex CLI: the easy choice if you pay for ChatGPT
If you already have ChatGPT, Codex costs you nothing extra to try: run codex, choose Sign in with ChatGPT, and it uses your plan. It reads AGENTS.md for project instructions, which several other tools also understand, so one file can serve more than one agent. The CLI is open source, and the same sign-in works in the ChatGPT desktop app's Codex mode and the IDE extension. Eligible paid plans can also hand tasks to Codex cloud, which runs them on OpenAI's computers. More in how to use your ChatGPT plan for coding.
Copilot CLI: model choice and GitHub built in
The Copilot CLI's strength is flexibility. You switch models with /model, so one subscription gives you models from more than one company. It understands GitHub natively, can open issues and pull requests, and its --cloud option starts a sandbox on GitHub's servers that you can follow from other Copilot clients. Since GitHub moved to AI credits, a big model on a long task costs more credits than a small one on a quick fix, so cost depends on the choices you make. Setup steps are in using Copilot outside VS Code.
How to choose, and a fair way to test
Start from what you already pay for. If you have none of the three, the cheapest paid entry is Copilot Pro or ChatGPT Go, but cheap plans also have small allowances. Then run the same test on all the candidates:
- Pick a real task from your project, small enough for one session: a bug with a known cause, or a small feature with a clear finish line.
- Commit everything to Git so each tool starts from the same state.
- Give each agent the identical prompt, in plan mode first. Compare the plans before allowing edits.
- Let each one build, then read the diff and run the tests yourself. Note how many times you had to step in.
- Check usage afterwards: the session limit meter in Claude, the Codex usage page, or
/usagein Copilot. - Reset with
git checkout .(or a fresh branch) between tools.
Many developers end up using two: one as the daily driver, a second for when the first runs into its limit or gets stuck on a problem.
Use all three from one desktop app
Ninja Builder is a desktop app for Mac, Windows and Linux that runs these agents with your own accounts: Claude, ChatGPT through Codex, GitHub Copilot, plus Cursor, Gemini and local models. They all sit in one account menu, and you can move a chat from one provider to another, which makes the side-by-side test above much quicker.


To be clear about the trade-off: Claude chats get Ninja Builder's full team of agents, playbooks and checks, while Codex and Copilot chats use their own tools, with Ninja Builder adding the live preview, the Git client and the shared chat history around them. The app has a 14-day free trial, then costs $4.99 a month. See all features or download Ninja Builder.
Frequently asked questions
Which is better, Claude Code or Codex?
Neither wins every task. Claude Code offers more ways to configure the agent, while Codex is included with every ChatGPT plan and its CLI is open source. Run both on the same real task from your project and compare the diffs.
Is the Codex CLI free?
The CLI itself is open source. To use it you sign in with a ChatGPT plan, which includes Codex from the Free plan up, or use an OpenAI API key billed per use.
Can GitHub Copilot CLI use Claude models?
The Copilot CLI lets you switch models with the /model command, and GitHub offers models from several providers. Check GitHub's supported models page for the current list on your plan.
Do I need to pay for all three?
No. Start with the agent included in a plan you already have. Add a second one only if you regularly hit limits or want a second opinion on hard problems.
Keep reading

How to use your ChatGPT Plus plan for coding (Codex in a desktop app)
Your ChatGPT plan already includes Codex. Here is how to code with it in a desktop app or the CLI, and how the limits work.

How to use GitHub Copilot outside VS Code
Your Copilot plan works in other editors, the terminal and a desktop app. Setup steps for each, and how AI credits are billed.

What AI coding really costs: subscriptions vs API keys
Plans with limits or pay-per-token API keys: how coding usage is counted, current prices, and how to estimate your own bill.