正在加载视频...
视频加载失败
I’ve been asked a lot why I keep Claude Code auto-compact turned off. Here’s why 👇 If you configure commands, sub-agents, and hooks properly, you almost never hit auto-compact. Every time it triggered for me, I lost important context. After looking at how compaction actually works, it was clear... show more
34 条评论

I’m on the other side of that. Most of the sessions I use get through 2 or 3 compactions. But Opus with plan mode only goes off rails after 4 or 5, and that’s not every time. Plan gets referenced back after every compact automatically. It’s the key part.

Same lesson I learned with prompt management. Auto-compact feels like a safety net until it triggers mid-session and erases the exact context the agent needed. Configuration discipline beats reactive failsafes.

Why not use?

similar experience. /clear + document the plan in markdown beats auto-compact for me. you control what survives, not the algorithm.

you could try using subagents more - mine usually have precise prompts and die by pushing to a db or local store. if you use subagents properly your context compaction doesn't affect much @steve_yegge

Is the ui of Web the same as the terminal?

great take, I also have compact turned off after playing around with the config and analyzing the context window limits

I did the same pre-opus 4.5 but I've found my issues with performance degradation post-compaction to have gone away, or it's at least improved to the point where it's not driving me crazy

Got it. Thx

Mine is turned off as well. My process generally calls multiple agents, so they all have separate context windows. I use the main context as a manager. Even if I hit the limit, the API throws an error, and I switch the model to Sonnet 1M to continue and finish the work. Or you can copy the discussion /clear and copy that to continue.

Also skills.

That makes sense. Auto-compaction is a symptom of weak context hygiene, not a solution. When context is structured intentionally, you preserve signal and avoid surprise drops mid-workflow. That’s exactly the direction we optimize for, explicit context, scoped runs, predictable behavior. Do check out our latest release on multi agent Blackbox CLI.

Analysis: Initial request: My response: (loop summarize) Files created. Errors/ Issues. Commits made. Primary request and intent. Key technical concepts. Files and code sections. Errors and fixes. Problem solving. All users messages. Current work. Optional next steps.

i use "handover to self" md created at 5%-7% then compact manually, and have done a whole refactor in one "session" with no issues through four five compactions... Have been thinking about making something local that can serve that function but for now the handover-to-self. md works perfectly for better continuity after compactions... that and four other "working md´s" eliminate this issue for me

Totally get that. Context loss is a pain, especially mid-session. A solid config can really make a difference. How do you manage the balance between keeping context and performance?

I just used my research backed tools I built that handle context across swarms significantly more efficiently and don’t ever worry about it

Lost context is just lost dreams.

You don’t need to turn it off if you never reach the limit!

Interesting.. thanks for sharing.

just wat I needed been getting compacted too much and keep spoiling the iterations

Compaction trades continuity for convenience. Once you invest in explicit context design, forced summaries start feeling like silent data loss.

@dani_avila7, losing context is a significant drawback with auto-compact, so your approach makes sense.

I use a continuity ledger that gets updated when I hit any milestone. it remembers the important stuff.

Nice . Thanks for sharing

i just have calculated ctx % in status line so keep track of it real time. Once get to danger zone compact or clean.

Context integrity beats aggressive compression. Explicit session control preserves signal where auto summaries quietly leak meaning.

context over compression

Same pain led me to build a memory system that survives compaction. Fractal structure means Claude keeps the gist even when tokens get crunched.

Matches my experience. The upfront config pays off. What helped: keeping commands scoped to one job each, and using hooks to inject project context only when needed — not loading everything into CLAUDE.md. Context stays cleaner and auto-compact stops being a thing.

I do both. 🤷♂️

@claude-mem seriously. Try the new V9. It’s worth the time..

i get that, losing context sucks

I also have it turn off, with a custom status line, I can see immediately how much window I have left, estimate how many remaining tasks need to be done, then decide whether to go with a new session or continue.

Can you share it?
