Fixed long-horizon task drift on local setups using a deterministic state plugin
Mirrored from r/LocalLLaMA for archival readability. Support the source by reading on the original site.
| Ran into an annoying issue with local models on long tasks. Once context window compaction hits after a few thousand tokens, the model loses sight of the original scope. Even with good system prompts, a few compaction cycles cause goal drift, hallucinated task completion, or loops. Wrote a small plugin to force deterministic tracking instead of relying purely on context memory:https://github.com/janpauldahlke/dsh-local-long-horizon How it works &&& what is on screenThe plugin hooks into the agent loop and maintains a structured state outside the main chat buffer. Looking at the UI:
When the agent compacts context, the plugin re-anchors the model to this exact state file rather than trusting the lossy summary generated during compaction. Code is on GitHub if anyone wants to test or adapt it for their own local rig setup. Feedback or PRs welcome. [link] [comments] |
More from r/LocalLLaMA
-
The AI race: China's open-weight models trail US closed models by just 7 months
Oct 14
-
Anthropic Executive Says Open-Source AI Models Are Higher Risk
Oct 14
-
ComfyUI v0.40.0 released
Oct 14
-
So this is how they do it --> RTX 5090, once a consumer gaming card, is now on smugglers’ menu alongside cigarettes
Oct 14
Discussion (0)
Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.
Sign in →No comments yet. Sign in and be the first to say something.