Skip to content

Compacting resurfaces completed tasks #6077

Closed

Description

@TheKnarf

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

Activity

  1. added
    contextIssues related to context management (including compaction)
    on Nov 2, 2025
  2. etraut-openai commented on Jan 10, 2026

    @etraut-openai
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcontextIssues related to context management (including compaction)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions