r/opencode • u/omeryasirkucuk • 10d ago
A different way to handle context in OpenCode: /rollover
I've been getting a bit tired of constantly dealing with context in OpenCode. Compaction, context limits, token costs, manually opening new sessions and then trying to get the new session up to speed again.
I wanted to get away from that workflow, so I built a /rollover method.
It basically monitors context usage and automatically transitions to a fresh context when needed, without interrupting the current task. It carries over the relevant context and keeps the same session ID, so you don't have to keep creating new sessions manually.Just published it on GitHub and npm.
GitHub: https://github.com/omeryasirkucuk/context-rollover
npm: https://www.npmjs.com/package/context-rollover
Give it a try if you're running into the same issues. You'll be first testers of it. So I need to hear from u. I'd really appreciate some feedback, especially from people using OpenCode for longer coding sessions. Let me know what you think or if you run into any issues.
2
u/deleted-account69420 9d ago
That does look it breaks cache.
2
u/ccss2 9d ago edited 9d ago
..