-
Notifications
You must be signed in to change notification settings - Fork 11.8k
Closed as not planned
Labels
coreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)
Description
Description
It would be great to have a configurable threshold for when auto-compaction triggers, specified as a percentage of context window usage.
Use Case
Instead of compaction only triggering when context is ~100% full, users should be able to set a percentage (e.g., 50-62%) to proactively compact before hitting limits.
Proposed Solution
Add a new config option like:
{
\"compaction\": {
\"auto\": true,
\"threshold\": 0.5, // 50% of context window
\"prune\": true,
\"reserved\": 10000
}
}Or alternatively, a percentage string:
{
\"compaction\": {
\"threshold\": \"50%\"
}
}Current Workaround
Currently users can set a high reserved value to force earlier compaction, but this isn't precise and doesn't achieve the same goal.
Context
- Model: antigravity-claude-opus-4-6-thinking (200k context)
- User request: trigger compaction at 50-62% token usage
Thanks for considering this!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
coreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)