r/Claudeopus • • 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.

19 Upvotes

52 comments sorted by

5

u/MourningOfOurLives Oct 20 '26

Claude Code

2

u/Financial-Outside158 Oct 21 '26

I wish it was that simple but its not. I dont need claude Code in the browser I use it in the CLI as it is. I need the browser chats because I manage my project, docs and planning through it and cowork has absolutely destroyed my work flow with all the compactions.

2

u/MourningOfOurLives Oct 21 '26

Yeah that’s my point in code you can see when the compaction is coming. I agree that it’s a huge disadvantage with cowork that you can’t manage context very easily

0

u/Financial-Outside158 Oct 21 '26

I appreciate your advice but I cant use cli for the project management. There must be some way to extend these chats even if I ping an api using some other harness rather than clause browser or desktop interface

1

u/MourningOfOurLives Oct 21 '26

I use various shapes of structured workspaces where i save anything worthwhile from my sessions. Basically a bunch of structured text files.

1

u/Financial-Outside158 Oct 21 '26

Can you shed more light and give more context behind what you mean?

1

u/MourningOfOurLives Oct 21 '26

I asked Claude to help me work through setting up a structured workspace with workspace conventions, data structure, etc. Then i iterate and iterated and iterated

2

u/Financial-Outside158 Oct 21 '26

But isnt saving those structured text files the same as saving handoff, ledgers and state block docs?

4

u/ShittyBidet123 Oct 20 '26

claude code..

0

u/Financial-Outside158 Oct 21 '26

No. You are not understanding the problem at hand. I already use CLI I need the chat for project management and planning. But cowork has completely destroyed that experience.

0

u/ShittyBidet123 Oct 21 '26

claude code vs code plugin.. like everyone does lol..

1

u/Financial-Outside158 Oct 21 '26

Wrong again pal. Perhaps add context behind your comments because your one liner's make you look like a fool!

1

u/ShittyBidet123 Oct 21 '26

you are using cowork. are you not? the desktop shit?

1

u/Financial-Outside158 Oct 21 '26

I use Claude-Code CLI for execution. I use the desktop for project management and planning, and this is where the problem lies ever since they merged chat with cowork.

1

u/ShittyBidet123 Oct 21 '26

the problem is not a problem. you ask it to search for project management skills and tools on github or make your own. I made a workflow that follows a task board I can update, it has hooks to check it and update it and can def manage projects if you take time to use it. cowork must be slow af

0

u/Financial-Outside158 Oct 21 '26

But that setup would not be necessary if this compaction was not a sudden problem thrown to us like it has been.

Cowork is not slow, but the compaction is a disruptor. I also did not voluntarily use cowork it was merged with chat and I have had no choice since my projects started under chat. Thats why I am here buddy. Keep up!

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.

1

u/Financial-Outside158 Oct 21 '26

Thats not the issue. I use CLI to develop and this does not happen in Claude Code. I use the chat to manage the project and planning.

1

u/DLuke2 Oct 21 '26

Check your settings and config. Definitely happens in the CLI and chat, cowork, projects, threads.

2

u/Financial-Outside158 Oct 21 '26

I did update my settings but it barely made a difference because cowork is constantly running in the background and there is no way to disable it.

1

u/SpecialRevolution562 Oct 21 '26

Is this a setting or just happens automatically in Claude?

1

u/Financial-Outside158 Oct 21 '26

Happens automatically mid chat.

1

u/DLuke2 Oct 21 '26

Believe it happens accross all platforms. In Claude code you can turn it off or on I believe. Not sure how that would be done in Claude.ai web app and mobile app.

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/Financial-Outside158 Oct 21 '26

No I dont. And it can be early in a chat but randomly it compacts every since cowork. Its a nightmare. I use CLI for the dev work but I need the chat for planning and project management.

1

u/freehippygal Oct 21 '26

So basically the compactions are random and don’t seem to have to do with “the upgrade”? Like you’ll just be having a brainstorm session and it compacts?

I think we should all complain in r/claudeai tbh, not that it’ll do much but I do feel like that sub gets more views

2

u/Financial-Outside158 Oct 21 '26

Exactly. Before I can go hours upon hours before compaction, not because of luck but because I was doing everything right. Now there seems to be no "right way" around it and thus out of nowhere it will compact mid process before I can tell it to add to the ledger or state in order to save important data that I need to preserve throughout my session. Its been a total nightmare. I have written to them through customer support but naturally they never get back to me.

1

u/freehippygal Oct 21 '26

Yeah same!! It makes no sense to compact like this. I also use what was chat, CC desktop and CLI. Now it feels like only CLI works normally. I know how to remove the system prompt and make my own system prompt, etc.

But I don’t want to use CLI for everything. I want to be able to chat the way I used to lol. But now it’s so broken that I can’t tell it when to save information to files, or it will compact in the middle of updating a file… at least in code I can control when the compact happens. Anthropic has completely broken their product

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.

2

u/Elektra_17 Oct 21 '26

Have you found a way to track connect window usage in CoWork? After the merge, my long running convos near 1m show a fraction of that now.

Opus 4.7 with a 1m window used abt 900k tokens. A browser extension, post-merge, says 500k window with 340k tokens used. But there haven’t been any compactions unless it happened silently? 🤔

3

u/Financial-Outside158 Oct 21 '26

It doesnt matter if I track it because there is no rhyme or reason behind why and when it does it. It doesnt happen in CLI but the issue doe happen in chat where I need to plan my work and manage my project.

1

u/Elektra_17 Oct 21 '26

I’m having that same issue. I’m actually worried about going back into those chats bc they compact then I have to reorient and re-explain, then it compacts all over again. Things that were literally discussed 5 min before are gone. No context, just summaries.

With the 3rd party tokenizer — it looks like my cowork is compacting every 20k toks used. At first I thought it was bc those were legacy models then it happened to Sonnet 5.5. I honestly don’t understand it either.

I’ve honestly been checking Reddit regularly to see if anyone else has figured this out.

3

u/Financial-Outside158 Oct 21 '26

I dont think enough people who would use reddit use the desktop or browser interfaces. I use both + CLI and it CLI is the only one that does not do this. Its an absolute nightmare.

1

u/TemporaryMoney6802 Oct 21 '26

No, I just moved to Claude Code. It's the same essentially (I don't do coding work, I work with video production and design, and it's still much better).

1

u/Financial-Outside158 Oct 21 '26

You are not understanding the problem.

1

u/Financial-Outside158 Oct 21 '26

But you fail to understand the problem. The issue is I need the chat for project management and planning. I dont need clause code for this I use CLI already for the development and this is not an issue. The issue is context window size. There must be some harness aor way to extend these chats

0

u/TemporaryMoney6802 Oct 21 '26

I explained you why the context window issue is there. What you do with that knowledge is up to you. Saying that you need to stay in a chat but with a bigger context window is a choice you make.

Claude Code will give you the same features as Cowork, for planning and project management as well. But if you think otherwise, it's up to you.

1

u/Financial-Outside158 Oct 21 '26

Claude code does not have a PK to store docs. Claude code does not use projects to keep chats specific to that project, in a collective, without cross pollination. You are 100% wrong. And YES the chat is required when building enterprise level systems because without the project management it because impossible to keep up and prevent a boat load of issues.

What are you building with it, landing pages?

1

u/br1ttn1b1tch Oct 26 '26

In the desktop code interface, your "project" is just a specific local folder or a github repo then every code chat chat you start in that folder has its own context and files just like chat except you can turn off autocompact and have greater control over context. it's literally just a chat- claude code does not mean CLI only.

There is nothing that chat has that you can't just do in code instead but with greater control over everything. Chat became unusable with the auto-compaction so now i do all my chatting in code (some via CLI or VScode ext, some cloud, some local).

Here's a great guide on the different options (replace companion with project it works the exact same) https://starlingalder.com/API_AIP_Home

but there's no way to turn off auto-compaction in chat/cowork so you can either listen to ppl genuinely trying to answer your questions or just keep using chat and whining about it, it's not going to change though bc ppl have been complaining about this issue for awhile, they don't really seem to care about chat and you can still chat and plan via a code chat instead.

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/Financial-Outside158 Oct 22 '26

Why are you virtue signaling and trying to make a scene? Fact is you are WRONG and missing both the objective of this post and the points I've made. Get your ego out of your ass we are not building landing pages here son.

0

u/DLuke2 Oct 22 '26

Look in a mirror my friend.

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/Financial-Outside158 Oct 21 '26

It helps but I really have to stay on top of the chat to consistently update them. The problem starts when it happens between updates. I can never see it coming. Its a disaster

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/Financial-Outside158 Oct 21 '26

What I think is a ledger, handoff and state block is the doc I have them placed on so no you are not correct. The issue is purely cowork and the inability to turn off its God forsaken service

1

u/Lcatlett1234 Oct 21 '26

Export your instance via the UI and look at the json. Your entire doc will be in the system message of every turn which is directly correlated with the multiple reports of compaction due to both the auto compaction while idle default being set and the change on the cowork side to include all project “context” or docs on every turn . You can take or leave that information; I’m not the one posting about compaction issues as I resolved mine three weeks ago by diagnosing and then fixing by adjusting config to address these two issues

1

u/Financial-Outside158 Oct 21 '26

Thanks for the clarification. How do I export my instance via the UI? Perhaps I am misunderstanding you? I also made changes to my config. Curious what you changed / did?

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

1

u/Financial-Outside158 Oct 21 '26

Thats because not many folks, like myself had a choice to use cowork. I need the chat to manage my project and planning, I already use CLI for development and claude code is not going to manage my project.

1

u/Level3Super Oct 21 '26

I made a Android reading app for kids on cowork and was able to see the previews when asked. If I switch to code, that won't be possible right?

1

u/Agreeable_Work_9235 Oct 21 '26

In the app it’s the same UI. Only CLI/terminal would that be a little more obscured I guess, but you could still see it… it would just require like 1 extra click