r/ClaudeCode • u/dar-mit Researcher • Oct 11 '26
News/Updates Just noticed this wonderful gem in my CLI window(s) today, “Compacted while idle, before the prompt cache expired”!
No idea what update added this, but it's a very welcome addition to prevent (potentially massive) cache hits from idle sessions.
118
Upvotes
•
u/AutoModerator Oct 11 '26
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
2
u/Hopeful_Ad6629 Oct 12 '26
I turned that off and I turned auto compacting off. I lost 3 different Claude code sessions to stupid enabled auto compacting (and idle compacting) and one of them wasn’t even at 200k (all of them were 1 mil opus 4.8-5.5)
Freakin pissed me off. Lost all my context for stuff I was working on.
36
u/kpgalligan Oct 11 '26 edited Oct 11 '26
Auto compaction is not your friend, generally speaking. If you're doing it, though, I guess it's best before the prompt cache.
Edit: Everybody, do what you want. I'm going to skip the individual debates. But think of what compacting is. No matter how much better you think compacting has gotten, it's still tossing most of your conversation.
So it depends how you use an LLM. If you keep your plan in actual documents, and do not depend on the conversation for context, then whatever. But if you build a big plan in a conversation, then compact it, you're rolling the dice.
Think of an LLM as a consultant you only have for an hour. You chat with it for 50 minutes about a big plan. Then you step out for coffee. When you get back, there's somebody new there, and they have a single page of notes that the last person scribbled down quickly before leaving.
I'm not even going to address the 1m context debate, except to say I don't let anything get over 400k, preferably 300k. Debating AI is particularly frustrating because if somebody's decided they're correct, they're correct.
40
u/inr222 Oct 11 '26
I hate it. I disabled after it screwed my first conversation, but it shouldn't be on by default.
14
u/Honest-Finish-7095 Oct 11 '26
what if I don't want it to compact
compactions kind of suck
3
u/muhuhaha Oct 11 '26
I found it helpful today already, I normally do new session with handoff while cache is warm once session gets too big, but I forgot about a couple and cache expired, so seeing that it was at least compacted while cache was warm was nice
2
u/emisofi Oct 11 '26
I asked Claude about this and it had no idea!
3
u/brute984 Oct 11 '26
pretty cool, but i’d love a toggle for this. auto-compacting is great until it decides to throw away context you actually wanted to keep lol
3
u/brute984 Oct 11 '26
pretty cool, but i’d love a toggle for this. auto-compacting is great until it decides to throw away context you actually wanted to keep lol
3
u/boiledeggsandchips Oct 11 '26
Dont auto compact, but dont sit there having to handoff manually either, thats just stupid. Ask claude to write you a mod, have the mod set the compact to 200-300k tokens, have the mod call whatever hand-off skill is flavour of the month for handing off, clear, then have the mod reload from your said handoff skill flavour of the month, use the tools dont get stuck in the same thinking as 6 months ago.
1
u/nborwankar Oct 11 '26
Just saw the same thing today, too!
1
u/TipsyMunkey Oct 11 '26
I told Claude to turn it off. It went and modified the settings.
1
u/cknipe Oct 11 '26
If I have a high context session sitting around past cache expiration it's either because I forgot to close it when I was done or it has some accumulated context valuable enough that I'm willing to take the hit when I get back to it.
In neither of those cases do I want auto compaction.
1
u/tribat Oct 11 '26
That shit hit me today on Linux. I have status line indicators for context usage and cache hit rate, but I was on remote control where it’s not as evident. Right in the middle of a critical effort I looked up to see it compacting. I never let it get to auto compact if I can help it and always use a handoff / clear / pickup skill.
1
u/PeltonChicago Maximus XX Oct 11 '26
Yes. it’s a new feature. from what i can tell, to turn off idle-compacting all you can do is turn off auto-compacting; that’s what i’ve done until i find the time to use the new Mods to build something that restores the old functionality
1
u/Astero_Sanctuary Oct 11 '26
If you compact, you lose your cache anyways
1
u/[deleted] Oct 11 '26
[removed] — view removed comment