Context Engineering for Agentic Workflows: Task-Aware Token Budget Forecasting

The first time I looked closely at a running agent session, I was not worried about accuracy. Accuracy was fine. What bothered me was the shape of the token curve.The agent was doing something ordinary: answering a data question by planning a query, running it, checking the result, and correcting itself when the result looked wrong. Nine model calls in total. By call six, most of what we were sending to the model was history the model no longer needed. Schema definitions it had already used. Tool output it had already summarized. Instructions it had already followed twice. We were paying full price on every call to re-send a conversation the agent had mentally closed several steps earlier. I
…