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
Can you say more about why you want a manual compact command? We've implemented a robust auto compaction mechanism, so there should no longer be a need for developers to manage context windows manually. We've left manual compaction in the CLI for now, but our goal is to eventually remove it.
Reacted by MrRobot701, Akaiyo, Ignat Remizov, Khang Nguyen, Jaden Tripp, Feraidoon Mehri, Ricky, Max Studanski, Handola, jejuisland87654 and 78 more
Can you say more about why you want a manual compact command? We've implemented a robust auto compaction mechanism, so there should no longer be a need for developers to manage context windows manually. We've left manual compaction in the CLI for now, but our goal is to eventually remove it.
Normally, I do not create a new chat sessions, so my Codex chat history is just compactions after compactions.
Codex's compaction mechanism is very good! Plus, Codex does not need to re-read all the files.
The problem I usually run into without manual /compact: I may approve Codex's plan when it is at 70% of its context window, making Codex auto compact while it is in the middle of its work.
With manual /compact however, I will do /compact -> Context window is now only 10% full -> Codex has more context window to work on my task without auto compacting mid-work.
Reacted by Ignat Remizov, Feraidoon Mehri, edward-io, Oleksandr, Dmytro Kryvoruchko, Robert Adamyan, sahil-luzidos, Wang Weikang, pandec, Mostafa Dahab and 30 more
Can you say more about why you want a manual compact command? We've implemented a robust auto compaction mechanism, so there should no longer be a need for developers to manage context windows manually. We've left manual compaction in the CLI for now, but our goal is to eventually remove it.
Here's my workflow for long-running tasks which works well:
Well, the "robust auto compaction mechanism" doesn’t work for me. When the context gets close to 258k but not close enough the auto compaction fails with this error. And you have to salvage the context by asking gpt to parse the session in another session.
Reacted by Khang Nguyen, Ignat Remizov, Ricky, gad45, duckSquirrelPilot, Mostafa Dahab, Heinrich-XIAO, LanTu, Timothy Wang, Isaac Chen and 1 more
+1, having control over compaction and context management (as well as more transparency into what is the prompt after compaction) is invaluable to proper workflows
Reacted by Khang Nguyen, Ignat Remizov, Dmytro Kryvoruchko, Robert Adamyan, duckSquirrelPilot, Mostafa Dahab, Henric Carlsson, Heinrich-XIAO, LanTu, drash-course and 4 more
yes, same. i do lots of spec work before letting it lose and need lots of context at times. so i find myself opening new sessions so that i dont suffer a compaction event in the middle of the spec work, which needs as many details as it gets and compaction obviously loses lots of details
Reacted by Khang Nguyen, Ignat Remizov, duckSquirrelPilot, Alex Ryan, Heinrich-XIAO, LanTu and Deniz Gedik
Manual context compaction will enable us to control the timing of compaction and ideate our workflows based on when we want the context to be compacted rather than relying solely on auto-compaction. The developer's experience becomes more predictable with the models when context compaction can be manually controlled which is in case much valuable when the user only uses a single chat session for their work. Also, a question I could not get answer to from the docs: does context get shared between threads of a project? My understanding is that as of right now, it doesn't get shared across threads.
Reacted by Ignat Remizov, Khang Nguyen, Dmytro Kryvoruchko, duckSquirrelPilot, Heinrich-XIAO, LanTu, lekovic6, Vladimir Shefer and Deniz Gedik
/compact is an essential part of my workflow. Just like with the model picker, I need control over my setup. I don't trust automatic mechanisms for this kind of thing(yet). I regularly see performance degradation when I approach 20% context left and when I use /plan on xhigh, often the context window will only have 10% left. I understand GPT-5.3-Codex performs better than other frontier models even at high context usage and that context is lost in compaction, but I want to completely avoid any performance degradation. Basically, the problem is Codex is entering the dumb zone(https://youtu.be/rmvDxxNubIg?t=355&si=aSHUwLLoTa05e1yF) in the app and the user has no way to manually compact to avoid it. If users had the ability to configure a compaction threshold, this dumb zone could be completely avoided.
Reacted by Khang Nguyen, Ignat Remizov, Dmytro Kryvoruchko, Mostafa Dahab, QL, LanTu and Deniz Gedik
does context get shared between threads of a project?
@Undiluted7027 not really. the maintainers are working on a SQL-backed memory system, still under development. Best sharing of context cross-thread is via AGENTS.md and SKILL.md files, or my preferred method recently, spec-kit files.
Reacted by Khang Nguyen, Kaden Wilkinson, miraclebakelaser, PiEgg, Sanchit Jain, Daniel Cervenkov, Angelo D'Ambrosio, Grzegorz Roguski, Vladimir Shefer, mommysgoodpuppy and 1 more
See it on Version 26.429.61741 (2429). I've had slash commands disappear for me due to configs (#17772), perhaps try clearing out config.toml and seeing if compact is still missing.
In the app I often get "Codex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying." after a long session.
Doing a compact fixes this. However, because I cannot do this from the app I need to:
In the app I often get "Codex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying." after a long session.
Doing a compact fixes this. However, because I cannot do this from the app I need to:
Activity
github-actions commentedon Feb 10, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
etraut-openai commentedon Feb 10, 2026
Can you say more about why you want a manual compact command? We've implemented a robust auto compaction mechanism, so there should no longer be a need for developers to manage context windows manually. We've left manual compaction in the CLI for now, but our goal is to eventually remove it.
Khang5687 commentedon Feb 10, 2026
Normally, I do not create a new chat sessions, so my Codex chat history is just compactions after compactions.
Codex's compaction mechanism is very good! Plus, Codex does not need to re-read all the files.
The problem I usually run into without manual
/compact: I may approve Codex's plan when it is at 70% of its context window, making Codex auto compact while it is in the middle of its work.With manual
/compacthowever, I will do/compact-> Context window is now only 10% full -> Codex has more context window to work on my task without auto compacting mid-work.miraclebakelaser commentedon Feb 11, 2026
Here's my workflow for long-running tasks which works well:
Khang5687 commentedon Feb 11, 2026
Thanks @miraclebakelaser, this is a useful knowledge to me.
So you do manual compaction right?
miraclebakelaser commentedon Feb 11, 2026
@Khang5687 yes
MrRobot701 commentedon Feb 11, 2026
Well, the "robust auto compaction mechanism" doesn’t work for me. When the context gets close to 258k but not close enough the auto compaction fails with this error. And you have to salvage the context by asking gpt to parse the session in another session.
ignatremizov commentedon Feb 11, 2026
+1, having control over compaction and context management (as well as more transparency into what is the prompt after compaction) is invaluable to proper workflows
thisIsLoading commentedon Feb 12, 2026
yes, same. i do lots of spec work before letting it lose and need lots of context at times. so i find myself opening new sessions so that i dont suffer a compaction event in the middle of the spec work, which needs as many details as it gets and compaction obviously loses lots of details
Undiluted7027 commentedon Feb 13, 2026
Manual context compaction will enable us to control the timing of compaction and ideate our workflows based on when we want the context to be compacted rather than relying solely on auto-compaction. The developer's experience becomes more predictable with the models when context compaction can be manually controlled which is in case much valuable when the user only uses a single chat session for their work. Also, a question I could not get answer to from the docs: does context get shared between threads of a project? My understanding is that as of right now, it doesn't get shared across threads.
jadentripp commentedon Feb 13, 2026
/compact is an essential part of my workflow. Just like with the model picker, I need control over my setup. I don't trust automatic mechanisms for this kind of thing(yet). I regularly see performance degradation when I approach 20% context left and when I use /plan on xhigh, often the context window will only have 10% left. I understand GPT-5.3-Codex performs better than other frontier models even at high context usage and that context is lost in compaction, but I want to completely avoid any performance degradation. Basically, the problem is Codex is entering the dumb zone(https://youtu.be/rmvDxxNubIg?t=355&si=aSHUwLLoTa05e1yF) in the app and the user has no way to manually compact to avoid it. If users had the ability to configure a compaction threshold, this dumb zone could be completely avoided.
NightMachinery commentedon Feb 13, 2026
Giving users options never hurts. Auto-compaction is great, auto-compaction plus manual option is even better.
ignatremizov commentedon Feb 13, 2026
@Undiluted7027 not really. the maintainers are working on a SQL-backed memory system, still under development. Best sharing of context cross-thread is via AGENTS.md and SKILL.md files, or my preferred method recently, spec-kit files.
43 remaining items
timurkhakhalev commentedon Apr 16, 2026
Tibo finally heard us
https://x.com/thsottiaux/status/2044591035532378511
miraclebakelaser commentedon Apr 16, 2026
we did it, folks
timothyw553 commentedon Apr 16, 2026
"codex can you add a command '/compact' which calls the the existing compact command?"
all it took was an 80 comment thread and pushback... woohoo!
Itsindigo commentedon Apr 17, 2026
wooohooo, beautiful feature
etraut-openai commentedon Apr 17, 2026
This feature is now implemented!
devops-taehoon-kim commentedon May 4, 2026
I Can`t use /compact feature
Version 26.429.30905(2345)
eefan000 commentedon May 6, 2026
They quietly removed the feature, just to close this issue, they added a version first and then deleted it!
eefan000 commentedon May 6, 2026
Can you explain why this feature was removed again
miraclebakelaser commentedon May 6, 2026
See it on Version 26.429.61741 (2429). I've had slash commands disappear for me due to configs (#17772), perhaps try clearing out config.toml and seeing if compact is still missing.
Molunerfinn commentedon May 8, 2026
Hi @etraut-openai , why this feature was removed again?
ravesteijnd commentedon Jun 15, 2026
In the app I often get "Codex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying." after a long session.
Doing a compact fixes this. However, because I cannot do this from the app I need to:
Why was this feature removed?
Pzixel commentedon Jun 15, 2026
don't you have the /compact command?
Version 26.609.41114 • Released 12 Jun 2026
ravesteijnd commentedon Jun 15, 2026
I just updated the app, I have it now. Thanks