Skip to content

Context bloat occurs severely. I have configured automatic session compression and reserved tokens, yet automatic compression never triggers normally. This issue exists in every version of OpenCode. Please fix this problem as soon as possible. #24683

Closed as not planned

Description

@slamdunk111

Description

Your context window management is extremely poor, nowhere near as good as Claude Code.The current OpenCode CLI is incapable of multi-round conversations and long-duration continuous work, because context bloat happens constantly. Every time the context explodes, I have to clean it up manually. Claude Code never has this issue at all.
Your system never performs automatic context compression. I have tried numerous workarounds, including the DCP plugin, CodeMN and other solutions, but none of them work. Please fix this urgently.This tool is poorly developed and practically unusable.

Plugins

omo,dcp

OpenCode version

1.4.28

Steps to reproduce

Launch OpenCode;
Assign complex tasks such as code refactoring, code review, and unit test supplementation;
The context quickly becomes full after a while, with no automatic compression taking effect;
I have enabled automatic context compression and set a reserved token limit. Even after configuring a 50% reserved token ratio, compression still fails to trigger, making the settings completely ineffective;
Once the context blows up, all operations are blocked. I have to compress the context manually, which drastically reduces work efficiency.

Screenshot and/or share link

Image

Operating System

macos 26.3

Terminal

tabby terminal

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 27, 2026
  2. github-actions commented on Apr 27, 2026

    @github-actions
    Contributor

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

    If your issue is already covered by one of the above, please add a comment there with your specific details instead.

  3. slamdunk111 commented on Apr 28, 2026

    @slamdunk111
    Author

    similar issue, pleaese fix it ASAP

  4. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  5. sanjeev23oct commented on Jun 17, 2026

    @sanjeev23oct

    ZAP prevents this at the source rather than compressing after —
    casual turns (~31 tokens), skill injection only when triggered,
    AST index replaces blind file reads. Context stays lean per turn
    rather than growing and needing compression.

    https://github.com/zap-coding-agent/zap-coding-agent

  6. github-actions commented on Aug 17, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions