Original Reddit post

Been working on a problem that I think a lot of people here face: agentic coding pipelines blowing through their context window way too fast, losing important information, and degrading task quality mid-session. Apohara Context Forge is my approach to this. It’s a methodology + implementation for structured context assembly in LLM agents — basically a tiered relevance scoring system that decides what goes into the context window and in what order, depending on the current task and agent role. Key ideas:

  • Role-aware context segmentation (different agents need different context shapes)
  • Tiered priority scoring to evict low-value tokens first
  • Benchmarked against vanilla context packing — significant improvement in task completion on long sessions
  • Works with any model (Claude, GPT-4o, Gemini, local models) 📄 Paper (Zenodo, DOI): https://zenodo.org/records/20114594 💻 GitHub: https://github.com/SuarezPM/Apohara_Context_Forge Happy to answer questions or discuss the design decisions. submitted by /u/LinconV

Originally posted by u/LinconV on r/ClaudeCode