Choosing a model and the cost of subagents
Subagent cost is made of input tokens (paid again at every step), output tokens, the number of steps and the number of agents. Parallelism cuts time, not cost: each agent reads its own context and brief. Pick the model by the price of a mistake and ease of checking: cheaper for mechanical work, stronger for design and risky changes. Compare the cost of an accepted result, including review time.
Agentic development · Orchestration
Four agents finished sooner and the bill grew. Is that normal?
A team parallelised a test migration: four subagents instead of one. Time dropped threefold while token use grew almost twofold, because each agent read the same shared files on its own. The general rule for choosing a model by complexity is in the first article of the section. Here: what the cost is made of and how to manage it without tying to specific models and prices, which change fast.
How it works and why. An agent works in steps and at every step the model receives the whole accumulated context again. So the cost depends not only on the length of the answer but also on how much was read earlier and how many steps were taken. That explains why "read a big log at the start" is paid for many times.
What the cost is made of.
- Input tokens: at every step the agent "sees" the context again, so big files and long logs are paid for many times. Some providers lower the price of a repeated prompt prefix through caching, but that is a reduction, not free, and it works only while the cache is warm;
- Output tokens: code and long reports the agent generates. Their price per token is usually higher than input;
- Number of steps: every failed attempt and retry adds cost;
- Number of agents: each subagent reads its own context and spends tokens on the brief, and a reviewer doubles part of the work.
Where the cost comes from
Parallelism cuts time, not cost. Four agents will finish sooner but together spend no less than one, and usually more because of repeated reading of shared context and the briefs.
How to choose a model. Look at two things: how costly a mistake is and how easy the result is to check.
- searching usages, summarising logs, repetitive edits with tests: a cheaper and faster model;
- ordinary implementation from a clear plan with tests: a mid-level model;
- design, a non-obvious bug, security and risky-change review: the strongest model, because the cost of a mistake is high.
The escalation ladder. Start with a cheaper model and move to a stronger one if the result fails the check. But a cheap model needing three rounds of fixes may cost more than a strong one on the first try, and the most expensive thing remains the time of the human who checks. So look at the cost of an accepted result, not of a single request.
Example: a comparison on your own tasks. Twenty uniform test-porting tasks were run on two models. Illustrative numbers (not real prices):
| Model | Accepted as is | Tokens | Review minutes |
|---|---|---|---|
| Cheaper | 12 / 20 | 1.0 (base) | 95 |
| Stronger | 19 / 20 | 1.6 | 40 |
The stronger one used more tokens but gave seven more accepted results (19 against 12) and 55 fewer minutes of human review. The cost of an accepted result is lower with the stronger one. For another kind of task (searching usages) the picture would be the opposite. That is why you measure on your own tasks rather than by general rankings.
A cheap request or a cheap result
Fewer tokens per attempt
Good for mechanical work with a simple check where a mistake is seen at once.
Tokens plus review and rework time
Counted for complex or risky work where the human spends the most.
How to keep the cost in check.
- clear the context between unrelated tasks;
- name files instead of letting the agent read the whole repository;
- ask for concise reports;
- limit the number of review rounds and retries and, where the tool allows, set a step or budget limit;
- do not launch several agents where one is enough.
Limits and alternatives. Prices and model names change, so a comparison from two years ago proves nothing. Do not optimise pennies where a human spends hours on checking. Sometimes it is smarter to buy reliability: a stronger model for a security review costs less than one missed defect. General model rankings are a weak basis for choice because your tasks and code are different.
Common mistakes.
- Choosing a model by the price of a request without counting rework and review time.
- Parallelising to save money: time is saved, not tokens.
- Giving the strongest model everything: mechanical work does not need it.
- Choosing by a general ranking without measuring on your own tasks.
Check yourself
Four subagents instead of one finished three times faster but the bill grew. Why does parallelism not lower the cost?
Answer
Parallelism shortens clock time while tokens add up: each agent reads its own context and brief, often the same shared files. The total spend is usually higher than for one agent.
A cheap model needed three rounds of fixes, a strong one got it right first time. How do you compare cost correctly?
Answer
By the cost of an accepted result: tokens of all rounds plus the human's time for review and rework. A model that is cheaper per request can cost more than a strong one, and human time is usually the costliest component.