Diagnosing Abnormal LLM Token Consumption: Facts, Scope, and Root Causes

    This article outlines a diagnostic approach to abnormal LLM token consumption in AI coding tools and large model applications. It explains why "abnormal consumption" and "client-side bug" are separate claims that require an evidence chain, what criteria determine whether a defect label holds, and how impact scope helps separate client issues from platform metering issues. It also examines why context compaction and sub-agents act as amplifiers rather than root causes, and lists practical steps to control these amplifiers and preserve evidence before an official determination.

    1. Conclusion First: Faster Consumption Is Confirmed, but “Client-Side Bug” Is Premature

    In AI coding tools and LLM applications, a typical pattern has recently emerged: developers see token consumption rise sharply and exhaust their weekly quota in a very short time, even though model settings, reasoning effort, and task volume remain unchanged. The first thing to establish is that “abnormal consumption” and “a client-side defect” are claims at different levels. The former is an observed fact; the latter is an attribution conclusion. An evidence chain must connect the two.

    A more reasonable initial hypothesis is that the quota deduction rules at the account level or the metering basis for model consumption changed, and that mechanisms such as long-session compaction and sub-agent invocation amplified the effect. Mistaking the “amplifier” for the “root cause” is the most common misjudgment in cases like this.

    2. Deciding Whether the Word “Bug” Holds Up

    Whether a defect claim holds usually depends on four elements: a clear reproduction path, confirmation from the maintainer or vendor, a traceable link to code changes, and comparable server-side data. User reports at this stage generally lack the last three:

    • Defect labels are often added by automated bots based on keywords, which does not mean the maintainer has confirmed them;
    • Reports have long had no assignee, no linked branch or pull request, and no official explanation;
    • All consumption figures come from local tools or console dashboards and have not yet been reconciled against server-side billing records.

    The rigorous phrasing is therefore “a user-reported suspected regression,” not “a confirmed defect.” The point of this step is to keep the team from directing effort toward the wrong investigation path.

    3. Key Criterion: Impact Scope Determines the Attribution Level

    The most effective clue for separating client-side problems from platform metering problems is the impact boundary.

    If the defect were inside the coding assistant client (for example, broken context compaction logic), the impact should be confined to that client. The reported scope, however, is clearly wider:

    • Some users hit the anomaly in office-analysis scenarios outside the coding assistant, using a high-reasoning model to parse a ten-page document, where a five-hour quota dropped from roughly 90% to just over 50%; this scenario shares the quota with the coding assistant but does not go through the coding assistant client;
    • Among reports marked as suspected duplicates, multiple model tiers from different generations are involved;
    • One report’s raw data actually came from a different ultra-reasoning model rather than the model originally named — a correction that itself shows the problem is not limited to a single model.

    Anomalies appearing simultaneously across clients, models, and scenarios point to the shared metering and deduction stage, not to a local logic issue in one client.

    4. The Mistaken “Root Cause”: Compaction and Sub-Agents Are Amplifiers

    4.1 Why Context Compaction Amplifies Consumption

    After a long session triggers context compaction, the first request following the compaction point often still carries a large amount of historical tokens, with a very low cache hit rate. A representative observed structure looks like this:

    1. Single request before compaction: 240k ~ 250k tokens (relatively high cache hit rate)
    2. First request after compaction: 140k ~ 160k tokens (cache hit rate around 15%)
    3. Share of uncached input: this single request accounts for 40%+ of the day's uncached input

    Mathematically, the longer the session and the more compactions occur, the more uncached input accumulates multiplicatively. If the metering basis tightens at the same time, the two effects stack and produce an apparent consumption on the order of ten times. It is worth stressing that the reporter cannot precisely attribute consumption to compaction either, which itself shows the lack of attributable metering details.

    4.2 Sub-Agents and Inconsistent Model Labeling

    Another set of reports reveals a possible mismatch between the selected model and the model actually billed: the interface has a high-reasoning model selected, while the local tool records calls to a different tier, with sub-agents enabled during the task. Sub-agents introduce additional context duplication and parallel requests, pushing the total higher. But the original reporter states clearly that high consumption appeared before sub-agents were used extensively, so sub-agents are a stacking factor, not the root cause.

    5. Actionable Practices Before an Official Determination

    Before an authoritative conclusion appears, engineering teams should do two things at once: control the amplifiers and preserve evidence.

    1. Control the amplifiers

      • Split long sessions to keep a single session from growing indefinitely and reduce how often compaction is triggered;
      • Use sub-agents cautiously and cap parallel tasks;
      • Prefer cache-friendly request patterns and keep prefixes stable;
      • Set quota budgets and alert thresholds for different tasks, which can be implemented with the monitoring, alerting, and logging services of a cloud platform.
    2. Preserve evidence

      • Record the model tier, timestamp, input and output tokens, and cache hit status for every request;
      • Keep the client version and configuration change history to form a comparable timeline;
      • When conditions allow, cross-check server-side usage details against local statistics — the decisive step for distinguishing a “metering basis problem” from a “client-side defect.”

    6. Summary

    When token consumption spikes, the correct path is to confirm the facts first, then define the impact scope, then identify the amplifiers, and finally complete the attribution with reconciliation data. Treating a “suspected regression” as a “confirmed defect,” or an “amplifier” as the “root cause,” will shift the investigation in the wrong direction. Establishing observable usage records and budget guardrails is both a short-term way to limit damage and the foundation for long-term cost governance.