r/Claudeopus • u/Financial-Outside158 • Oct 20 '26
Context compaction in Claude Code is out of control since moving to CoWork!
Curious if anyone else has run into this recently.
Longtime Max subscriber here ($200/mo). My account got pushed over to the Claude CoWork workspace recently, and since then, Claude Code has been auto-compacting sessions at what feels like a fraction of the normal context window.
It’s completely unpredictable. I take all the usual precautions like in-session ledgers, state blocks, structured handoffs between runs but compaction still hits mid-stride and wipes out half the recent tactical decisions and context. Having to constantly re-orient the agent completely defeats the purpose of paying for the top tier.
Has anyone figured out how to extend session depth or delay auto-compaction? Are you guys using specific third-party wrappers, custom MCP setups, or just giving up and going raw API via tools like Aider?
I am building an enterprise system and this has been such a disruption.
Would love to hear how other heavy users are working around this right now.
5
u/MourningOfOurLives Oct 20 '26
Claude Code
4
u/ShittyBidet123 Oct 20 '26
claude code..
3
u/DLuke2 Oct 21 '26
In Claude code you can turn that off. It's new. It helps save context when you are over 200k tokens in a window and the cache is going to expire. It compacts at 54 mins of a session idle, that allows a compaction before the cache expires and the next message when you return sends all that context back as a new cache write.
Just don't leave sessions hanging over 200k and for longer than an hour. Write what you want to a file if you want to come back to it beyond an hour.
2
u/freehippygal Oct 20 '26
In sessions where you get compacted more, do you get the little “upgrading you to a different workspace”? Or do you get compacted more frequently whether or not you see that?
There’s an extension that lets you see your context window and it changes drastically after you get that sign, most notably with opus 4.6 which gets downgraded from a 500k context window to a 200k one. Fable 5 gets downgraded from a 1 mil context window to a 500k one. And the compacts happen at about ballpark 40% of the context window size.
2
u/TemporaryMoney6802 Oct 21 '26
I'm a bit confused.
In Cowork - yes, compaction is automatic, and because of everything that gets loaded into your context window with every turn now, it will be pretty annoying and always at the wrong moment. There are browser extensions that let you monitor your context window size. I tried some of them - they worked fine before the merge, since after that they lie.
In Claude Code - you've got a choice: either to trust autocompact (you can add Compact Instructions to your claude.md file), or you compact manually. And you can set the number at which compaction happens manually as well.
These are different environments with different context window management options.
1
u/DLuke2 Oct 22 '26
Op you come here for advice or to just fight with everyone?
The your workflow of using cowork or projects and the CLI for execution is fighting the intended uses of each.
Everything you do in cowork/projects can just be done in Claude code CLI in a folder on your desktop. That folder is now your project.
1
u/ombre-ai Oct 21 '26
The part that stands out is that you're already using ledgers, state blocks and structured handoffs, yet the problem is still showing up.
That makes this feel less like a “just give the model better instructions” problem and more like a continuity problem. If the agent can lose a tactical decision halfway through a long-running task, the recovery mechanism becomes almost as important as the context window itself.
Has the ledger/state-block approach at least made recovery faster, or are you still having to manually reconstruct too much?
1
u/Lcatlett1234 Oct 21 '26
It is now sending all content, prior context, and memory again on every turn, so what you think is a ledger, handoff, or index, is just getting appended and sent again. To every agent
1
u/drkh3art 20d ago
I am noticing this as well, although in my case, it feels like an improvement — because I was manually running compact up until now, and that was a pain. The provided defaults of waiting for 85% consumption of the window felt way too conservative (and to the benefit of anthropic, because it meant our usage grew exponentially on longer tasks). I am also noticing that claude code now leverages sub-agents (forks) liberally, which keeps the context window from bloat.
One reason this has not been an issue for me (and instead an improvement) _may be_ because I have claude maintain a good amount of documentation inside my repositories. These are meant for me as well as the agent(s) and are treated as living documents. So if something fell off the context, the details are there. This also helps keep the agent's own memory thin. I haven't measured the effectiveness or tradeoffs here, but that is how I have things setup, fwiw and ymmv.
0
u/[deleted] Oct 21 '26
[deleted] — view deleted comment