Compaction is cheaper than the context it removes
When a coding agent’s context fills up, it gets compacted: the history is replaced by a summary and the session continues. Everyone who has watched this happen mid-task has the same instinct — compact as late as possible. The summary loses detail, and compacting throws away the prompt cache you have been paying to build. Better to hold on. Half of that is true. The other half is expensive, and I had the threshold set wrong for weeks because of it. ...