LZLZL/AI toolchain/Access · Cost
FREEMedium · Practice B · Accesscost

Where the tokens
actually go

2026-08-21 · The model is not expensive. Sending the same thing forty times is

First agent bill tends to produce a double-take — it only fixed one small bug. The cause is not the per-token price. It is that every turn resends everything that came before.

In this pagewhere cost comes from, which savings are real. No vendor price tables — reason in §5. Nothing about my own spend either.

1The mechanism: the conversation is stateless

Model APIs do not remember the last turn. "Multi-turn conversation" is implemented by sending everything so far plus the new part, every single time.

In chat that is nothing — each turn is a few dozen words. An agent turn contains:

ContentsScale
System prompt + tool definitionsFixed overhead, present every turn
Project memory fileFixed overhead — however long you wrote it, you pay it every turn (page 5)
Every file it has readThe big one, and it only grows
Every command's outputOne install log can outweigh the source
Every previous exchangeCumulative
total input ≈ context per turn × number of turnsand context per turn is itself growing with turns

So cost is superlinear in turns. A forty-turn task is not forty times a one-turn task. It is more.

2The biggest lever: caching

Precisely because most of each resend is identical to the last one, providers generally support caching: the repeated prefix bills at a lower rate.

To collect that discount you only need one fact: the cache matches on the prefix. Byte-identical from the start counts; insert one character at the front and everything after it is void.

Which yields a practical rule: stable things go first

System prompt, tool definitions, project memory — anything constant across the conversation — belongs at the front, with volatile material after. Most tools already order it this way, but watch what you inject yourself, and do not inject at the front.

It also explains something counter-intuitive: editing your project memory file often raises costs — not because the file grew, but because each edit voids the cache you had built up.

3Four levers that actually work

MoveWhy it worksCost to you
① One job, one sessionCuts both factors in "turns × context". Nothing else comes closeYou do the task decomposition
② Do not let it read whole large filesOnce in context, every later turn pays for it againTeach it to search and locate, not to read entire files
③ Block noisy outputInstall logs and full test output are enormous and nearly information-freeSome command config, or have it read only the tail
④ Cheap tier for cheap workCompression, titling, classification do not need the top modelRequires per-slot model config

④ needs a tool that supports different models per purpose. Hermes is a ready example: main model, auxiliary tasks, compression and fallback are independent slots, each taking its own provider / model / base_url — so "compression on a cheap tier, main model on a good one" is a config change, not a project.

One popular false economy

"Shrink the context window to save money" usually backfires. A smaller window means more turns and re-reading the same files, so the total goes up.

Same with always picking the cheapest model: it gets things wrong more often, wrong means redo, and the redo eats the saving. Count totals, not unit prices.

4Finding out where yours goes

MoveReveals
Read the tool's own usage displayMost CLIs have one. Know the order of magnitude before optimising anything
Compare one big task against the same work split in threeMeasuring it once beats reading ten articles about it
Find your single longest sessionCost concentrates hard. Killing the few longest sessions moves the bill a lot

5Why there is no price table

Because prices change faster than this page does. Written down, they start going stale immediately, and a reader making decisions on a stale number is worse off than one given no number.

The site rule is: facts that expire either carry a checked date or do not get written. Price tables fall into "stale even with a date", so this page gives mechanism only. Mechanism does not expire: resend, prefix cache, superlinear growth — true at every vendor.

Mechanism Model APIs are stateless; multi-turn is implemented by resending the full history each turn, so input volume grows superlinearly in turns. General behaviour, not vendor-specific.
Caching Matches on prefix — byte-identical from the start, hence "stable content first" works and "frequently editing the opening content" voids the cache.
Per-slot config Hermes keeps main / auxiliary / compression / fallback as independent slots, each with provider / model / base_url. Official docs, checked 2026-08-21.
Not given here Any vendor's prices, discount ratios or quotas. Prices move faster than this page; use the official pricing pages.
Not in this page My own usage or spend.

RelatedRead next

B · Access
What a relay API actually is
A · Local
Project memory that actually gets followed
C · Always-on
What is worth automating, and what is theatre
C · Always-on
Hermes Agent: where OpenClaw leads next
An educational and engineering record — not a review or endorsement of any third-party product. Commands, config keys, prices and terms are per each vendor's official docs; this page states when it was checked and all of them can change without notice — verify before you copy anything. Self-hosting is your own responsibility: keys, accounts and data are on you.