r/LocalLLM • u/fintip 2x XTX 7900 + 3060 • Nov 01 '26
Discussion Solving a complex multi-task with 262k vs 128 context dropped performance from 91% to 57%... Then I made two changes. Solves with 128k went up to 94%.
I've been benchmarking local models as coding agents in opencode on real bugs in a real codebase, graded by hidden tests. The hardest tasks bundle 6–12 independent bugs into one request. At a 128k window, Qwen3.8-Flash-Next (IQ3_XXS, 2× 7900 XTX) kept "finishing" early with half the bugs untouched.
What was happening (from the recorded requests):
- When the context fills up, opencode replaces the conversation with a model-written summary. The original request is gone.
- The first summary lists every bug. Later summaries are summaries of summaries and only keep "completed" and "in progress", so bugs not started yet quietly drop out.
- After the summary, opencode adds "Continue if you have next steps, or stop and ask for clarification". The agent reports what it did and stops. One run literally asked me to paste issues 3, 4, 5, 7, 8 and 9 again because it no longer had them.
Two fixes, as a small opencode plugin:
- Re-insert: after every compaction, put the original request back word for word.
- Checklist: tell the summarizer to start every summary with a checklist of every item in the original request, marked done / in progress / not started, and never drop one. Then have the agent sync its todo list to that checklist and check it before finishing.
Results (4 multi-bug tasks, 79 hidden checks, 128k window):
┌─────────────────────────────────────────────────────┬────────┐
│ Setup │ passed │
├─────────────────────────────────────────────────────┼────────┤
│ Stock opencode │ 57% │
├─────────────────────────────────────────────────────┼────────┤
│ Checklist only │ 82% │
├─────────────────────────────────────────────────────┼────────┤
│ Re-insert only │ 90% │
├─────────────────────────────────────────────────────┼────────┤
│ Both │ 94% │
├─────────────────────────────────────────────────────┼────────┤
│ Same model, no fixes, 262k window (rarely compacts) │ 91% │
├─────────────────────────────────────────────────────┼────────┤
│ Claude Opus 5.5 (19 runs, same tasks) │ 94% │
└─────────────────────────────────────────────────────┴────────┘
So at 128k the fixes undo effectively all the damage compaction does--and perhaps even help on top of that. On these long tasks, a quantized local model then matches Opus on sub-tests. (Opus still fully solves more of the tasks outright.)
Caveats:
- One run per setup on the local side, and only 4 tasks. An earlier pilot showed the same direction.
- Single-bug tasks didn't change; they rarely compact, so no difference between 128k and 262k on those tasks.
It seems painfully obvious and I'm kind of shocked no one else has done this.
There's an opencode issue about todos being cleared on compaction (#5934 (https://github.com/anomalyco/opencode/issues/5934)) and an open PR that carries todos over (#25982 (https://github.com/anomalyco/opencode/pull/25982)). Nothing I've seen re-inserts the original request, and in my runs that was the bigger win.
Had claude push it out there as a plugin for anyone that wanted to test it themselves:
Plugin: https://github.com/kylebakerio/opencode-compaction-anchor
I'm doing more tests, but these early results were so direct that I decided to share this right away.
fwiw, my output is shared at:
https://lab.kylebaker.io
I don't sell anything or care if people visit. I've just spent the last month+ non-stop running local benchmarks and building out and upgrading my local benchmarks and had built my own dashboard to manage and view it all, so eventually decided I may as well throw it out there.
Finally, I've not really put this out there before, but for anyone that wants to replicate what I'm doing--I don't share MY benchmark of bugs, but the harness and framework that would allow you to build your OWN benchmark from your OWN git history is here:
https://github.com/kylebakerio/LL-Dash
(drafted with claude because of time, then hand-edited.)
View all comments
Show parent comment
1
u/wegster Nov 01 '26
Huh - long time sw eng that shifted roles, worked at an AI/ML company for some time and lol - this is a new one on me. Will go check it out, thanks! Sounds like 'updated cscope' but will go take a look!