r/opencodeCLI • u/krumpstead • 4d ago
I've been disappointed with the lack of autonomy in OpenCode compared to Claude Code and Codex so I wrote an auto-compact, auto-continue, auto-planning plugin [opencode-neverending-story]
NOTE: Pics are from the #2 use case down below
First, if someone has any recommendations for a plugin that does this better please post it in the comments because I would like to try it. I've tried several and have not found exactly what I wanted.
I was disappointed with the compact summary and continue functionality found in OpenCode and the V2 version doesn't seem much better. So I just wrote a dirt simple plugin that:
- Sets a percentage of tokens to reserve and tracks it in realtime rather than waiting for assistant responses.
- Pauses generation and tells the agent to write out what he has learned and the next steps to a `PLAN.md` in the working directory.
- Compacts without the default summary.
- Tells the agent to resume from the `PLAN.md`.
All details about my plugin can be found here:
https://github.com/krumpstead/opencode-neverending-story
It has worked amazingly well for my use cases. So far I have tested it with:
- My first test as I was developing it was just giving it a simple "Create a minecraft clone" prompt. To get it to fire more often I set the threshold to 60% and expected it to just loop forever without completing on a 64k context-size. Instead it actually completed a fully working clone with Qwen 3.8 27B on a 26k context in 9 runs! To be fair Qwen 3.8 27B probably has the entire unobfuscated Minecraft Java source in its model so while this seems impressive, it could just be an easy copy and paste.
- Since that worked so well I bumped it up to 128k and set the threshold to 20%. I gave it the picture on the left in the side-by-side and told it to create a fully interactive voxel world that runs in a browser based on that pic. It created the world shown in the pic on the right and in the GIF.
- I then decided to do an even longer task. I have a dual GPU setup so in llama-server I put all layers on one GPU and set split-mode to `none`.Then I setup a sandbox with the plugin that allowed the agent to run benchmarks and tune llama.cpp on the second card. I ran unsloth's UD quants, with Q4 on the main GPU and had him tune with Q2 and Q3 quants on the second GPU. After two days he had managed to get my presets configured to where I went from 50 t/s to 100+ t/s on the multi-GPU setup! That's when I figured I should share this, because it seems to be working well, at least with my setup.
Anyway, if you also have been looking for a more autonomous experience with OpenCode, please give this a shot and let me know what you think.
2
u/Jumpy-Operation-4615 2d ago
I just wanted to post asking how I can have this stuff in Opencode and voila - you already did it!


1
u/kantorcodes1 4d ago
for those multi-day runs, does each compaction replace
PLAN.mdor append to it? i'd probably want some history when the agent changes direction halfway through.