Codex CLI: how many tokens per task, and what does it cost?
Codex CLI uses 3.9M tokens per task and costs $1.50 per task. AgentBurn snapshot 2026-10-27. Every figure carries a provenance label: source-backed, derived, or left empty when no public basis exists.
What it is. OpenAI's sandboxed terminal agent that batches tool calls to keep long tasks cheap
Codex CLI drives a sandboxed workspace from the shell, planning edits, executing commands and running tests in one batched loop instead of one action per turn. On the Artificial Analysis index (GPT-6.1 Sol config) it finishes coding tasks in about 15 minutes at $1.50 per task, with prompt caching doing most of the cost saving.
| Tokens per task | 3.9M | Source-backed |
|---|---|---|
| Cost per task | $1.50 | Source-backed |
| Success rate | not published | Not published |
| Cost per solved task | not published | — |
| Tool calls per task | not published | — |
| Retry overhead | not published | — |
| Minutes per task | not published | — |
| Estimated runs per day | 45,000 (model estimate) | Model estimate |
Where the tokens go
This is the per-task split AgentBurn records for Codex CLI, step by step.
| Step | What happens | Share of tokens | Tool calls |
|---|---|---|---|
| Read task and repo | Parses the issue, inspects tree and existing tests | 10% | 6 |
| Plan and locate | Finds the relevant modules and drafts an edit plan | 12% | 5 |
| Patch workspace | Applies file patches inside the sandbox | 24% | 12 |
| Build and test | Runs build, linters and the test suite in batch | 28% | 11 |
| Repair failures | Reads failing output and issues targeted fixes | 18% | 5 |
| Summarise | Writes the final diff summary and command log | 8% | 1 |
What each number is based on
AgentBurn labels every field. Source-backed means the cited page states the figure; derived means a formula on this page produced it; not published means no public basis exists and the field is left empty rather than estimated.
| Field | Basis | Note |
|---|---|---|
| tokensPerTask | Source-backed | AA v2.0 — Codex GPT-6.1 Sol (max), 3.9M tokens/task |
| costPerTaskUsd | Source-backed | AA v2.0 — Codex GPT-6.1 Sol (max), $1.50/task |
| successRatePct | Not published | AA publishes benchmark scores (Index 54, FrontierCode 49%), not a task success rate. |
| runsPerDay | Model estimate | No public source publishes daily run volume; this is a model estimate from pricing tiers and community reports, shown only in estimated-volume context. |
Frequently asked
How many tokens does Codex CLI use per task?
3.9M tokens per task, per the AgentBurn snapshot dated 2026-10-27.
What does Codex CLI cost per task?
$1.50 per task, based on the source linked in the provenance table.
Is this a vendor list price?
No. It is a per-task figure from a cited source, not a rate card; the two are not comparable.
Sources
- Artificial Analysis Coding Agent Index v1.5 — Claude Code vs Codex (Oct 2026)
- Vendor site: https://openai.com/codex/
- Repository: https://github.com/openai/codex
- Open dataset: /data/projects.json
- Methodology: how these numbers are built
Cite this page
AgentBurn (2026-10-27). "Codex CLI". https://getagentburn.com/projects/codex-cli/
Machine-readable: projects.json · Markdown version