Compact Context Command like Claude Code Or Something Similar #1418
Replies: 7 comments 2 replies
-
For anyone that finds this, if you need an interim solution, I will download the context, dump it in Google Gemini and ask Gemini to basically do above but without the need to split it into two. And then start a new task, and feed it the Compacted Context from Gemini. Slower then a single button click, but works reasonably well |
Beta Was this translation helpful? Give feedback.
-
I noticed that too in Claude Code - cool feature! |
Beta Was this translation helpful? Give feedback.
-
I was coming here to suggest a feature to be smarter about how context compaction works. I just looked at the code and it seemed pretty simple. I'm working on something right now where Roo is running commands that have a lot of output, but most of it is repetitive (the same error hundreds of times). When this happens, it fills the context, and then the current algorithm dumps the first part, and it loses track of what it's learned during the task. A smarter context compaction strategy could really improve the ability to continue on task. |
Beta Was this translation helpful? Give feedback.
-
Create a custom mode with this prompt:
Seems to work well. |
Beta Was this translation helpful? Give feedback.
-
The compact feature should work automatically as follows: 1 - Auto-Trigger Threshold 2 - Model Selection for Compaction 3 - Configurable Compaction Instructions 4 - Pre-Compaction Backup |
Beta Was this translation helpful? Give feedback.
-
This have been done in Cline: cline#3086 |
Beta Was this translation helpful? Give feedback.
-
what about intelligent context condensing? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The command for Claude Code is /compact and dear god is it ever useful, super helpful when you run out of context, or are starting to.
I'm guessing Claude Code goes through and does something like passing the context to to your model in 2 pieces, asking it to remove duplications within the context, remove log outputs, and to preserve files that may be in context. Then to go through and summarize anything else it can. Then it probably passes the rejoined pieces back in together and once more asks it to remove duplicates.
I think it wouldn't be super hard to do something like above, and it would be AMAZING feature for Roo Code. So freakin helpful.. there's definitely more complicated and robust ways you could go about it, keeping context pieces in sets of labeled containers, and rebuilding it as needed.
But I think the simple method would be a really good start.
Beta Was this translation helpful? Give feedback.
All reactions