Token Drift: Why AI Agents Slow Down and Cost More Over Long Sessions
A pattern known as token drift causes AI agents to become slower and more expensive as conversations grow longer, because each model call must process an increasingly large context. The effective input includes system prompts, tool definitions, conversation history, retrieved documents, and tool outputs, all of which accumulate across turns. While per-turn input grows roughly linearly, the total tokens processed across an entire session can rise quadratically, making session costs climb far faster than the number of turns suggests. Common culprits include repeated full transcripts, large tool schemas, bulky API responses, and duplicated memory summaries sent on every request. Developers are advised to treat context as a budgeted resource and track token usage per model call rather than per user request to manage costs effectively.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in