Huawei researchers measure what happens when coding assistants receive extra code or lose old command outputs. Their study covers more than 20,000 locally served runs. A smaller conversation can cost more because it disrupts cheap prompt reuse and changes what the assistant does next.
Prefix caching reuses the unchanged beginning of a prompt. Deleting an early output breaks that match for the following text. The paper therefore counts fresh input, reused input and generated output separately.
- On 201 fresh software tasks, retaining only the latest ten command outputs raised calculated cost by 116% for Qwen3.6-27B and 87% for Qwen3-Coder. Reused input cost one-tenth of fresh input; output cost four times fresh input.
- Without the reuse discount, those same runs cost 19% and 25% less, respectively. The price assumptions reverse the conclusion.
- Supplying retrieved code reduced reading and searching by 18–34% in the main experiments, but raised cost by 33–42%, without an established improvement in fixes.
- Removing old material occasionally, when estimated future savings justify rebuilding the cache, greatly reduces the premium. It still misses the study’s cost-assurance threshold for the two main Qwen models.
Cache disruption explains much of the rolling-removal premium. It does not explain every result. Some occasional-removal policies would save money with actions held fixed, but assistants perform extra reads and searches in actual runs. That comparison is an accounting split, not a separate causal experiment.
Concurrent experiments introduce another trap: one test condition can warm another’s cache. Correcting this changes a retrieved-code premium from about 8% to 36% in one comparison.
Caveat: These are repriced token records, not provider invoices. The quality scores can omit staged edits and have not been fully recomputed. Costs exclude sandbox computing and elapsed time. The study supports measuring each model, workflow and price separately; it does not establish that all context reduction fails.