| ▲ | mandeepj 7 hours ago |
| > The problem is, when the context window grows, You know the problem; then why not address it? Does Compacting the context not help? |
|
| ▲ | adastra22 6 hours ago | parent | next [-] |
| Compacting the conversation almost never helps. It is uniformly worse than starting over with fresh context, or rewinding to a last-known-good state. It only exists because it increases engagement. |
| |
| ▲ | enraged_camel 2 hours ago | parent [-] | | This does not match my experience. I use long-running orchestrator sessions. Each orchestrator is in charge of planning, writing kick-off prompts for implementers, answering questions from those implementers, doing code reviews and providing feedback, and answering side questions from me when I have them. Depending on the initiative I might compact a session a dozen times, sometimes more. It is lossy, and the session certainly tends to forget earlier bits as more compactions happen, but overall it's a much better experience than starting fresh and having to re-explain everything. The only time I compact is if the session goes wildly off-course and the context gets polluted with off-topic conversations. Also worth noting: with Claude Code you can provide custom instructions when compacting, and instruct the LLM that is in charge of compacting the session to prioritize the retention of specific bits. It can help a lot. |
|
|
| ▲ | cautiouscat 6 hours ago | parent | prev | next [-] |
| Compaction is a main cause of this problem. |
|
| ▲ | troupo 7 hours ago | parent | prev [-] |
| Compacting context compacts context. So Claude forgets a lot during compaction. |
| |
| ▲ | Maxatar 6 hours ago | parent [-] | | Compacting mostly gets rid of reasoning tokens, and honestly it would be nice of reasoning tokens did not constantly follow every follow up query. Asking even a simple/trivial question can have Claude use thousands of tokens. Compacting is good for getting rid of those. | | |
| ▲ | troupo 6 hours ago | parent [-] | | I've had Claude immediately fall back to its usual verbose style immediately after compaction. To be fair, I've had it do that immediately after re-reading the output style instructions, too. My chat history is filled with "Yes, I broke the language rule. Let me rephrase that and update my memory. — You already have that in memory — Yes, true, I ignored that" (because "Memory" is a yet another .md file) | | |
| ▲ | strbean 3 hours ago | parent [-] | | Claude Code supposedly supports a "post-compaction" hook, so you could have it automatically run the prompt "We just compacted the context, quickly refresh yourself on the rules in CLAUDE.md etc..". Depending on what you've got in those files, maybe that will just use up all the context again though. | | |
| ▲ | troupo 2 hours ago | parent [-] | | > supposedly supports a "post-compaction" hook, so you could have it automatically run the prompt Keyword "supposedly" :) I've had it in my settings forever, and still... Asking it to analyse and fix the issue it produced a plausible "my training supercedes/overrides settings especially if triggered by certain words in the phrase" (paraphrasing the long text) | | |
| ▲ | strbean 2 hours ago | parent [-] | | > Keyword "supposedly" :) > I've had it in my settings forever, and still... Checks out! I've never used it my self, so it I figured it likely didn't work at all. |
|
|
|
|
|