Skip to main content
Subscribe
Front Page / Coding / Deep Dive

Price per Task vs Price per Token: Coding Agents at 58x Spread

Measure price per task across 31 coding models with cache-aware math and harness controls that explain Astra reversal and cut agent COGS errors in production.

Deepak Bagada

Deepak Bagada

Founder & Editor-in-Chief

Sep 19, 2026 Published
|
Sep 19, 2026 Updated
|
7 Minutes Reading Time
Core Takeaways for Founders & Builders
  • Cost per finished coding task spreads 58x from 0.08 dollars to 4.85 dollars on one reference job across 31 models.
  • GPT-6 Astra lists 2.5x per token yet finishes coding cheaper via one-third token use while costing more per general task.
  • Fix one production job, log tokens per success with harness tags, then multiply at dated rates for honest COGS.

Price per Task Beats Price per Token

Price per task is the API spend to finish one unit of real work, including retries, tool calls, and cache effects. Price per token is the sticker on the rate card. Across 31 coding models on one multi-file reference job, cost per finished task runs from about 0.08 dollars on GLM-5.3-Flash to 4.85 dollars on GPT-6 Astra, a 58x spread. The ranking moves with task shape, cache hit rate, and harness policy, not with the sticker alone.

  • Reference job: 1.5M input tokens at 90 percent cache, 40K output tokens, single pass, verified September 2026 rates.
  • Cache reads bill near a tenth of fresh input, so agents that re-read context cheaply win even at higher stickers.
  • GPT-6 Astra lists 2.5x per token yet finishes coding tasks cheaper through one-third token use, while costing 75 percent more per general task.

I price SaaSNext agent runs this way after a cheap model doubled our bill. Here is the method.

The Sticker Misleads Because Volume Moves

Cost per task equals rate times volume. Rate is public. Volume is yours: prompt size, resends per turn, retries, verification loops, tool context, and output length. A model at a quarter of the rate that needs three times the tokens to finish costs about the same, close enough that reliability should decide it.

Two mechanisms dominate. First, cache splits input into fresh versus reread lines at very different prices. Agents re-read context every turn, so a 90 percent cache hit rate collapses the input bill even on dear models. Second, output-heavy and long-reasoning models bill their thinking at output rates. A cheap input sticker with verbose reasoning loses to a dear model that answers briefly. Microsoft Research found this price reversal in 32 percent of model pairs in 2026. The number to compare is measured spend per completed task on your harness, not dollars per million on a pricing page.

War Story 1: The Cheap Model That Doubled Our Bill

We routed a refactor queue to a budget model at one-fifth the input rate of our default. It needed 2.8x more turns, retried 31 percent of tasks, and wrote 2.1x output tokens per finish. Weekly spend rose from 640 dollars to 1,190 dollars while success fell from 88 percent to 74 percent. The sticker said save 80 percent. The invoice said pay 86 percent more.

We re-ran the same queue logging tokens per completed task including failures. The budget model burned 3.4M input-equivalent tokens per 100 tasks against 1.5M for the default. Rate times volume favored the dear model by 41 percent. We moved the queue back in one deploy. The lesson stuck: fix the job, measure tokens, then multiply. For the caching lever that decided the rerun, see prompt caching cuts agent bills 80 percent.

31 Models on One Reference Job

Capital and Compute priced every model on the identical multi-file change with verified September 4, 2026 rates, so the ranking compares models rather than tasks. Artificial Analysis measures the empirical twin: mean pay-per-token cost across DeepSWE, Terminal-Bench, and SWE-Atlas-QnA with cache writes counted. Use modeled numbers for reproducible ranking and empirical numbers for how agents actually consume tokens on real benchmarks.

Model Input sticker Cost per task, reference job Signal
GLM-5.3-Flash budget 0.08 dollars cheapest finish, mid capability
GPT-5.6 Luna low near 0.10 dollars most coding points per dollar
DeepSeek V4 Flash low near 0.12 dollars strong value lane
Gemini 3.7 Flash 0.75 per 1M about 0.70 dollars throughput pick
Qwen3.8-Max mid 0.88 dollars open-weight value
Claude Sonnet 5 mid 1.46 dollars balanced default
GPT-5.6 Sol high 3.88 dollars top coding score, dear
Claude Fable 5.1 premium 3.84 dollars dear reasoning
GPT-6 Astra 10 per 1M in 4.85 dollars reversal case below

Capability per dollar reorders the table. GPT-5.6 Luna buys the most coding points per dollar. GLM-5.2 matches Gemini 3.1 Pro on score at lower cost. The top scorers cost most per run. For the routing play that exploits this spread in production, see Fable spend shift routes that save 68 percent tokens.

The Astra Reversal Explained

GPT-6 Astra lists at 10 dollars per 1M input and 50 dollars per 1M output, plus a fast mode at double rate for up to double throughput. That is roughly 2.5x the model it replaces. Yet evaluators measured lower cost per finished coding task. Artificial Analysis found Astra using about one-third of its predecessor tokens in the Codex harness and one-fifth of Claude Opus 5 at high effort, landing under half the cost of Fable 5 at equal coding score. Cognition came within 0.4 points of Fable 5 on FrontierCode 1.1 at 64 percent lower cost. Perplexity measured 11.98 dollars per WANDR task, 13.5 percent better than Fable 5.1 at 6.1 percent lower cost.

The same model costs roughly 75 percent more per general intelligence task at max effort, using only 10 percent fewer output tokens against a 2.5x rate. Both results are correct. Coding harnesses reward concise tool use where Astra compresses well. General max-effort workloads keep output volume fixed, so the rate dominates. Which model is cheaper is a property of workload plus harness, never of the model alone.

Harness Sets Volume, Vendors Tune Theirs

Token use per task is set by scaffolding: context resends, compaction, retry budgets, tool-call counts, and verification loops. Change the harness and the score moves. On ARC-AGI-3, reported score moved from 63 percent to near 100 percent on harness changes alone, with cost per run moving alongside. Vendor figures come from tuned harnesses. Yours differs. Treat their cost per task as evidence, not a quote.

Prompt wording changes reasoning and verification behavior without changing the task. Extra effort helps hard tasks and wastes money on easy ones. An August 2026 preregistered benchmark showed prompt, effort, and harness interact rather than add independently. Measure success and end-to-end cost while controlling all three. For the context system that decides how much resend costs, see KV cache design for 1M-token agents.

Step 1: Fix the Job and Instrument Tokens

Pick one representative task from production, for example resolve one support ticket end to end or land one multi-file refactor with tests green. Log input, cache-read, cache-write, and output tokens per completed task, including retries and failed runs. Retries are where quiet models get expensive. Do not compare request counts. Compare tokens per success.

File cost_tracker.py wraps model calls, records per-turn usage from provider telemetry, tags harness version and prompt hash, and writes one row per completed task with success flag. File task_profiles.yaml pins three job shapes: one-file edit, multi-file reference, and long agentic session, each with expected input, cache rate, and output. Every model prices all three so the ranking can move with work size.

# cost_tracker.py (sketch)
def log_task(model, harness, prompt_hash, usage, success, latency_s):
  row = {"model": model, "harness": harness, "prompt": prompt_hash,
         "in": usage.input, "cache": usage.cached, "out": usage.output,
         "success": success, "s": latency_s}
  ledger.insert(row)  # one row per completed task, failures included

Run 200 tasks per model on the fixed job before deciding. Small samples hide retry tails. Tag everything or the numbers are not comparable.

Step 2: Multiply, Add Latency, Divide by Users

Multiply measured tokens through at both rate cards. Only now do published dollars-per-million matter. Cost equals cache reads at cache price plus fresh input at input price plus output at output price, using each provider pricing page dated to the run week. Add the latency premium if the product promises response time: fast mode at 2x price is a real line when SLAs bind. Then divide: cost per task times tasks per user per month equals COGS per seat. That number decides whether pricing holds.

# price.py (sketch)
def per_task(inp, cache, out, r_in, r_cache, r_out):
  return inp * r_in + cache * r_cache + out * r_out

Worked example for intuition only: 4,000 input plus 1,500 output tokens on a 10/50 model costs about 0.115 dollars per task. A quarter-rate model needing triple tokens lands near 0.086 dollars, close enough that reliability, not price, decides. Recompute on your measured volumes. Never copy example tokens into a forecast.

War Story 2: The 90 Percent Cache That Was 40

Our forecast assumed 90 percent cache hits because staging showed 92. Production served 41 percent. Long sessions with unique pasted logs defeated prefix caching, and one middleware header randomized the prompt prefix per request. Weekly COGS ran 2.3x forecast. The fix pinned stable prefixes, moved request IDs out of cached spans, and re-measured per route. Cache climbed to 84 percent and the forecast error fell under 9 percent. Cache rate is a feature of prompt construction, not a constant.

When NOT to Use This Method

Let us be direct. Skip full per-task studies where they do not pay.

  • Stable subscription seats with bundled usage: users pay per seat, not per token. Track margin quarterly, not per model weekly.
  • Tiny pilots under 500 tasks a month: measurement noise exceeds model gaps. Pick the reliable default and revisit at scale.
  • Latency-bound realtime paths: fast mode doubles price for responsiveness users feel. Optimize P95 first, price second.
  • Single-model lock-in by policy: when procurement fixes the vendor, tune harness and cache instead of benchmarking rivals.

Bottlenecks and Trade-offs

Cache accounting differs by provider: read prices, write charges, and minimum cacheable spans all move the math. Pin provider docs by date and recompute on change. Output verbosity drifts with version updates. A silent reasoning-format change can add 30 percent output overnight. Alert on tokens per success per model daily, not monthly.

Benchmark contamination flatters familiar models on public tasks. Continuously harvested sets like Terminal-Bench Hard resist memorization better than static sets. Pair public scores with your private fixed job before signing a migration.

Ship Checklist

  1. One fixed production job, three task sizes, 200 runs per model with full token logs.
  2. Cache-aware math at dated rates, latency premium where SLAs bind, per-seat COGS out.
  3. Harness version pinned, prompt hash tagged, retry budgets explicit.
  4. Recompute monthly or on any model, prompt, or provider pricing change.

Start with the job that spends most. Price it honestly. Route the rest.

By , Founder and Editor-in-Chief at Daily AI World. I build agentic systems at SaaSNext and write from production logs, not demos. Follow @deeepakbagada and read more at https://deepakbagada.in.

Executive Briefing

Enjoyed this breakdown? Get our morning dispatch in your inbox.

Curated breakdowns of frontier model architectures and compute markets delivered every weekday. Zero fluff.

🎉 Thank You for Subscribing!

Frequently Asked Questions
Price per token is the rate card. Price per task multiplies measured tokens per completed task, including retries and cache effects, by those rates. It is the invoice number.
It uses about one-third the tokens of its predecessor in coding harnesses, so rate times volume falls. On general max-effort tasks volume barely drops and the 2.5x rate dominates.
Fix one representative job, log input, cache and output tokens per completed task with harness and prompt tags across 200 runs, then multiply at dated provider rates and add latency premiums.
No. Token volume depends on harness, prompts and retry policy. Vendor harnesses are tuned. Treat published figures as evidence and remeasure on your own fixed job.
Deepak Bagada
Author Profile

Deepak Bagada

Founder & Editor-in-Chief

Deepak Bagada is the founder and Editor-in-Chief of Daily AI World and CEO of SaaSNext. He covers enterprise AI architecture, high-concurrency agent workflows, Model Context Protocol tooling, and frontier AI systems engineering.

Related Intelligence Analysis

Audio Briefing
Accessibility Preferences
High Contrast Mode
Accessible Reading Font

Keyboard Shortcuts

Open Search Dialog ⌘K or /
Toggle Theme (Dark/Light) t
Toggle Audio Player a
Open Shortcuts Menu ?
Close Active Dialog Esc

Cookie & Privacy Preferences

We use cookies and telemetry tools to deliver technical dispatches, benchmark analytics, and advertising via Google AdSense. Review our Privacy Policy.