Why token usage matters beyond cost
Tokens cost money and add latency, but the bigger hidden cost is attention: the more noise you put in the window, the more the relevant facts get diluted and the worse the answer.
Reducing token usage is as much a quality move as a cost move.
Find the waste
The usual culprits: pasting an entire repo 'just in case', dragging a long stale conversation along, and verbose boilerplate the model doesn't need. Each spends budget without changing the answer.
If a chunk of context wouldn't change the output, it's noise — cut it.
Curate durable facts
Put the conventions, decisions, and constraints the model needs every time into a compact memory file, rather than re-explaining them in each prompt.
High-signal and reusable beats long and repeated — the same facts, far fewer tokens.
Retrieve, don't dump
For large knowledge, store it externally and retrieve only the relevant pieces per task. The window stays small and focused while your knowledge base stays unbounded.
Good retrieval is the difference between 'send everything' and 'send what matters'.
Budget and re-anchor
Spend the window deliberately on constraints, the task's code, and recent decisions; summarize and re-anchor long sessions instead of letting history pile up.
A disciplined budget keeps cost down and answers sharp at the same time.