How Codex CLI cost works
Codex CLI cost follows the tokens of each model call. Below are OpenAI model prices and how to work out your real usage.
Data as of 2026-10-31
How Codex CLI cost accrues
Each model call is billed on input tokens, output tokens and input tokens that hit the cache, each with its own price (the Input, Output and Cache read columns below). When the same context is sent repeatedly, whether it hits the cache directly changes your monthly cost.
Budgethelm amounts are estimates, not invoices; your OpenAI bill is authoritative.
OpenAI model prices
| Model | Input | Output | Cache read | Checked (official pricing page) |
|---|---|---|---|---|
gpt-6.1-sol | $2.00 | $10.00 | $0.10 | 2026-10-31 |
gpt-6.1-terra | $1.00 | $5.00 | $0.05 | 2026-10-31 |
gpt-6-luna | $0.10 | $0.50 | $0.01 | 2026-10-31 |
* These rows carry conditions (long-prompt surcharge, peak or promotional pricing). The official page is authoritative.
Each date links to the official pricing page. For other models see the model price comparison and the cost calculator.
How Budgethelm tracks Codex CLI
Once connected, Budgethelm reads Codex's own logs in the background (rollout jsonl files under ~/.codex/sessions) and totals tokens and cost by tool, computer and model. Only time, tool, model, token counts and stop records are uploaded.
When Codex CLI gets stuck
Codex hooks only run after you trust them in /hooks, and there is no official way to pre-trust one at user level. So Budgethelm watches Codex's log file from a background process, applies the same stop rules and halts a looping codex exec.
Benchmark (a local fake model returning the same error on every step):Codex (codex exec),without Budgethelm:About 170 calls in 8 s;with it:Stopped in 1.7 s。Method and the other tools are on the home page。
FAQ
- How much does Codex CLI cost per month?
- There is no single number. It depends on the model, how many runs a day and how long the context is. Use the price table above with the cost calculator and enter your own numbers.
- Are scheduled codex exec runs visible too?
- Yes. Budgethelm reads Codex's log file, which both interactive sessions and codex exec write to, and it stops a stuck run.
- Does the amount match my OpenAI bill?
- No. It is estimated from the built-in price list and the token counts in the log. Your OpenAI bill is authoritative.