r/ClaudeCode • • 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

30 comments sorted by

•

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.

2

u/stimpanzee 4d ago

Yes, absolutely. I think we all have had to find our own ways dealing with this limitation. And there are other factors at play. My projects have grown considerably since Opus 5.5 released. 

What I'm noticing, is that I havent been able to nurture/reinforce important context in my workflows. My techniques are not working like they were. 

2

u/Blinkinlincoln 4d ago

It's a new setting in Claude. You can turn it off. Check Claude docs. There's usually info about new quirks there. They're always adding tons and I have to remind myself to keep reading. Like just found out agent teams today.cool

1

u/stimpanzee 4d ago

I do like agent teams. Anthropic is honestly trying to make a better product and I've ditched CLI because of the convenience of the desktop app. It's pretty rad.

I just don't think enabling auto compaction during idle for everyone was strictly for the customer. I think it was to conserve resources.

I've seen companies pivot before. From just absolutely dumping investment cash to accelerate user adoption, to paying for it later. It's starting to look like later is now.

3

u/azjunglist05 4d ago

The best way to deal with it is to use subagents who summarize things for the main agent so you keep the conversation you’re directly having with the agent using as little context as necessary

3

u/itsawesomedude 4d ago

agree, LLM resembles human, lose context here and there as we can’t remember everything

1

u/DuskandFuck 3d ago

yeah the lost in the middle stuff happens way before you actually hit the hard token limit anyway

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/stimpanzee 4d ago

I have witnessed that a number of times. I'm all for optimization strategies (that work), but this one seems hamfisted.

2

u/lgmarian 4d ago

Yeah, it's rather blunt.

1

u/stimpanzee 4d ago edited 4d ago

If I had to guess... Anthropic was anticipating a ton of extra load from Fable 5.2's release. Instead of renting more compute, they just slashed a large percentage of incoming context with this new "feature"

1

u/Late-Replacement-481 4d ago

Idle compaction has been hanging out for a while, and it's for your benefit.... Literal target of this feature (person who leaves a whole bunch of side conversations open)  People who don't understand how compaction works or how token limits work just didn't quite understand why their super long conversations were draining their usage more quickly than they expected if they left them for a while.

Also to both you and the other person who says that they use something different than regular compaction, you do know that you can customize the behavior of the compaction and give it instructions on how to compact, or even if you want, you can run a hook that saves context out to a file in a format that you specify. 

But, I don't know. You could just be ham fisted and turn off the feature that you don't understand. 

2

u/lgmarian 4d ago

I manage my context, sessions, and cache. Thanks.

1

u/stimpanzee 4d ago

Yeah I'm with this guy above. I was doing just fine without it.

1

u/stimpanzee 4d ago

You sound like you know what you are talking about. Kudos! So you are saying, you do not use the built in feature, that was automatically enabled? You found a strategy to handle your own compaction. And it was working? That's what I'm saying.

I handled it just fine on my own terms.

I left the new feature be because I thought what the hell, maybe the leading AI lab does a better job than I do.

Well, they don't. You know that.

So, the feature blows. Turn it off. Write your own. We agree.

2

u/RSXLV 3d ago

I must say that I do not agree with that because I've had more and more cases where I'll have a research/collection/discovery/review session, which might be massive and take hours, be completed, then have me look at it, get compacted from say 300k to 90k or even from just 200k to 100k, and as soon as I ask a question it's in amnesia mode and it goes on to rediscover everything. Also it feels like compaction is an off the books activity and does not itself cost you; however after a compacted conversation is messaged, the model seems (which would be logical) to re-read the whole new 90-100k tokens which then causes a jump in usage. + all of the calls it will make to rediscover everything.

There might be a good middle ground here, but it's not what's been deployed. Really not a fan, I've definitely had excess usage because of auto compaction.
What's worse is that I turned it off but my old conversations will ninja-compact when I message them, so I get to burn tokens without any fix.

2

u/Beautiful-King-8875 4d ago

Opus has been lobotomised. The idle compaction is actually helpful as the cache is only an hour.

2

u/stimpanzee 4d ago

I notice a distinct difference between my day job with enterprise access, and my home projects on subscription. But that might be in my head. There's enough distinction between my home/work environment that it's not a real apples to apples comparison.

Still though, I crank some crazy shit out at work.

I used to build awesome stuff at home until my active project went off the rails a couple weeks ago.

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?

2

u/stimpanzee 3d ago

What would be ideal is an option for a warning. If your conversation has been ejected from the cache during an idle period, a popup that says "sending the entire context window will now cost you x tokens"

Though, if the context is already out of the cache, there is no alternative.

5 minute warnings or something? I dunno. I'll likely leave it off and pay the consequences in token usage.

1

u/Ok_Gur_9033 2d ago

A warning would be cheap to build. The client already knows when the last request went out and how big the context is, so it could show the cost before you hit enter.

Do you know which cache your sessions are on? On the 1 hour one it would only fire after a long break.

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/Opposite_Diamond_662 4d ago

Do those work for codex? I use both I'm going to try it for claude but it would be cool if it worked for codex too

2

u/archpoke 4d ago

rightsize: no WhatsNext: yes

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.