codex icon indicating copy to clipboard operation
codex copied to clipboard

Ahead of time (background) context compaction to hide latency

Open lupuletic opened this issue 1 year ago • 2 comments

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

lupuletic avatar Nov 18 '25 19:11 lupuletic

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

  • #6077

Powered by Codex Action

github-actions[bot] avatar Nov 18 '25 19:11 github-actions[bot]

This feature request hasn't received any upvotes in nearly two months, so closing.

etraut-openai avatar Jan 10 '26 03:01 etraut-openai