cd /news/artificial-intelligence/your-coding-agent-bills-per-task-not… · home topics artificial-intelligence article
[ARTICLE · art-100991] src=dev.to ↗ pub= topic=artificial-intelligence verified=true sentiment=· neutral

Your coding agent bills per task, not per token

A developer argues that pricing coding agents per token misrepresents their true cost, citing 2026 research showing a single agentic-coding task consumes 1–3.5 million tokens, with 76% being reads, and can burn up to 1000× more tokens than a normal code chat. The post advocates pricing per task, caching stable context, routing routine work to cheaper models, and making per-request cost visible, noting a ~40× per-task cost spread across models for the same task.

read2 min views1 publishedAug 18, 2026

If you price a coding agent the way you price a chatbot, you will misread the bill every time.

A normal code chat turns one prompt into one completion. A coding agent runs a loop: it reads files, calls tools, reads the output, edits, re-runs the tests, and self-corrects — often a dozen turns. 2026 research (Stanford, MIT, and others) puts a single agentic-coding task at roughly 1–3.5 million tokens, with ~76% of them reads. One study found agentic coding burns up to 1000× more tokens than a normal code chat.

The takeaway is not "agents are expensive." It is that the unit is wrong. You do not pay per million tokens. You pay per task — and two levers move that number 5–10× more than the model name does.

A coding agent re-sends the same context — system prompt, project files, tool definitions — on nearly every turn. Cache reads bill a fraction of base input. On a gateway with transparent cache pricing, the gap is stark:

Model Input (¤/1M) Cache read (¤/1M) Cache advantage
deepseek-v4-Pro 560 10
~56×
qwen3.5-plus 130 20
~6.5×
hy3-preview 180 60
minimax-m3 390 80 ~4.9×

Structure prompts so the stable context is cacheable and new content appends at the end, and that discount compounds across a long session. One change, bigger impact than most model swaps.

The same studies show a ~40× per-task cost spread across models for the same task. The pattern that holds: run the cheapest model that passes your evals by default, and escalate only the hard tasks. A unified gateway with 25+ models across 8 providers makes that a one-line switch instead of a refactor:

REQUEST -> AUTH -> ROUTE(model:"auto") -> RESPONSE -> METER
                                    ^ picks by cost / quality / speed

The catch most teams miss: you cannot route by difficulty if you cannot see the cost. That is why per-request traceability matters — every call should show model choice, latency, tokens, and cost on one line, not buried in a dashboard.

Stop benchmarking models on $/M. Benchmark them on $/task for 15–30 real tasks from your own repo. Cache the stable context. Route the routine work to cheaper models. And make the meter visible, because an agent that hides its own cost is the most expensive agent you will run.

Building agentic systems on a unified, OpenAI-compatible gateway (SG-hosted, PDPA-aligned, up to 90%+ cheaper on China models): tokenlat.com

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @stanford 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/your-coding-agent-bi…] indexed:0 read:2min 2026-08-18 ·