Skip to content

[FEATURE]: disable auto-compact option #3325

Closed

Description

@k1064190

Feature hasn't been suggested before.

  • 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.

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Oct 21, 2025
  2. github-actions commented on Oct 21, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  3. simonxabris commented on Oct 21, 2025

    @simonxabris

    (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.

  4. rekram1-node commented on Oct 21, 2025

    @rekram1-node
    Collaborator

    @simonxabris nailed it

  5. kajdo commented on Oct 31, 2025

    @kajdo

    @simonxabris just dropped by to say "THANK YOU MATE!"

  6. aminroosta commented on Feb 18, 2026

    @aminroosta

    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.

  7. 621625 commented on May 29, 2026

    @621625

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionUsed for feature requests, proposals, ideas, etc. Open discussion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions