Skip to content

Compaction loses entire conversation #14368

Closed

Description

@buildgreatthings

Description

When I reach context limits, compaction occurs. Opencode forgets what's going on ⚙ _noop

Image

Plugins

No response

OpenCode version

1.2.6

Steps to reproduce

  1. run a large context with sonnet 4.6
  2. wait for autocompact

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Feb 20, 2026

    @github-actions
    Contributor

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

    If your issue is distinct from these, please clarify what makes it different.

  2. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Feb 20, 2026
  3. Nindaleth commented on Feb 27, 2026

    @Nindaleth
    Contributor

    Do you use LiteLLM by any chance?

  4. buildgreatthings commented on Feb 27, 2026

    @buildgreatthings
    Author

    Sometimes, yes!

  5. obamor commented on Mar 3, 2026

    @obamor

    This happens to me every time compaction happens (automatically by reaching limit or manually).
    Only using LiteLLM

  6. Nindaleth commented on Mar 4, 2026

    @Nindaleth
    Contributor

    I don't think that _noop tool call is healthy for the context data and this tool is injected only for LiteLLM-like providers.

  7. DenisBY commented on Mar 22, 2026

    @DenisBY

    this plugin is really life-saver for such cases https://github.com/Opencode-DCP/opencode-dynamic-context-pruning

  8. 0x80O0oOverfl0w commented on Apr 25, 2026

    @0x80O0oOverfl0w

    Using the latest opencode with Qwen3.5-122B-a10b model on latest LM Studio, I have the same issue any time I run /compact. After that I can't use the session any more, I get the error message below.

    "Error rendering prompt with jinja template: "No user query found in messages.".\n\nThis is usually an issue with the model's prompt template. If you are using a popular model, you can try to search the model under lmstudio-community, which will have fixed prompt templates. If you cannot find one, you are welcome to post this issue to our discord or issue tracker on GitHub. Alternatively, if you know how to write jinja templates, you can override the prompt template in My Models > model settings > Prompt Template."

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions