anomalyco / anomalyco/opencode

[FEATURE]: V2 plugin support for managing context-window transitions

Open
#47,810 0 comments 0 reactions 1 assignee View on GitHub

@rekram1-node is already working on this.

Since Sep 7, 2026.

2.0
Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Feature hasn't been suggested before.
  • I have verified this feature I'm about to request hasn't been suggested before.

The related V1 proposal is linked below; I did not find an existing request for this V2 capability.

Describe the enhancement you want to request

I’m building a V2 plugin that uses Astra’s native history and notes to continue across context windows without a generated summary.

The plugin can control which messages are sent to the model, but OpenCode’s builtin automatic compaction can run before that request hook or during context-overflow recovery. There doesn’t appear to be a supported way for a plugin to take over context-window transitions for the sessions it manages.

Could V2 expose a way to support this? The motivation is to integrate model-native context management through a plugin without requiring a custom OpenCode build.

I reproduced both compaction paths in an isolated runtime fixture on 0.0.0-beta-19157.

Related: #27366 proposed a compaction bypass for V1 but was closed for inactivity.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.