← notes

The lever on agent token cost is turns, not transport

Jun 17, 2026

Switching a messaging agent from polling to streaming is supposed to cut cost. Past a certain arrival rate it does the opposite.

A CLI that lists, reads and sends messages costs no tokens at all. Those are plain calls. Tokens burn one layer up, in the model driving the agent, and the cost of a single workflow turn decomposes into three parts: a fixed per-turn overhead for the system prompt, the skill, the tool schemas and the state file; a marginal ingestion cost for whatever the model reads back; and the output it generates. Total spend is turns per day multiplied by the sum of those. So the levers are the number of turns and the size of the fixed overhead, not the transport.

Idle cost makes the case for streaming. Polling every fifteen seconds wakes the model about 5,760 times a day even when nothing has arrived, and if the skill re-reads recent history for every active conversation on each wake, that is pure waste.

The part that surprised me is that the argument reverses under load. Polling turns a fixed number of times a day regardless of volume and batches everything that arrived in the interval, so it pays the fixed overhead once per batch. Per-message streaming pays it once per message. Crossover sits at roughly one message per polling interval. Above that, streaming pays the overhead more often, not less. With a 4,000 token overhead and sustained traffic near one message a second, per-message streaming pays it 86,400 times a day instead of 5,760, which works out around ten times worse.

Four things bound it: prompt caching to shrink the fixed term, processing deltas instead of re-reading history, a cheap deterministic filter so the model only wakes for genuinely ambiguous messages, and a cap on turns per minute so a flood widens the batch window rather than multiplying turns.

Which means a single benchmark number is misleading. The ranking flips with arrival rate, so the measurement has to be parameterised by volume. Raw token counts are also not comparable across model families, because the tokenizers differ. Compare cost per message handled and cost per agent hour instead, and compare raw tokens only within a family.