Skip to content

Custom Context Compaction #13142

Open
Open

Description

@saulrichardson

What variant of Codex are you using?

Codex App

What feature would you like to see?

You should allow for customizable compaction routines. This could help solve the context window issues people run into when using MCPs. I want my agent to read and have access to all that information but only for while I'm using the MCP. When I'm done it doesn't need to be in the window at all. People should have more control of what gets compacted and how, not to mention when. Context compaction is important for better controllability when it comes to agents. I should be able to see everything that is in the window, specify what parts should be more compacted versus others or make sure that certain tool calls remain the in window, etc.

Additional information

No response

Activity

  1. saulrichardson commented on Feb 28, 2026

    @saulrichardson
    Author

    duplicate

  2. saulrichardson commented on Feb 28, 2026

    @saulrichardson
    Author

    reopening as this request is specific to codex app while other issues are for cli

  3. joshua-bone commented on Mar 23, 2026

    @joshua-bone

    +1 PLEASE give us better compaction options

    I routinely run into compaction error loops where I have to discard my whole thread.

  4. added
    contextIssues related to context management (including compaction)
    on Apr 2, 2026
  5. mahdikayvan commented on May 10, 2026

    @mahdikayvan

    @saulrichardson Hey — I felt this issue immediately, and it is very close to the exact pain I’m trying to solve.

    I’m building AgaveCore, and I’d like to let a few early people use it for free while I shape it into something stronger.

    It helps when a coding agent starts to drift, loses important context, or gives you an output you do not fully trust.

    In practice, it works through two habits:

    • tell the agent to remember-progress or remember-this when something important should not be lost
    • use consult-brain when the current task needs more grounded feedback on what to do next

    Over time, as useful journals, decisions, and failures pile up, the product should help the agent make sharper decisions and take better actions with less drift.

    If this sounds relevant, reply here and I’ll send the exact steps. You can also use the email or Telegram on my profile.

    Cheers,
    Mads.

  6. tommedema commented on Sep 13, 2026

    @tommedema
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

    contextIssues related to context management (including compaction)enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions