-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Description
This is hard to replicate, but I just noticed after an auto compaction that it resurfaced tasks it had already done earlier in the session. As a consequence it wasted a bunch of the context window and usage limits on just redoing work or discovering that it was already done.
There is something off about how the compacting step works, instead of doing it whenever it runs out of context window I think it should instead do it proactivly. The TUI clearly have a concept of tasks, so if you keep an internal SQLite database with them you can ensure that it doesn't resurface tasks it has already done. And after each session of work it usually already writes a summary for the end user and asks what to work on next, so the "automatic compacting" probably only needs to take the bit of the context in-between last time it and now.
I belive Claude uses a technique where they routinely compacts the output of tool calling in the back of the log, that way continuously compacting the things that take up the biggest part of the context.
(Not really sure if this is a feature request or a bug report, but more of a plea to improve the way it handles the context window and auto compacting).