← Back to all articles
Reddit r/LocalLLaMASeptember 22, 2026

I built a cache-friendly context compacting plugin for OpenCode

Excerpt

https://github.com/lennartschoch/opencode-cache-compact The default context compacting mechanism in OpenCode strips a bunch of tokens from the beginning of the conversation (system prompt, tools etc). This is fine for hosted models, but on a local model this means you'll prefill the entire conversation that's already cached. I built a plugin that keeps the conversation as-is, prompts the model to write a summary and then transforms the conversation to erase everything aside from system prompt, t