Claude Code vs Codex CLI: terminal coding agents compared (October 2026)

Claude Code (Anthropic, v2.1.310) and Codex CLI (OpenAI, 0.164.0) are both terminal coding agents that read your repo, edit files and run commands, and we smoke-tested both on 2026-10-25 with a small local model. Claude Code also runs in VS Code, JetBrains, a desktop app and the web and needs a Claude plan or Console account; Codex CLI is open source under Apache-2.0 and installs from a script, npm or Homebrew. Neither test used the vendors' own models, so this is not a quality ranking.

Our pick: Pick Claude Code for anyone relying on the Bash sandbox or permission rules (the 2.1.309 fixes close real gaps); pick Codex CLI for people who already use Codex and repeat the same setup prompts (presets save the typing). No overall winner: we have not benchmarked them against each other. Updated (America/Chicago).

Evidence: Tested (smoke test) for both tools on 2026-10-25 (America/Chicago), using a small local open-weight model (Qwen2.5-3B-Instruct, 4-bit, via Ollama 0.40.11) on a Linux box with no GPU and no vendor account. We tested the tools, not any vendor's hosted models. Features, prices and release contents are Reported from vendor pages.

Claude Code

Anthropic · v2.1.310

Tested (smoke test)

Update now if you use the sandbox or run Claude Code on a cloud provider; skip if you wanted flashy new features, this is a hardening release.

Codex CLI

OpenAI · 0.164.0

Tested (smoke test)

A quality-of-life release: worth updating if you re-type the same prompts or switch models a lot, not a reason to switch tools.

Side by side, from what we recorded

Each row compares one recorded fact for both tools. Rows are not weighted and nothing is added up into a score; the note under each row says what the marker means.

  • Evidence

    Tested (smoke test) for Claude Code
    Tested (smoke test) for Codex CLI

    Tested = we ran it (smoke test); Reported = we read official sources

  • Smoke-test result

    Partly worked for Claude Code
    Partly worked for Codex CLI

    Each tool's own smoke test on the same CPU-only machine; tasks differ unless the logs say otherwise

  • Editorial rank: AI coding agents

    #1 (Claude Code is ahead on this row) for Claude Code
    #2 for Codex CLI

    Lower is higher on our list; an editorial pick, not a benchmark

  • Editorial rank: vibe coding

    #1 (Claude Code is ahead on this row) for Claude Code
    #2 for Codex CLI

    Lower is higher on our list; an editorial pick, not a benchmark

  • Release date

    Oct 23, 2026 for Claude Code
    Oct 23, 2026 for Codex CLI

    Newer date only; says nothing about quality

  • Pricing we could verify

    Not verified for Claude Code
    Not verified for Codex CLI

    About our evidence only, not about the price

  • Steps in our setup guide

    4 for Claude Code
    5 for Codex CLI

    Counts our guide's steps, not difficulty

  • Sources we cite

    3 for Claude Code
    2 for Codex CLI

    How much we had to read; more is not better

A list of recorded differences, not a quality score or a ranking. We have not benchmarked these tools against each other; the smoke-test row links each tool's own log. How we label evidence.

What we measured

We ran both Claude Code and Codex CLI ourselves; the table links each full test log. These are smoke tests on one CPU-only machine, not benchmarks. Both ran the same task on the same local model, so the two results are comparable on that one task only. Model-driven runs used a small local Qwen2.5-3B-Instruct model.

Our own tests for Claude Code and Codex CLI
TestClaude CodeCodex CLI
Hands-on test log (install and a real task)Tested: Claude Code 2.1.310, Oct 25, 2026: partly worked. Claude Code 2.1.310 edited calc.py through its Edit tool with a local 3B model on the second prompt (85.9 s); the first, vaguer prompt made no edit. Full test logTested: Codex CLI 0.164.0, Oct 25, 2026: partly worked. Codex CLI 0.164.0 changed calc.py by running a sed command in its sandbox with a local 3B model; an earlier plain-language edit request ran no edit. Full test log

How we test and label results: methodology. All test logs: test hub.

Claude Code vs Codex CLI at a glance

Claude Code and Codex CLI side by side (vendor pages and our test, 2026-10-25)
FeatureClaude CodeCodex CLI
VendorAnthropicOpenAI
What it is"An agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools" (overview)"Lightweight coding agent that runs in your terminal" (GitHub repository)
Where you use itTerminal, VS Code, JetBrains, a desktop app and the webTerminal
LicenseNot stated on the pages we readApache-2.0, per the GitHub repository metadata
InstallNative installer, Homebrew, WinGet or apt, dnf, apk; npm install is deprecatedInstall script, npm (npm install -g @openai/codex) or Homebrew
Latest version coveredv2.1.310 (released 2026-10-23)0.164.0 (released 2026-10-23)
Models and accessClaude models via a Claude subscription or Anthropic Console account; CLI, VS Code and JetBrains also support third-party providersSign in with a ChatGPT plan, or point it at other providers; we ran it against a local model
Smoke test resultRan an edit through a local model: vaguer prompt failed, exact-path prompt workedRan a sandboxed command through a local model: worked; plain-language edit requests were unreliable
Evidence on this siteTested (smoke test)Tested (smoke test)
Last verified2026-10-252026-10-25

What we ran, and what we did not

On 2026-10-25 we installed and ran both tools on a Linux x86_64 box with 8 CPUs, no GPU, no vendor account, login or API key. Both were pointed at the same small local model, Qwen2.5-3B-Instruct (4-bit) served by Ollama 0.40.11, and given the same style of task: change a-b to a+b in calc.py.

  • Claude Code: installed with Anthropic's native installer; claude --version printed 2.1.310. Pointed at the local model, a headless run used the Edit tool and changed the file once we gave the exact path and strings; the first, vaguer prompt made no edit. Full log.
  • Codex CLI: installed @openai/codex from npm; version 0.164.0. codex exec --oss --local-provider ollama ran a sed command we asked for inside its sandbox and changed the file. An earlier plain-language edit request ran no edit (the small model tried a sub-agent call that failed to parse); we kept two runs, so this is not a pass rate. Full log.
  • Not tested for either: the vendors' own models, subscription or ChatGPT sign-in, the features named in the latest releases, MCP, IDE extensions and desktop or web surfaces.

The two runs are not a head-to-head benchmark. The attempts, prompts and agent settings differed, and a 3B local model says little about how either tool performs with its vendor's models. See the full notes on the Claude Code and Codex CLI pages.

Features the vendors document (Reported)

What each tool says it can do
CapabilityClaude CodeCodex CLI
Edit files and run commandsYes; plans, writes code across multiple files and verifies it worksYes; runs commands in a sandbox (we saw this)
Git and pull requestsStages changes, writes commit messages, creates branches and opens pull requestsNot covered on the pages we read
Parallel and background workMultiple agents with a lead agent; background agents; scheduled tasksNot covered on the pages we read
CustomisationCLAUDE.md, skills, hooks, MCP; can read AGENTS.md insteadNumbered /presets slots for reusable prompts; inline /model and /permissions arguments (0.164.0 notes)
Enterprise and cloudBedrock, Vertex and Foundry support; Enterprise custom roles for cloud sessions and Remote Control (v2.1.310 notes)Enterprise MCP sign-in; Amazon Bedrock setup wizard on by default (0.164.0 notes)
Security work in the latest releasesSandbox and permission fixes in v2.1.309 and v2.1.310Credential masking in remote Bash and Zsh snapshot sessions

These come from Claude Code's overview and the release notes we read, not from our test. None of these features were exercised in our smoke tests.

Pricing

Claude Code is included with Claude Pro ($20 a month, or $17 a month billed annually) and the paid plans above it, and is not included on the Free plan, per claude.com/pricing read on 2026-10-25. Usage shares one pool with the rest of your Claude plan. Codex CLI's code is open source; using it with a ChatGPT plan depends on that plan, and we did not verify OpenAI's current limits, so check OpenAI's pricing page before relying on it.

Pick Claude Code if / pick Codex CLI if

  • Pick Claude Code if you want the same agent across terminal, IDE, desktop and web, plus scheduled runs, CI integrations and the Agent SDK, and you already use or plan to buy a Claude plan.
  • Pick Codex CLI if you want an open-source terminal agent under Apache-2.0 that you can read and run from a script, npm or Homebrew install, and you are comfortable using OpenAI sign-in or your own provider.
  • Expect to be specific either way. In our runs, both tools needed a precise instruction before a small local model made the edit. A larger hosted model may behave differently, and we did not test that.
  • Not sure? Try both on a small throwaway repo with the same prompt. Also see what is an AI coding agent and Claude Code vs Cursor.

What others found

Codex vs Claude - an Honest Comparison · Tech With Tim ·
Watch on YouTube

Third-party video, not one of our tests. Nothing here is marked Tested because of it.

FAQ

Is Claude Code or Codex CLI better?

We cannot rank them on quality. We smoke-tested both on 2026-10-25 using a small local model, not either vendor's own models. Claude Code spans terminal, IDEs, desktop and web; Codex CLI is an open-source terminal agent.

Is Codex CLI free and open source?

The code is open source under Apache-2.0, per the GitHub repository metadata. Using it with your ChatGPT plan depends on that plan, so check OpenAI's pricing for current limits.

Is Claude Code free?

Claude Code is not included on the Free Claude plan. It is included with Claude Pro at $20 a month ($17 a month billed annually) and the paid plans above it, per claude.com/pricing read on 2026-10-25.

How do I install Claude Code and Codex CLI?

Claude Code: run the native installer from code.claude.com/docs (curl -fsSL https://claude.ai/install.sh | bash on macOS, Linux and WSL), or use Homebrew or WinGet. Codex CLI: use the install script, npm install -g @openai/codex, or Homebrew. See each tool page for the exact commands.

Did you test Claude Code and Codex CLI?

Yes, a smoke test of each on 2026-10-25. Both were run with a small local model (Qwen2.5-3B-Instruct) with no vendor account. We did not test the vendors' hosted models, sign-in, or the newest features in each release.

Can Claude Code or Codex CLI use local models?

In our test both could be pointed at a local Ollama model: Claude Code through its Anthropic-compatible API, and Codex CLI with the --oss option. A 3B model made plain-language edits unreliable, so expect a larger model to be needed for real work.

Sources

Page history

  • : First published. Facts read from the official pages listed under Sources on this date.

Markdown version for agents: /compare/claude-code-vs-codex-cli.md