anomalyco / anomalyco/opencode
Manually input model context limits are ignored by automatic compaction
Open
@kitlangton is already working on this.
Since Jul 30, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Automatic compaction does not work when context limits are set manually. I expected compaction to occur before reaching the 200k token limit, but that is not the case.
Here part of opencode.json:
"provider": {
"github-copilot": {
"models": {
"gpt-5.6-terra": {
"limit": {
"context": 200000,
"output": 32000
}
}
}
}
},
"compaction": {
"auto": true,
"prune": true,
"reserved": 32000,
"tail_turns": 2,
"preserve_recent_tokens": 10000
}
Plugins
No response
OpenCode version
1.18.9
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.