AI Coding in the Age of Deep Thinking: Why Token Consumption Spikes and How to Control It
As flagship AI coding tools adopt long-running deep thinking, users are seeing tighter quotas, more reconnections, and fewer usable tasks despite announced quota increases. This article breaks down the root causes—step inflation, quadratic context replay, architecture rollout costs, and non-adjustable reasoning depth—and outlines practical governance measures such as step and budget caps, context layering and compression, tiered model routing, observability, and clearer quota communication.
1. The Symptom: Capability Upgrades Bite Back on the Bill
A common pattern has emerged across the industry: after AI coding tools upgraded to flagship models with long-running “deep thinking” capabilities, users broadly report that their subscription quotas feel tighter. The complaints fall into two categories. The first is service stability: requests reconnect frequently and the API keeps returning errors. The second is quota: even though the official announcement says the weekly quota has been raised to several times that of the previous generation, the real experience is that fewer tasks can be completed.
These two issues may look unrelated, but they point to the same thing: the model’s “thinking” has shifted from a side activity to the main workflow, while the billing and engineering systems are still designed around the assumption of short interactions.
2. Root Cause Breakdown: Why Tokens Get “Thought” Away
2.1 Step Inflation Is the Main Variable
One developer ran a controlled comparison: with the maximum step count locked, the two generations consumed roughly the same amount. Once the limit was lifted, the newer model autonomously executed six to seven times as many steps as the previous generation. The behavior pattern changed too—it would first read through the helper scripts in the repository, establish a performance baseline, and verify results item by item. This “establish a baseline before acting” strategy does improve the success rate on long-horizon tasks, but the cost shows up directly on the bill.
2.2 Context Replay Causes Quadratic Amplification
Each time an agent executes a step, it typically resends all the context accumulated so far. Let the new context added per step be c and the number of steps be n; the cumulative input is roughly c·n(n+1)/2, which grows quadratically with the number of steps. A sixfold increase in steps can amplify input-side overhead by tens of times. This is the mathematical essence of why quotas get consumed so quickly.
# Illustration: cumulative input overhead of a naive ReAct loophistory = [system_prompt]total_input = 0for step in range(n_steps):total_input += count_tokens(history) # resend the full history at every stepaction = model.generate(history)history.append(action)history.append(env.step(action))# total_input ≈ c * n * (n+1) / 2
2.3 Engineering Costs During the Architecture Break-In Period
Moving a new architecture from the lab to large-scale open service requires the server side to adapt, and connection pools, timeout policies, rate limiting, and retry mechanisms all need to be re-tuned. Most of the reconnections and API errors during this phase are capacity and network-path issues rather than model capability issues. It should be emphasized that, until officially confirmed, such attribution can only be treated as speculation.
2.4 Lack of Controllability Over Thinking Depth
Describing overthinking as a feature is not necessarily unacceptable; the problem is that it is currently “non-adjustable.” The industry consensus is that the reasoning budget should be a tunable parameter, not a default habit of the model. The same architecture shows clear differences in token efficiency across implementations, which indicates that efficiency depends on training and scheduling strategies rather than the architecture itself.
3. Governance: Turning “Thinking” into a Budgetable Resource
3.1 Dual Gates for Steps and Budget
agent_budget:max_steps: 24 # hard cap to prevent runaway behaviorsoft_budget_tokens: 60000 # soft budget that triggers compressionon_budget_exceeded: summarize_and_continue # or escalate_to_human
3.2 Context Layering and Compression
- Write tool output to disk, and return only a summary and the path; read on demand when needed.
- Apply rolling summarization to history, keeping decisions and constraints while discarding lengthy raw text.
- Replace full-context injection with retrieval-based memory, pulling only the fragments relevant to the current subgoal.
3.3 Tiered Model Routing
Use lightweight models for planning and retrieval, and flagship models for code generation and difficult debugging. In practice, most token consumption comes from low-value steps, and routing can significantly reduce cost without hurting results.
3.4 Observability First
Instrument each task with step count, input/output tokens, cache hit rate, and retry count; connect to logging services and monitoring alerts, and set a per-task cost threshold alert. Without measurement, optimization is impossible.
task_id | steps | in_tokens | out_tokens | cache_hit | retries | cost
3.5 Stability and Quota Communication
The server side needs to improve retry backoff, connection reuse, and gradual rollout; on the quota side, the conversion between “number of tasks” and “token volume” should be made explicit to avoid the expectation gap between an increase on paper and a reduced real-world experience.
4. Conclusion
Deep thinking is a leap in capability and a restructuring of the cost model. For users, prioritize coding tools that support budget and step configuration. For platform providers, reasoning budgets, context compression, model routing, and observability should become standard capabilities. Whoever can turn “think a few more times” into “think more on demand” will be positioned to lead in capability
