Why another comparison
The three tools are genuinely different shapes. Claude Code is a terminal-native agent that also runs in a desktop app and inside IDE extensions. Codex is OpenAI's coding agent, available as a CLI, in the IDE and as a cloud worker tied to a ChatGPT plan. Cursor is the IDE that made agents feel native to the editor and prices them from a shared usage pool. Those differences are real and worth knowing.
They are also not what your invoice reacts to. Move the same task between two of them and the bill can change by a factor of three without a single line of code changing — because the cost lives in how many turns the task takes, how much context each turn re-sends, and how much rework happens before the task is actually finished. So instead of ranking the agents on a task you did not run, this article gives you a protocol you can run on a task you did run. Ten minutes, one repository, three numbers.
What actually differs between them
Three structural differences matter for a comparison, and the rest is preference.
Where the agent lives. A terminal agent sees the repository through the commands you let it run. An IDE agent sees the editor's state, open files and diagnostics. A cloud agent sees the branch you hand it. Each vantage point changes the first ten minutes of a task more than it changes the last ten, and the first ten are where context gets loaded.
How usage is metered. Claude Code plans are metered in windows, with a five-hour block and a weekly ceiling. ChatGPT's coding usage comes along with the plan tier. Cursor meters a shared pool of requests and model usage. Three different meters, three different ways to hit a wall at 4pm on a Thursday — and the wall is what most people are actually asking about when they ask which one is cheaper.
How context is handled. This is the one nobody puts in the comparison table, and it moves the bill more than the model choice does. Whether a large file is delivered whole, whether a repeated read is refused, whether a log is truncated: these are harness decisions, and each of the three makes them differently. They are also the decisions you can measure.
The test
Pick a task you already finished last week. Not a benchmark puzzle — something from your own backlog, with the mess intact: a bug with a vague description, a small feature with two files to touch, a refactor that broke something. Then do this.
1. Freeze the starting point. Check out the commit where the task began, in a clean worktree. The three runs have to start from the same tree, or you are comparing the state of your repository rather than the tool.
2. Write the same prompt. One paragraph, the one you would have written anyway. Do not tune it per tool — the tuning is part of what you are measuring, and it is not free.
3. Run it once per tool, in the same order you would normally work. Do not rescue a run that is flailing. The flailing is data. Stop when the task is done or when you would have given up in real life, and note which one it was.
4. Record four numbers per run. Turns (round trips to the model), input tokens, output tokens, and whether the result needed a second pass. If the tool shows cache reads separately, keep that too — it is the line that explains long sessions.
5. Price the run the way you pay. If you are on a subscription, the number to compare is how much of the window the run consumed, not dollars per token. If you are on the API, multiply the tokens by your model's bands. Do not mix the two; a subscription run and an API run are not the same unit.
What to write down
Five fields are enough, and they fit on an index card: task, turns, tokens in, tokens out, rework. Keep the card. In a month you will have six cards and a picture of your own work that no published comparison can give you, because no published comparison has your repository.
The field people forget is rework. A run that finishes in eight turns and ships a bug is not cheaper than a run that finishes in twelve and ships the fix. Count the second pass, the correction, the "actually, no" message. It is where the real cost difference between agents hides, and it is why a per-token price is a bad proxy for value.
How to read the result
Divide by finished tasks, not by prompts. The number that matters is cost per task that stayed fixed, and it usually sorts the tools differently than a leaderboard does. Two patterns show up often enough to be worth naming. The first: the tool with the better first answer wins on simple tasks and loses on messy ones, because it re-reads more context per turn. The second: the tool with the cheaper per-token price loses once rework is counted, because the cheap version needed the correction.
The one conclusion the test does not support is "this model is better". It supports "this model, in this harness, on this task, cost me this much". That sentence is less quotable and far more useful.
The part comparisons skip: the harness around the agent
Between your prompt and the model there is a layer of decisions — which file gets read whole, which log gets truncated, whether a repeated read is refused, whether the build runs before the next turn. Those decisions belong to the harness, and they account for a large share of the variance in the test above. They are also the only part of the stack you can change while keeping the agent you already like.
That is the thesis of our product, so treat it as a claim to check rather than a fact. HarnessUp is a local second layer that acts through the official hooks of Claude Code and Codex, with 151 tools across ten fronts; it is not a proxy, an MCP server or a plugin, and it never reads your token or your key. Two tools from the Savings front map directly onto this article: Renew Session, which marks the turn where continuing costs more than restarting, and First Pass, which compiles right after an edit so a broken build travels with the next turn instead of buying one of its own. The panel also runs HarnessUp Bench, a public ranking of models and efforts by accuracy, optimization and spend, built from anonymous measurements of real installations — including the ones that would tell you we are wrong about a model.
And the honest boundary: today the layer integrates Claude Code and Codex automatically. Cursor is on the roadmap, not in the box. If your test says Cursor wins for your work, the correct move is to keep Cursor and skip us.
A verdict you can defend
Run the test on three tasks instead of one — a bug, a feature and a refactor — and you will have a verdict with a sample size of nine runs, which is more than most published comparisons have. Write the numbers down, keep the cards, and revisit them when a model version changes. That last part is the reason this method ages better than a leaderboard: the tool that wins today will not win forever, but your method for checking will still work.