AI Agent Overthinking and Token Explosions: Causes and Governance

    This article examines why AI agents can consume far more tokens than expected once they are allowed to decide how long to think and how many steps to take. It breaks down the shift from task-driven to model-driven steps, the quadratic amplification caused by resending context on every step, and why token efficiency varies across implementations of similar architectures. It then outlines practical governance measures, including step budgets, tiered context compression, cache reuse, observability, and aligned quota and billing models, to help developers balance long-horizon task performance with subscription limits.

    1. Where the Controversy Started: Why More Allowance Felt Like Less

    After one AI coding tool released an upgrade, the official message was that weekly quotas for subscribers had increased to 1.5 times the previous version. Community feedback, however, was largely that the allowance was even less sufficient. Around the same time, another AI coding product publicly apologized and added compensation within roughly ten hours of launch after its quota was rapidly consumed.

    The surface causes of the two incidents differed, but the underlying conflict was the same: the model’s number of execution steps was no longer constrained by task complexity, while the billing and quota systems were still designed around the intuitive notion of “number of tasks.”

    It should be noted that the attribution of why this version frequently entered long periods of thinking is still community speculation, and no specific mechanism has been officially confirmed. This article does not discuss the implementation details of any specific product. Instead, it abstracts the phenomenon into a general engineering problem: what happens to the cost model when an agent is given the authority to decide on its own how long to think and how many steps to take.

    2. Mechanism Breakdown: Why Token Growth Is Not Linear

    1. Steps Shift from Task-Driven to Model-Driven

    In traditional calls, the number of steps is determined by the result of task decomposition. In agents with reflection and self-correction capabilities, however, the number of steps is decided by the model itself. The controlled experiment mentioned in the original text is key: when the number of steps was locked, the consumption of the two versions was roughly the same; once it was unlocked, the autonomous step count of the new version reached six to seven times that of the old version. This shows that the cost difference does not come from each step being more expensive, but from the loss of control over the number of steps.

    2. Quadratic Amplification from Context Resending

    Each time an agent executes a step, it usually resubmits the complete prior context. Let the context length of a single step be C and the number of steps be N. The cumulative input is approximately:

    1. Total ≈ C × N × (N + 1) / 2

    If the number of steps increases by a factor of 6, the input theoretically increases by about 36 times. This is the mathematical root of “1.5 times more on paper, but feeling like less”: the allowance is granted linearly, while consumption grows quadratically.

    3. Behavioral Differences Are Amplified

    The new version tends to first read through auxiliary scripts, establish a baseline, and then re-verify item by item. These behaviors do improve the success rate on long-horizon tasks, but every step is “topping up” the context. Improved capability and increased cost are two sides of the same thing here, and only looking at one side is misleading.

    3. Industry Comparison: The Efficiency Gap Lies Not in “Whether It Thinks” but in “the Cost-Effectiveness of Thinking”

    A common misreading in the community is to blame overthinking on some new architecture. But under similar architectures, token efficiency varies significantly across implementations, and after iteration some can achieve better results with fewer tokens. The real dividing line is therefore the effective output per token, which can be broken down in engineering terms into three metrics:

    • Effective step ratio: steps that actually change the task state / total steps;
    • Context reuse rate: input that hits the cache or a summary / total input;
    • Convergence: repeated verification and rollback steps / total steps.

    4. Governance: Putting “Thinking” in a Budget Cage

    1. Step Budgets and Tiered Thinking

    Set step limits and timeouts for different tasks, and allow the model to explicitly request a “deep mode” that is approved by an upper-level policy:

    1. budget = {"max_steps": 40, "max_tokens": 800_000, "deep_mode": False}
    2. if task.risk == "high" and budget["max_steps"] < 120:
    3. budget = {"max_steps": 120, "max_tokens": 3_000_000, "deep_mode": True}

    2. Context Tiering and Compression

    Divide the context into four layers: “task goal / confirmed facts / tool output / historical trajectory.” Resend only the first two layers in full, route tool output through summaries or on-demand retrieval, and apply rolling summaries to the historical trajectory. This is the core means of bringing the quadratic term back to approximately linear.

    3. Cache Reuse and Idempotent Tools

    Enable cache reuse for stable prefixes such as system prompts and repository structure descriptions; on the tool side, ensure idempotency to avoid wasted steps caused by repeated reads and repeated writes.

    4. Observability and Cost Attribution

    Add instrumentation to the logging service and monitoring and alerting systems: input/output tokens per step, cache hit rate, step distribution, and task success rate, forming a dual “effectiveness-cost” dashboard. Only then can you determine whether the problem lies with the model or with the orchestration.

    5. Aligning Quotas and Billing

    If a subscription continues to grant quotas per cycle, it should also publish the “typical task step range” and the consumption coefficient for deep thinking, or provide quota warnings and downgrade strategies to reduce the gap in perceived value.

    5. Conclusion

    “Deep thinking” itself is not a defect; the defect lies in the lack of budget, compression, and observability constraints. For developers, governing steps and context as first-class citizens is the only way to balance the effectiveness of long-horizon tasks against subscription quotas. For platform providers, transparent consumption metrics and flexible quota strategies retain users better than after-the-fact apologies.