Ahead of time (background) context compaction to hide latency

Resolved 💬 2 comments Opened Nov 18, 2025 by lupuletic Closed Jan 10, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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_

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 9 months ago

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

  • #6077

Powered by Codex Action

etraut-openai contributor · 7 months ago

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