Ahead of time (background) context compaction to hide latency
What feature would you like to see?
When Codex CLI performs compaction it feels slow and blocking which hammers the developer experience. I was thinking whether Codex could support non-blocking, background compaction that triggers ahead of the context limit, so users can keep using it while context is being compacted.
When the context approaches a particular threshold of the context window (e.g. ~75%), automatically trigger a background compaction - however, keep letting the user continue to submit prompts while compaction runs, as long as there's still context window free / available.
When compaction completes, on next idle occasion, pre-append the compacted context in front of the last user turns / context.
This would make compaction effectively “instant” from the user’s perspective and reduce cases where long sessions feel sluggish.
Additional information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗