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
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
I don't want opencode to auto-compact before reaching full-context size.
Claude code already supports this feature and It's possible to manually use compact command when the model reach the full context.
This is very useful since auto-compact often doesn't work as I expect.
Reacted by david ben-kalifa, Tema Smirnov, carson, learningbetter, heart-ktf, Vlyn, Soul Evans, Christoph Döllinger, endolith and may o'nnaise
This issue might be a duplicate of existing issues. Please check:
[Feature Request] Add User Controls for Context Management #1990: [Feature Request] Add User Controls for Context Management - requests manual control over context including commands like /tokens and /clear, which relates to wanting manual control over compaction timing
(Not affiliated with the project just happened to see the issue)
There are two environment variables that could help you out:
OPENCODE_DISABLE_AUTOCOMPACT : This controls whether opencode triggers the a compaction when the token usage exceeds the context window. This should happen very infrequently.
OPENCODE_DISABLE_PRUNE: This control whether opencode automatically triggers pruning old tool call results to save context window.
I think what you want is setting OPENCODE_DISABLE_PRUNE to true, this will preserve everything in the context and then you can run /compact yourself when you want to.
Reacted by kajdo, Hamza, Pavel, Damian Mullins, Julian Coy, seanmamasde, heart-ktf, Nikhil M, Daniel Abakah and Christoph Döllinger
I've found the default auto compact behaviour to be very frustrating for my use case. I put a lot of effort into building specific context windows for research, and having that context disappear unexpectedly is a huge blow to productivity. I really feel that this should be an opt-in setting rather than the default.
Reacted by CZ, ksleta, Emanuel Aguirre, heart-ktf, Ambi, Ryan Osborne, Vlyn, VooDisss, Felix, Sahaj Bhatt and 9 more
Absolutely hate auto-compaction to be honest. Continue with this kind of "features" and I will start using a fork of opencode or another competitor. Who was the genius behind this "feature"? Fake instructions telling the computer to continue if it knows what to do? Which leads to enormous production problems? Compacting without warning? What is wrong with you people? Who is responsible for UX/UI at opencode? Hint: hire someone from Tokyo for UX/UI. Those Nintendo guys are excellent at understanding user's feelings.
You have to protect your user's feelings. Don't you understand that? Don't annoy the users. Make the users feel warm and safe, like a mother cradling its child. There is no contradiction between this and technical excellence.
#Tree
Reacted by Karol Baraniecki, Christoph Döllinger, Biniyam G. and endolith
Activity
github-actions commentedon Oct 21, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
simonxabris commentedon Oct 21, 2025
(Not affiliated with the project just happened to see the issue)
There are two environment variables that could help you out:
OPENCODE_DISABLE_AUTOCOMPACT: This controls whether opencode triggers the a compaction when the token usage exceeds the context window. This should happen very infrequently.OPENCODE_DISABLE_PRUNE: This control whether opencode automatically triggers pruning old tool call results to save context window.I think what you want is setting
OPENCODE_DISABLE_PRUNEtotrue, this will preserve everything in the context and then you can run/compactyourself when you want to.rekram1-node commentedon Oct 21, 2025
@simonxabris nailed it
kajdo commentedon Oct 31, 2025
@simonxabris just dropped by to say "THANK YOU MATE!"
aminroosta commentedon Feb 18, 2026
I've found the default auto compact behaviour to be very frustrating for my use case. I put a lot of effort into building specific context windows for research, and having that context disappear unexpectedly is a huge blow to productivity. I really feel that this should be an opt-in setting rather than the default.
621625 commentedon May 29, 2026
Absolutely hate auto-compaction to be honest. Continue with this kind of "features" and I will start using a fork of opencode or another competitor. Who was the genius behind this "feature"? Fake instructions telling the computer to continue if it knows what to do? Which leads to enormous production problems? Compacting without warning? What is wrong with you people? Who is responsible for UX/UI at opencode? Hint: hire someone from Tokyo for UX/UI. Those Nintendo guys are excellent at understanding user's feelings.
You have to protect your user's feelings. Don't you understand that? Don't annoy the users. Make the users feel warm and safe, like a mother cradling its child. There is no contradiction between this and technical excellence.
#Tree