Idle compaction trades your context for a cache write
"Compacted while idle, before the prompt cache expired" means Claude Code summarized a 200k+ session you walked away from. Set "idleCompaction": false (v2.1.290+) or take control with the API's compaction parameter.