Custom Context Compaction

Open 💬 5 comments Opened Feb 28, 2026 by 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_

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗