Context compaction not only cuts costs but also combats 'context rot,' a phenomenon where LLM accuracy degrades as context length increases, even when relevant information is present. Shorter, more focused contexts lead to better model performance and reduced 'lost in the middle' errors.