Budget without logs is theater
If you do not log token usage, cache hits, truncation, compaction events, and output length, you are guessing. Good context operations are boringly measurable. The first time you actually graph token spend per session you will find at least one workflow that is 5x more expensive than you thought.
Minimum telemetry contract
Every long run should record: input tokens, output tokens, cached tokens, model id, request latency, and whether a checkpoint or compaction happened. That data tells you when to trim, cache, split, or hand off — without re-running the entire session.
Telemetry belongs beside the work
For agents, context metrics are not infrastructure trivia. They explain why quality changed halfway through a task. The first place to look when a long session goes wrong is the token graph, not the chat history.