Why Each Step Multiplies Context Re-read Costs

Each additional reasoning step in an AI agent can force a full re-read of the entire accumulated context, leading to a linear or even exponential increase in token processing and computational expense for longer tasks.

The top 3

  1. Attention's Quadratic Cost: Why Context Doubling Quadruples Expense: The fundamental technical reason for escalating re-read costs is that the LLM's attention mechanism computational complexity grows quadratically with the input length, meaning doubling the context window size can lead to a fourfold increase in processing costs.
  2. Compounding Context: Each Step Bloats Next Input's Cost: In multi-step reasoning, every intermediate thought, tool call, and prior conversation turn must be re-fed into the model's context for subsequent steps, causing a continuous and often exponential growth in input tokens for each new inference.
  3. Hidden Fees: Internal Reasoning Tokens and Tiered Pricing Surges: Beyond explicit inputs, AI agents generate costly "reasoning tokens" for internal processing, which are often priced higher than input tokens. Additionally, some LLM providers implement tiered pricing, significantly increasing the per-token cost for context windows exceeding certain thresholds, such as Google Gemini 1.5 Pro doubling rates over 128,000 tokens.

Sources

Open the full topic