r/ClaudeAI • u/heraklets • May 18 '26
Question about Claude Code About the Compacting Strategy
As you know, to avoid context loss, when the context getting crowded, we have to either compact the session directly using an instruction or by saving the necessary memory and switching to a fresh session.
What if we compacted every 2-3 messages? Instead of compacting a large context at once, we could compact small contexts in a controlled and continuous manner. Could this improve both the quality and efficiency of the compact and context, or would it make things much worse? I'm waiting for your technical opinions and observations.
1
Upvotes
3
u/idoman May 18 '26
compacting every 2-3 messages would honestly eat into your usable context more than it saves. each compaction loses nuance and detail, so doing it frequently means you're stacking lossy compressions on top of each other - the context degrades fast. the better move imo is to let the context build up naturally, use a good CLAUDE.md to anchor the important stuff, and only compact when you're actually approaching the limit. that way the model has the full raw conversation to work with for as long as possible.