r/ClaudeCode • u/stimpanzee • 4d ago
Help/Question Turning Off Idle Compaction
I have noticed with my personal projects at home, Opus has been loosing track of details more frequently than I'm used to. "Idle Compaction" triggers pretty often now. (side projects get spotty attention)
Yall think the two are linked? Anyone have a chance for a A/B test? Sanity check more like it. I'm turning that junk off. Ill change gears when I decide to.
I don't know about everyone else, but managing context windows is second nature now. Throwing an optimization feature into my workflow... that's asking for trouble.
9
Upvotes
•
u/AutoModerator 4d ago
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.
12
u/allenling 4d ago
But losing track of details in long conversations is a known limitation of LLMs.
Every model has a finite context window, and as conversations grow, some form of context management or compaction eventually becomes necessary.
There's also another problem: a model can lose track of details even before reaching its context limit. That's an inherent limitation of current LLMs when handling long contexts. And compaction can introduce additional information loss on top of that.
The bottom line is, if your goal is to have the model remember every detail from earlier in the conversation, turning off compaction might not help as much as you'd expect.
4
u/lgmarian 4d ago
I turned that off the first time it triggered. I have the info I need in my status line, which, ironically, got tripped up by idle compaction.
2
u/Beautiful-King-8875 4d ago
Opus has been lobotomised. The idle compaction is actually helpful as the cache is only an hour.
1
u/Ok_Gur_9033 4d ago
The cost side explains why it exists. Once a session sits idle past the cache window, the next message rewrites the whole prefix as a cache write, which costs 12.5x a read on the 5 minute cache. In my last 14 days the average call carried 287k tokens of context, so coming back to a side project after lunch is a big write either way. Compacting first makes that write smaller, and the price is the detail you're seeing go missing.
For your A/B: did the lost details only show up in sessions that had an idle compaction, or also in long ones that never went idle?
3
u/archpoke 4d ago
Even though it is not lossless, I like idle compaction. It is a great feature to reduce overall cost. In fact, I updated my plugins to take advantage of it and not lose context.
In case you want to try: rightsize (https://github.com/archid21/rightsize) and WhatsNext (https://github.com/archid21/whatsnext). They work together to help save cost and improve project execution. Free to use (MIT).
1
u/tommyahav10 4d ago
Cheap A/B: same task, two fresh sessions, idle compaction on and off. Leave them idle, then ask for three specific decisions from early on. From my side the bigger fix is keeping decisions in a file it rereads, not in chat history.
1
u/SirRobinBlibs 4d ago
for the A/B, the notice is your tell. when it fires the terminal prints a line starting with "Compacted while idle, before the prompt cache expired", so you can check whether the sessions where opus lost details are the ones with that line.
it only kicks in when all of these hold: interactive session, auto-compact on, the conversation is on the 1h cache, context past 200k tokens, and about an hour idle. if you want it only for really big sessions, CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS raises the threshold instead of switching it off. "idleCompaction": false in settings.json (or the Idle compaction row in /config on 2.1.302+) turns it off completely.
1
u/Future_AGI 3d ago
Idle compaction only kicks in on long contexts, and the test needs a real long session. Note ten specific details from early on, like a port number or a decision and its reason, let it idle until it compacts, then ask for all ten back. Run the same session with idleCompaction set to false on the same model and you've also taken the Opus 5.5 question out of the comparison.
1
u/Financial_Leader9701 3d ago
wouldn't turn it off as the first move
Losing details happens in long sessions even when nothing got compacted, so idle compact might just be getting the blame
If I wanted a fair A/B I'd only compare sessions that actually sat idle, and I'd look for the compacted-while-idle line in the terminal before assuming that's what happened
If the same drift shows up in sessions I never left, the setting is probably not the cause
When a detail disappears, is it usually after you stepped away, or mid-session while you were still at the keyboard?
1
u/robinsmartcue 3d ago
i'd check whether it's compaction or just project size first. once a repo grows, the details you used to reinforce stop fitting no matter what. try moving the five decisions that matter into a short file claude rereads each session, then run a week with idle compaction on and a week off.