bergen, norwayvol. i · no. 20 · July 17, 2026rss feed

Hasan Arief

A lab notebook on agentic coding, open-weight models, and what they cost to run

Guide · Claude & Codex · Agentic Coding

Codex CLI vs Claude Code: what I learned running both daily

An honest Codex CLI vs Claude Code comparison from running both daily on one codebase: strengths, config interop, and the two-model workflow that emerged.

Running both agents at their entry tiers costs 40 USD per month: Codex is included in the ChatGPT Plus plan at 20 USD per month, and Claude Code in the Claude Pro plan at 20 USD per month. That works out to roughly 1.90 USD per working day for two coding agents, assuming 21 working days per month, and the question this guide keeps returning to is whether the second subscription earns that amount. I have run both agents daily for months against the same production codebase, same repository, same tasks, often the same prompt. Most published comparisons come from an afternoon with one of the tools; this one reports what still differs after months of daily use.

In this comparison, I examine where the two agents still diverge. The summary is that they have converged on the same core loop, that the remaining differences sit at the edges (openness versus ecosystem), and that the best setup I found uses both.

The verified basics

Codex CLI Claude Code
Vendor OpenAI Anthropic
License Apache-2.0, open source (Rust, ~96% of repo) Proprietary
GitHub openai/codex, ~95k stars n/a (client not open source)
Surfaces CLI, IDE extension, desktop app, cloud/web CLI, VS Code, JetBrains, desktop app, web + iOS
Instruction file AGENTS.md CLAUDE.md (imports @AGENTS.md)
Auth ChatGPT Plus/Pro/Business/Edu/Enterprise, or API key Claude subscription or Console account
Extensibility config, permissions/rules, hooks, MCP, skills hooks, skills, subagents, plugins, MCP, Agent SDK

Sources: the Codex repo and docs, and the Claude Code docs. Both support the Model Context Protocol (MCP) for connecting external tools, both read markdown instruction files, and both ship plan modes, sandboxing, and headless operation. The core agentic loop of reading files, running commands, editing, and verifying is functionally identical in 2026. The remaining differences are therefore the informative part.

Where Codex CLI wins

In my use, Codex CLI wins on three counts.

(1) The client is genuinely open source. The CLI is Apache-2.0 (“Copyright 2025 OpenAI”), written in Rust, ships as one static binary, and sits at roughly 95k GitHub stars. You can read the source of the program that executes shell commands on your machine. In a research setting, or anywhere with a security review process, that property matters more than any feature. It should be noted, however, that the harness is open source while the models it calls are proprietary, served through a ChatGPT plan or an API key. “Open source Codex” therefore means an auditable client, not open weights; actual open-weight coding models are a separate decision entirely.

(2) Unattended runs require little supervision. The approval policy is configured in plain config (approval_policy, sandbox settings, and programmable execution rules). Set once, it permits long unattended stretches without repeated approval prompts. In my experience, for well-scoped mechanical tasks such as bulk refactors, data-file generation, and test scaffolding, Codex in full-auto completes long runs with few interruptions.

(3) A second agent provides an uncorrelated opinion. A second agent earns its place less through throughput than through decorrelated errors: its mistakes are distributed differently from the first agent’s. When one model reviews the other’s plan, real issues surface that neither flags about its own work.

Where Claude Code wins

Claude Code wins on four counts in my daily use.

Firstly, the extension ecosystem is deeper. The docs list the stack: deterministic hooks around every tool call, on-demand skills, subagents with isolated contexts, agent teams with a coordinating lead, plugins, checkpoints with rewind, scheduled routines, and an Agent SDK for building custom agents on top. Codex has hooks, skills, and MCP support as well; in daily use I find Claude Code’s versions more mature, and they compose better. My publishing pipeline (research, then draft, then a pull request with a claims checklist) is a skill, my safety rails are hooks, and my code reviews run as fresh-context subagents. Recreating that full stack on Codex today would be a project in itself.

Secondly, the session ergonomics are better. Checkpoints with rewind allow trying a risky approach and reverting if it fails, sessions are named and resumable, and a session continues across surfaces: start in the terminal, review diffs in the desktop app, check a long task from a phone. I use the phone handoff weekly, starting a task at the desk and reviewing the pull request away from it.

Thirdly, the interactive pace is better. This is subjective but consistent in my daily use: Claude Code feels faster turn to turn. Codex’s Rust binary starts instantly. Binary startup, however, is not what an interactive session waits on, turn latency is, and in interactive sessions I find myself waiting on Codex more. This is also why my split (below) sends Codex the unattended batch work, where per-turn latency is irrelevant, and keeps interactive sessions on Claude Code. Model settings and reasoning effort affect this heavily, therefore calibrate on your own setup rather than trusting anyone’s stopwatch, including mine.

Finally, steerability holds up better under long context. This is also subjective but consistent: on long multi-file tasks in a large codebase, I course-correct Claude Code less. Both models perform well on short tasks. The gap appears in hour-long sessions, where the accumulated context makes instructions progressively harder for the model to hold.

Configuration interop through AGENTS.md

Running two agents used to mean maintaining two configuration worlds. The AGENTS.md convention ended that: Codex reads AGENTS.md natively, and Claude Code imports it:

<!-- CLAUDE.md -->
@AGENTS.md

so one instruction file drives both (details in my AGENTS.md guide). In addition, my repos generate Codex skills from Claude Code skill definitions with a small sync script, so a workflow defined once can be invoked from either agent. The convention not only removed the duplicated configuration, but also brought the ongoing cost of the dual-agent setup close to zero.

The two-agent workflow that emerged

After months of daily use, my split settled into three parts.

  1. Claude Code as the primary driver: anything interactive, architectural, or multi-file, and anything that needs the hooks, skills, and subagent machinery or the review-gate pipeline.
  2. Codex in full-auto for mechanical batches: scoped, verifiable work where its low-supervision configuration fits well.
  3. Cross-review for anything expensive. Before a risky merge, the agent that did not write the change reviews the diff. For high-stakes batch decisions, for example merging thousands of database records, I have gone further: multiple independent models must agree before an action commits, and any disagreement drops to a human queue. That level of gating is unnecessary for a rename; I reserve it for cases where a wrong decision cannot be reversed.

The lesson generalizes past these two products. When two capable agents reach the same answer independently, that agreement is a cheap check on correctness. Their divergence, in contrast, indicates that the task is underspecified, a point I expand on in agentic coding best practices.

Costs, in practice

Both vendors bundle agent usage into consumer subscriptions, with API-key routes on both sides. The entry tiers I compare are ChatGPT Plus and Claude Pro, at 20 USD and 20 USD per month, respectively; Claude Pro drops to 17 USD per month when billed annually. Heavier tiers exist on both sides, ChatGPT Pro and Claude Max, each starting from 100 USD per month according to the same two pricing pages. Two entry-tier subscriptions therefore run 40 USD per month, and for me the cross-review capability alone justifies the second one. If you are choosing exactly one and price is not the constraint, choose by ecosystem (Claude Code) versus openness and unattended batch runs (Codex). If the tooling budget is tight, either one plus a disciplined setup beats both tools used casually.

Recommendations for choosing today

If you want the deepest extension surface and continuity across surfaces, choose Claude Code. If you want an auditable open-source client and long unattended runs, choose Codex CLI. If you can afford both, run both, wired to one AGENTS.md file, with cross-review between them. It is the setup I recommend, and the one I use day to day.

In either case, the instruction file, the verification loops, and the review gates matter more than which agent executes them. The practices transfer, and the subscriptions are interchangeable. I will keep this guide updated as both tools ship new releases, and the changelog below records the revisions.


Changelog: 2026-07-06: register pass (de-aphorized short verdicts, removed a negation-parallelism). 2026-06-24: first published. 2026-07-05: rewritten in the house register; replaced the cost approximation with sourced subscription prices.

Sources

  1. https://github.com/openai/codex
  2. https://developers.openai.com/codex/
  3. https://code.claude.com/docs/en/overview
  4. https://agents.md

More From the Notebook