Troubleshooting Abnormal LLM Token Consumption After November 2026

    This article explains why LLM token consumption can spike even when coding behavior and task complexity stay unchanged, and how to diagnose it with data. It breaks down three compounding effects: the fixed cost of frequent context compaction, repeated billing caused by prefix cache invalidation, and duplicated context across parallel sub-task lanes. It then outlines a four-step investigation process based on time distribution, cache hit rate, per-request input composition, and sub-task context size, followed by optimization strategies such as higher compaction ratios, externalizing large artifacts, minimizing sub-task context, protecting cache prefixes, and adding threshold-based alerts.

    Troubleshooting Abnormal LLM Token Consumption After November 2026

    1. The Symptom: Why the Usage Curve Suddenly Steepens

    After November 10, 2026, many developers using AI coding tools reported the same issue: with no meaningful change in coding habits or task complexity, token consumption from model calls grew several times over. Scenarios that used to account for roughly 20% of total usage climbed to around 50% in a short period. Quotas that previously supported hours of interaction were being exhausted in about twenty minutes.

    These reports share one characteristic: input-side behavior did not change, but output-side cost did. This largely rules out the explanation that “users suddenly wrote more code” and points instead to context management inside the toolchain.

    Another set of reports is more specific. A user on a high-tier subscription plan triggered more than seventy automatic context compactions in a single day. The main conversation lane was compacted 17 times, while three parallel sub-task lanes were compacted 21, 17, and 17 times respectively. Before compaction, context size was roughly 240,000 to 250,000 tokens; after compaction, 140,000 to 160,000 tokens remained.

    Here is the first red flag: compaction removed only about 100,000 tokens, yet it cost more than seventy compaction actions. Compaction itself requires a full model inference pass, with the entire pre-compaction context as input and a summary as output. In other words, every compaction is an expensive call consisting of “full input + summary output.” More than seventy such calls already consume an amount comparable to normal coding conversations.

    2. Root Cause Breakdown: Three Compounding Amplification Effects

    2.1 The Fixed Cost of Compaction Is Amplified by High Frequency

    Automatic compaction is usually triggered when context length approaches the model’s window limit. Take a common window configuration as an example: the trigger threshold often sits near 240,000 tokens. The problem is that compaction does not mean clearing: the system retains the system prompt, task constraints, recent conversation, and key code snippets, so 100,000-plus tokens still remain after compaction.

    A high retention level means little headroom before the next trigger. If 160,000 tokens remain after compaction and the threshold is 240,000, only 80,000 tokens of “safe space” are left. In a coding session that continuously reads and writes files and keeps appending tool-call results, 80,000 tokens may only support a few rounds of interaction. A loop forms: compact → quickly hit the threshold again → compact again. Compaction cost is amplified linearly by frequency, while the benefit (freed space) diminishes.

    2.2 Repeated Billing from Cache Invalidation

    Most mainstream LLM services offer prefix caching: when a request’s input prefix is exactly identical to a previous one, those tokens are billed at a lower price, or even free. Multi-turn conversations are cheap precisely because historical messages act as a stable prefix that is hit repeatedly.

    But compaction rewrites the context. The summary text is new content, and it is inserted near the front, so the prefix after compaction is completely different from the prefix before it. The 100,000-plus tokens that could have been cache hits all become full-price, uncached input. This stacks two costs at once: the cost of the compaction call, plus the cache rebuild cost of the first request after compaction.

    A simplified model helps:

    1. Cost per interaction ≈ uncached prefix tokens × full price + cached prefix tokens × discounted price + output tokens × output price
    2. When compaction happens:
    3. Extra cost = compaction call (full input + summary output)
    4. + first post-compaction request's (retained context × full price - retained context × discounted price)

    When compaction happens frequently, the second term is paid repeatedly. This is the main source of the visibly rising consumption.

    2.3 Context Duplication from Parallel Sub-Tasks

    Beyond the main lane, AI coding tools commonly spawn multiple sub-task lanes: one retrieves the codebase, one runs tests, one analyzes errors. The problem is that if every sub-task inherits the main lane’s full context, the same system prompt, the same project background, and the same batch of file contents are stored once in each of the four lanes.

    Each of the four lanes approaches the threshold on its own and triggers compaction on its own, so the number of compactions naturally multiplies. Worse, sub-task intermediate results are often long (test logs, retrieved code snippets), and when returned to the main lane they push the main lane’s context level up again, forming a positive feedback loop.

    3. Investigation Method: Turning “It Feels Expensive” into Verifiable Data

    To confirm whether this mechanism is at play, do not rely on intuition. Collect data in the following four steps.

    Step one, look at the time distribution. Aggregate token consumption by hour and check for periodic spikes. If the spikes correlate with the duration of long sessions rather than the volume of code committed, that points to a compaction loop.

    Step two, look at the cache hit rate. Most call responses or usage dashboards report the share of cached tokens. In normal multi-turn conversations this ratio should stay consistently high; if it drops off a cliff at a certain point and then slowly recovers, a context rewrite occurred.

    Step three, look at the input composition of individual requests. Record three numbers per request: input tokens, output tokens, and cached tokens. The signature of a compaction call is very large input and very small output (a summary is usually a few hundred to a few thousand tokens).

    Step four, look at the number and lifecycle of sub-tasks. Track the number of concurrent sub-tasks and the context-length curve of each. If sub-task context length is very close to the main lane’s, context is being inherited indiscriminately.

    A minimal instrumentation example:

    1. record = {
    2. "ts": now(),
    3. "session_id": session.id,
    4. "lane": "main" | "sub_1" | "sub_2",
    5. "input_tokens": usage.input_tokens,
    6. "cached_tokens": usage.cached_tokens,
    7. "output_tokens": usage.output_tokens,
    8. "context_before": ctx.size_before,
    9. "context_after": ctx.size_after,
    10. "compacted": ctx.compacted_this_turn,
    11. }
    12. metrics.append(record)

    With this data, you can compute two key metrics: token cost per unit of effective output, and the share of total consumption taken by compaction overhead. If the latter exceeds 20%, there is substantial room for optimization.

    4. Optimization Strategies: From Reactive Compaction to Active Management

    4.1 Improve the Effective Compression Ratio

    The current problem is “compaction happens but no space is freed.” The direction for improvement is to make compaction more aggressive: keep only the task goal, confirmed factual conclusions, the to-do list, and key interface signatures, and replace large blocks of raw logs and full file contents with path and line-number references. The target is to bring post-compaction retention below one third of the threshold, thereby lengthening the interval between compactions.

    4.2 Replace Context Accumulation with Externalized Storage

    Moving large artifacts out of context is a more fundamental fix. Write logs to a logging service, put build artifacts in object storage, and persist retrieval results as files, leaving only an accessible reference identifier in context. Fetch the relevant fragment by identifier when needed. This changes context-level growth from “linear accumulation” to “load on demand.”

    4.3 Minimize Sub-Task Context

    Sub-tasks should not inherit full history; they should receive only the minimum information set required to complete the task: a clear goal, relevant file paths, constraints, and the expected output format. Sub-tasks do not share intermediate processes with each other and only return structured conclusions. This alone can typically reduce the number of compactions by several times.

    4.4 Protect the Stability of the Cache Prefix

    Place stable, unchanging content (system constraints, project conventions, long-term background) at the very front of the context, and volatile content (current errors, latest retrieval results) at the end; when compacting, rewrite the tail first and leave the prefix untouched as much as possible. Also avoid modifying the system prompt mid-session, which invalidates the entire prefix cache.

    4.5 Establish Thresholds and Alerts

    Do not rely on default thresholds. Set tiered thresholds based on window size, and configure three rules in monitoring alerts: compaction count exceeding a limit within a time window, cache hit rate falling below baseline, and per-session token consumption deviating from the historical average by a certain multiple. When all three rules fire at once, it is almost certainly a compaction loop rather than genuine workload growth.

    5. Conclusion

    The consumption anomaly after November 2026 is most likely not a single-point defect but the compounding amplification of high-retention compaction, prefix cache invalidation, and duplicated sub-task context. The diagnostic signals are clear: behavior unchanged while cost rises, excessive retention after compaction, and a cliff-like drop in cache hit rate.

    The remediation path is equally clear: first decompose consumption into observable metrics, then break the positive feedback loop by improving the compression ratio, externalizing context, minimizing sub-task context, and protecting prefix stability. This approach depends on no specific tool and applies to any AI coding scenario that uses long context and automatic compaction. It can serve as a standard procedure for teams investigating similar cost anomalies.