4 ms·
I love OpenCode! I wrote a plugin that adds two tools: prune and retrieve. Prune lets the LLM select messages to remove from the conversation and replace with a
by planckscnst 6mo ago
I love OpenCode! I wrote a plugin that adds two tools: prune and retrieve. Prune lets the LLM select messages to remove from the conversation and replace with a summary and key terms. The retrieve tool lets it get those original messages back in case they're needed. I've been livestreaming the development and using it on side projects to make sure it's actually effective... And it turns out it really is! It feels like working with an infinite context window.
https://www.youtube.com/live/z0JYVTAqeQM?si=oLvyLlZiFLTxL7p0 https://www.youtube.com/live/z0JYVTAqeQM?si=oLvyLlZiFLTxL7p0
- advael 6mo agoSeems interesting, but at a glance I can't find a repo or a package manager download for this. Have you made it available anywhere?
- sheo 6mo agoI found the opencode fork repo, but no plugin seems available so far https://github.com/Vibecodelicious/opencode https://github.com/Vibecodelicious/opencode
- weird-eye-issue 6mo agoThat doesn't sound all that useful to be honest and would likely increase costs overall due to the hit to prompt caching by removing messages
- embedding-shape 6mo ago> would likely increase costs overall Assuming you pay per token, which seems like a really strange workflow to lock yourself into at this point. Neither paid monthly plans nor local models suffer from that issue. I tried once to use APIs for agents but seeing a counter of money go up and eventually landing at like $20 for one change, made it really hard to justify. I'd rather pay $200/month before I'd be OK with that sort of experience.
- weird-eye-issue 6mo agoYes I use the $200 per month plan for Claude Code and it's amazing I assume the usage varies based on prompt caching, but I could be wrong. Why would you assume prompt caching would have zero effect on the subscription usage?
- signal_v1 6mo agoThe $20-per-change problem is a workflow problem, not a pricing problem. Batching work into larger well-scoped sessions rather than interactive back-and-forth changes the unit economics significantly. Most people use these tools like a terminal — one command at a time — which is the worst possible cost profile.
- weird-eye-issue 6mo agoIt's absolutely a pricing problem. I use claude code in both of those ways and neither is more valid than the other it just depends what you are working on. You should not avoid back and forth with the agent just because you think it might cost more. Also due to prompt caching it doesn't even cost that much compared to large changes like you are talking about.
- manmal 6mo agoHave a look how pi.dev implements /tree. Super useful
- computerex 6mo agoHey I built that into my harness! http://github.com/computerex/z http://github.com/computerex/z Long tool outputs/command outputs everything in my harness is spilled over to the filesystem. Context messages are truncated and split to filesystem with a breadcrumb for retrieving the full message. Works really well.
- signal_v1 6mo agoThe infinite context window framing is the right way to think about it. Running inside Claude Code continuously, the prune step matters more than retrieve in practice — most of what gets dropped stays dropped. More useful is being deliberate about what goes in at the start of each loop iteration rather than managing what comes out at the end.
- esafak 6mo agoThat borks the cache and costs you more.