Open-source context engine rebuilds agent prompts from scratch to eliminate context rot

line9779 · reddit · 2026-12-01

A Reddit user open-sourced a "context engine" targeting context rot in long-horizon agent tasks: instead of stuffing everything into the prompt, summarizing history, or fuzzy RAG chunks, all task materials (docs, tool schemas, prompts, memory) live in an immutable SHA-256-hashed store, and a clean working prompt (capped at 24,576 tokens) is rebuilt from scratch every step with no truncation.

How it works:

It works with no model at all, any OpenAI-compatible endpoint, or your own selector. The author fine-tuned Qwen3 8B with QLoRA as the selector and shipped the full training pipeline and dataset in the repo.

Original post →

More from coding & agent

coding & agent channel →