6 min read · updated 2026-10-14 · reviewed

How much does a Codex CLI session really cost?

A coding agent bills by tokens, but most of the tokens in a session are not new text: they are the same long context sent again on every step. This guide shows how to count a Codex CLI or Cursor session honestly, what changes when cached input is cheaper, and how to estimate your own spend before you start a long task.

Editorial note

Written by Model.sale Engineering and reviewed against first-party documentation on 2026-10-14. Comparisons use the billing rules visible on the linked sources and do not claim universal model equivalence.

Three kinds of tokens

A session sends fresh input (text the model has not seen yet: your prompt, newly read files and tool results), cached input (context the provider already holds: system prompt, earlier steps and files read before) and output (code, explanations and tool calls). Output is usually the smallest share; cached input is usually the largest.

Why the cache decides the bill

An agent re-sends its whole conversation on every step. Providers recognise the repeated prefix and serve it from a cache at a fraction of the normal input price. In a long session it is common for more than 80% of input to be cached, so the price of cached tokens matters more than the headline price per token.

How Model.sale counts a session

Model.sale charges one flat rate per million charged tokens and counts cached input at 40%. For a session: charged tokens = fresh input + output + 0.4 x cached input. At the time of writing the rates are $0.08 per million for gpt-6-luna, $0.38 for gpt-6-sol and $0.40 for gpt-6.1-sol; the live table is on the models page. The method behind the comparison with list prices is public in the pricing methodology.

A worked example

Take a medium refactoring session: 150,000 fresh input tokens, 2,000,000 cached input tokens read over many steps, and 60,000 output tokens. Charged tokens = 150,000 + 60,000 + 0.4 x 2,000,000 = 1,010,000. At $0.38 per million (gpt-6-sol) that is about $0.38; at $0.40 (gpt-6.1-sol) about $0.40; at $0.08 (gpt-6-luna) about $0.08. A small bug fix with 20,000 fresh, 200,000 cached and 8,000 output tokens is 108,000 charged tokens: about $0.04 on gpt-6-sol. Ten medium sessions a day come to roughly $3.80 a day on gpt-6-sol.

Estimate your own bill

The dashboard shows the exact charge of every request, so run one representative task first and read its total, then multiply by how many such tasks you expect. The cost calculator on the site accepts fresh, cached and output tokens. Compare the result with the invoice from any other provider for the same session rather than with a headline price per token.

Keep spend predictable

Create one key per project, give it a daily spend limit and a model allowlist, and keep the balance prepaid: when it runs out, requests stop instead of producing a surprise invoice. To connect Codex CLI or Cursor, follow the setup guides, and start with the smaller model for routine edits.

Sources and further reading

Checked on 2026-10-14. These links support the factual comparisons in this article; pricing and terms may change.

Use the numbers on your own workload

Open the cost calculator, choose a live model and enter a representative input/output mix before deciding.

Open cost calculator
← All guides