On this pageStart with the account you already have

Codex CLI vs Claude Code: Workflow, Permissions and Costs

Xtrusio8 min read

Short answer

Codex CLI and Claude Code can read a repository, edit files and run commands. Choose by the account and model you can use. Check the limits your team needs for tool access. Then review the changes and tests. Neither product name proves better code. A fair trial uses the same small task in each tool.

Professional reviewing code at a laptop while comparing Codex CLI and Claude Code
Photo: Kampus Production / Pexels. Stock model, not an OpenAI or Anthropic employee.

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.

The $20 Plus and Pro tiers do not buy the same model, usage allowance or cloud workflow. OpenAI also lists some Codex access on Free and Go. Check the CLI access on your own plan. Ask which account and model your organization permits. If you use an API key, track its bill apart from the subscription. Check both price pages again before buying because access and limits can 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.

Start either tool in a clean branch. Choose one accepted test or state the expected result. Ask for a plan before the edit and keep write access narrow. Read the diff yourself. Run the reported checks in your own environment. Pick permission settings your team can explain and enforce.

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 wins on code quality just because it can read a large repository. Results depend on the model, task, files, permissions and tests. A comparison that omits those details gives you a dated story, not a repeatable 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.

For occasional local changes, compare the models and usage limits on the $20 plans. For CI, compare the API routes you can use. A personal sign-in may not suit a shared runner. If company data rules apply, read the commercial terms and admin controls too.

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 branch that is not used for production. Choose a test with a known result or a narrow accessibility defect. Give both tools the same starting commit and task. Record the model, version, account route, tool permissions and extra context. If one tool sees different files or logs, the comparison has changed.

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

Talk to us about the managed plan (free trial)