I noticed something weird. Every time my AI agent's process restarted, it would compress the conversation again — even though the last five compressions had been useless. The prompt was already clean. The system prompt and tool schemas added up to 30K tokens of incompressible floor. Shrinking the message history wasn't going to help. But the agent didn't know that. It ran the compaction loop every single time, burning tokens and time for zero benefit. The root cause? A single in-memory cou...