Spend tokens like a budget, not like a tap

Context size times number of calls is the bill

Almost all tokens in agent work are re-reads of context. Smaller contexts, fewer calls and delegated short answers cut cost.

When I measured where tokens went in my own agent-assisted work, about 98% were cache re-reads. Every call re-reads the whole context, and the median call carried hundreds of thousands of tokens, much of it inside subagents. So the cost is not one large answer. It is size times number of calls.

What that changes

  • One task per session. Clearing context when you switch tasks is the single biggest saving, because every later call stops paying for the old one.
  • Delegate only what returns a short answer. A subagent that searches and reports three file references is cheap. One that reads half the repo and returns it is not. Do not spawn agents for one or two searches.
  • Never fan out writers into the same working tree. Parallel edits to one worktree create conflicts that cost more to untangle than the parallelism saved. One branch and one worktree per writer.
  • Read ranges, not files. Search first, then read a few lines around the hit. Pipe long command output through tail or a filter before it enters the context.
  • Know the unit you are optimising. An API-equivalent dollar figure is an estimate, not your bill. Track tokens, and treat the number as a trend.
  • The same idea elsewhere

    Time, team attention and compute behave the same way. The expensive thing is rarely one big task; it is a small cost paid on every step. Find the multiplier first.

    Tagged: tokens, ai-tooling, cost, process, agents

    Area: Thoughts

    Related notes

    עברית