Compacting resurfaces completed tasks

Resolved 💬 2 comments Opened Nov 1, 2025 by TheKnarf Closed Jan 10, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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).

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 10 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #6039
  • #5957
  • #5772
  • #5695

Powered by Codex Action

etraut-openai contributor · 7 months ago

We've made improvements in compaction since this bug was filed, so I'm going to close it. If you see similar behavior with the latest models, please file a new bug using the /feedback slash command.