Codex CLI vs Claude Code: Workflow, Permissions and Costs
Short answer
Codex CLI and Claude Code are coding agents that can read a repository, edit files and run commands. Choose by the account and model you can use, the permission boundary your team needs, and how you review changes; neither product name proves better code. A fair decision uses the same small repository task and checks the diff and tests rather than treating a fast demo as a benchmark.

You will learn: how each tool is paid for, how permission prompts differ from a sandbox, where the work can start and continue, and how to compare them without moving secrets or inventing a performance winner.
This is a documentation-based comparison checked on 21 October 2026. It contains no controlled head-to-head coding benchmark or measured performance winner.
Decision point | Codex CLI | Claude Code |
|---|---|---|
Starting place | Terminal in a project directory; other Codex surfaces exist | Terminal, IDE, desktop and browser surfaces |
Paid personal route | ChatGPT Plus $20 monthly; Pro from $100 | Claude Pro $20 monthly; Max from $100 |
API route | API-key use at API rates, with some cloud features unavailable | Anthropic Console route, billed separately from a personal subscription |
Controls | Approval modes and filesystem or network sandbox settings | Permission rules, modes and sandboxing settings |
First decision | Check sign-in route, active model and review settings | Check sign-in route, active model and review settings |
Start with the account you already have
If you have a ChatGPT plan with Codex access, OpenAI's Codex CLI guide says you can sign in with ChatGPT from a project directory. OpenAI's pricing page lists Codex in the CLI with Plus at $20 a month, and describes Pro plans starting at $100 a month. The same page shows an API-key route for CLI, SDK or IDE extension use, billed at API rates and without cloud-based features available through a ChatGPT sign-in. Usage depends on model, task size and plan; a monthly subscription is not a promise of a fixed number of code changes.
If you have Claude Pro or Max, Anthropic's pricing page lists Claude Code with Pro at $20 when billed monthly and Max starting at $100. Free does not include Claude Code on that page. Anthropic's Claude Code overview also describes an Anthropic Console route. Keep the subscription and API routes separate when you compare costs.
At the comparable $20 Plus and Pro tiers, you are not buying the same model, usage allowance or cloud workflow. OpenAI's pricing page also lists some Codex access on Free and Go; check the specific CLI entitlement for the plan you hold. Ask which account your organization permits and which model it makes available. If you use an API key, measure the actual API bill separately from the subscription headline. Check both published pages again before purchasing, because availability and limits change.
Both work in a terminal, but neither is confined to one
The Codex CLI guide presents the terminal loop: open a repository, ask for a focused task, inspect the changes and use commands such as /status, /permissions and /review. It also describes codex exec for scripts and CI. OpenAI has other Codex surfaces, but this article concerns the CLI rather than the entire desktop product. If you only need the install path and first command, the Codex CLI installation guide on Xtrusio covers that separately.
Anthropic's Claude Code overview describes terminal, IDE, desktop and browser surfaces. Its VS Code guide provides editor integration. Calling Claude Code “terminal only” is therefore an outdated shortcut. The useful question is whether you want to start a task in a shell, in an editor, or from another supported surface, then keep your review routine consistent.
For a bug fix, either CLI can read the relevant files, propose an edit and run existing local tests. The Claude Code QA automation walkthrough shows why the test file and runner setup still need human checking. For an editor-heavy visual change, check the actual IDE integration instead of assuming one tool must be used from a plain terminal. For a CI task, check noninteractive execution and authentication rather than expecting a web-login session to be available on the runner.
Permission prompts and sandboxes solve different problems
A permission prompt asks whether an action should proceed. A sandbox limits what the process can access even if the agent attempts more. Do not collapse them into a single “safe mode” label.
OpenAI's sandboxing documentation explains Codex's filesystem and network boundaries. On Windows it describes a native sandbox in PowerShell and a Linux sandbox implementation under WSL2. The active permissions profile and sandbox mode matter: a command that is allowed to run can still be constrained to a workspace. The CLI guide shows /permissions for changing what Codex may do. Check the session's actual configuration before a task that could read or write outside the intended repository.
Anthropic's permissions documentation describes tool rules and permission modes that allow, ask or deny actions, alongside sandboxing that limits filesystem and network access. Its security guide covers wider safeguards and safe-use practices. Check both the user's settings and any project policy; seeing an approval prompt for one command does not prove that every other action will ask. Keep deployment credentials and production resources out of the first comparison task.
For either tool, start in a clean branch with one accepted test or a clear expected result. Require a plan before an edit, keep write access narrow, and read the diff yourself. A passing command reported by an agent should be reproducible in your environment. The best permission setup is the one your team can describe and enforce, not the one that requires the fewest clicks.
Context, instructions and integrations
Both agents depend on the repository you let them see and the instructions you give them. The Codex CLI guide recommends Git checkpoints before and after a task. OpenAI's configuration documentation explains the settings that control local behavior. Anthropic's Claude Code overview and permissions guide describe the agent's available surfaces and tool controls.
Treat project instructions as source material that needs review, not as magic that transfers perfectly between products. If one repository has an agent instruction file, read the actual text before moving it into another agent's format. The Claude Code SEO skill check illustrates why a shared instruction file needs to be inspected before use. Remove irrelevant paths and commands. Do not paste an API key into a repository instruction file to make a migration “work.” Authentication belongs in the account or secret-management route approved by your organization.
Neither agent has a universal quality advantage just because it can read a large repository. Results depend on the model available to the account, task description, repository state, tool permissions and tests. If a comparison article does not show those variables, its speed or success story is a dated anecdote rather than a transferable benchmark.
What the published prices do and do not tell you
OpenAI's current pricing page lists Plus at $20 per month for Codex access in the CLI, Pro plans from $100, and an API-key route charged at API rates. It says API-key use lacks certain cloud features, so the cheapest quoted route may not provide the workflow you expect. Anthropic's current pricing page lists Pro at $20 monthly or $200 annually, shown as about $17 per month, and Max from $100. It notes usage limits. These prices were checked 21 October 2026 and exclude any applicable tax.
If you only want one seat for occasional local changes, compare the actual usage limits and models attached to the $20 plans. If you automate in CI, compare the API route you can legitimately use rather than a consumer sign-in that is not configured for a shared runner. If the project is subject to company data rules, compare the commercial terms and administrative controls, not just the personal price.
You can record a useful local cost observation without inventing a universal dollar-per-bug rate. For one task, note the plan or API route, model, start and end usage shown by each provider, and whether the result needed a second run. Do not turn one prompt or one user's quota into a market-wide estimate.
A fair first-task comparison
Pick a small issue in a nonproduction branch where success is visible in a test. Examples include a failing unit test with a known expected value or a narrow accessibility defect. Keep the same starting commit and task text for both tools. Record the model, version, account route, permission profile and any extra context each receives. If one agent sees a different file or a different error log, you have changed the comparison.
Ask each agent to explain a plan first. Let it edit only after you understand that plan. Run the same tests yourself, review the complete diff and record unrelated changes, manual repairs and usage. For a Python task, the five-step Python output check gives a concrete review example. This process is a method to decide what works in your repository. It does not imply that we have run this benchmark, and it does not support a public winner based on speed alone.
If Codex CLI fits, use the existing installation and first-task guide rather than recreating the setup steps here. If Claude Code fits, follow Anthropic's official quickstart for its supported sign-in and project flow. In both cases, keep a human review point before a merge or deployment.
Sources and limits of this comparison
Official product sources, checked 21 October 2026: OpenAI's Codex CLI guide, sandbox guide, pricing and configuration guide; Anthropic's Claude Code overview, VS Code guide, permissions guide, security guide, quickstart and pricing. This article has no paired performance results. Recheck plan and model terms before buying or changing a team's deployment policy.
Frequently asked questions
Is Codex CLI included with ChatGPT Plus?
OpenAI's pricing page, checked 21 October 2026, lists Codex CLI access with Plus at $20 monthly, subject to usage limits.
Is Claude Code included with Claude Free?
Anthropic's pricing page lists Claude Code with Pro and Max, not Free.
Does an API key give Codex the same features as ChatGPT sign-in?
No. OpenAI says the API-key route lacks some cloud-based features and is billed at API rates.
Which tool is safer for my repository?
Check each tool's active permissions, sandbox and account policy against your repository and organization requirements.
Can I carry my instructions across?
Carry useful human instructions after reviewing paths, commands and permission assumptions for the destination tool.
Topics
- codex cli vs claude code
- claude code vs codex cli
Xtrusio
AI visibility research
Xtrusio is the Perception Engine for B2B brands.
Free check
See how AI engines answer about you
Get your free AI visibility check
Keep reading
AI Search · Oct 21, 2026 · 9 min readCursor vs Claude Code: Workflow, Agents, Pricing and Privacy
Cursor vs Claude Code in 2026: compare editor and agent workflows, current plans, model billing, privacy controls and a fair migration check.
AI Search · Oct 20, 2026 · 9 min readIs Claude Code Free? Plans, Limits and API Charges
Is Claude Code free? Compare Claude's Free, Pro and Max plans with separately billed API access, shared usage limits and billing checks.
AI Search · Oct 19, 2026 · 7 min read