Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Feature Request: Add compaction threshold percentage option #2326

@smnuman

Description

@smnuman

Description

Would be helpful to have a configurable percentage threshold for when auto-compaction triggers, rather than only at ~100% context usage.

Use Case

Proactively compact context at 50-62% usage to avoid unexpected compaction during critical work.

Proposed Solution

Add threshold option to oh-my-opencode config:

{
  \"compaction\": {
    \"threshold\": 0.55,  // 55% - midpoint of 50-62%
    \"auto\": true,
    \"prune\": true
  }
}

Or expose OpenCode's existing hooks (context-window-monitor, compaction-context-injector) to allow plugins to control trigger threshold.

Context

  • Using google/antigravity-claude-opus-4-6-thinking (200k context)
  • Current workaround in opencode.json with high reserved value isn't precise enough

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions