You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What terminal emulator and version are you using (if applicable)?
iTerm2
What issue are you seeing?
Every time now - when the context is around 15% or less, auto-compaction can hang indefinitely (waited for 30 minutes) - it just says "working" but I'm assuming it's compacting since at that point it usually does.
What steps can reproduce the bug?
Give codex some work that would fill up the entire context and force it to compact, after the first or second time it'll just hang on "working" if the context is around 15% or lower.
I end up quitting codex, re-starting (at that time it doesn't even show me the normal resume with ... message) and then manually /resume the session, then run a manual /compact which finally works).
What is the expected behavior?
No response
Additional information
No response
Reacted by Nils 🧮, Teneko and Mitchell van der Hoeff
You'd think compaction would be good for the cluster: a one-time pass that shrinks session context and reduces future token load. But with sessions hanging for tens of minutes, it almost feels like compaction requests are getting stuck or deprioritized.
Could this be because compaction replaces the prompt prefix and invalidates existing KV/prompt cache state, forcing the request onto a slower path? It feels like OpenAI is slapping compactions with (counterintuitive) penalization/throttling.
This is still ongoing. And it indeed only happens to me if I queue a message after compaction (thanks @timhaak). Hung for ~15 min. A manual compact finished in <1min.
Activity
github-actions commentedon Mar 12, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
nilswx commentedon Mar 12, 2026
You'd think compaction would be good for the cluster: a one-time pass that shrinks session context and reduces future token load. But with sessions hanging for tens of minutes, it almost feels like compaction requests are getting stuck or deprioritized.
Could this be because compaction replaces the prompt prefix and invalidates existing KV/prompt cache state, forcing the request onto a slower path? It feels like OpenAI is slapping compactions with (counterintuitive) penalization/throttling.
Grallen commentedon Mar 14, 2026
This may only happen when you use gpt-5.4 instead of a codex model like gpt-5.3-codex. I was able to switch models, compact, and then switch back.
timhaak commentedon Mar 26, 2026
For me, it only happens if it's compacting and I queue a message for after compaction.
piazzatron commentedon May 25, 2026
This is still ongoing. And it indeed only happens to me if I queue a message after compaction (thanks @timhaak). Hung for ~15 min. A manual compact finished in <1min.