The #1 Technical Reason for Context Re-read Cost
The self-attention mechanism in Transformer models is the primary culprit, as it processes every token in the context window in relation to every other, resulting in a computational complexity that scales quadratically with context length [5, 6, 20].
The top 3
- Attention's Quadratic Cost: Context Doubling, Cost Quadrupling: Transformer models' core attention mechanism processes the entire context window, with computational cost growing quadratically as sequence length increases, meaning doubling context length can quadruple processing expense.
- KV Cache Bloat: Memory Bandwidth Bottleneck: The Key-Value (KV) cache stores vectors for every input token, growing linearly with context; reading this entire cache on each new token generation saturates GPU memory bandwidth, becoming a primary bottleneck rather than raw compute.
- No Native Memory: Repetitive Token Re-billing: Large Language Models lack inherent memory across turns, forcing AI agents to resend and re-process identical context elements—like system prompts, conversation history, or tool outputs—repeatedly, incurring cumulative token charges with each interaction.
Sources
Open the full topic