JIT Context OS: Sub-3ms Epistemic Memory Cascade for Autonomous Agents (EXP-009: Local 9B beats Gemini Flash) #8208
Wojciech Wiesner (wojciechwiesner)
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Problem: The Haystack Tax & Infinite Context Degeneracy
In multi-agent systems and autonomous coding loops, as tasks expand across multiple files and turns, the message history accumulates terminal outputs, file contents, and assistant reasoning. This triggers:
Proposed Solution: JIT Context OS Architecture
Instead of appending raw conversational history into prompts, we propose an Epistemic Context Cascade governed by deterministic invariants (I1–I10):
write_file,execute_commandexit codes), and the active working set.exit: 0, test pass): Weight 1.0Each turn passes ONLY:
<ONA_CONTEXT>capsule (1.2k – 1.8k tokens) containing the active user goal, current module interfaces, and verified runtime assertions.Empirical Proof: EXP-009 Benchmark ($599 Mac Mini vs Cloud API)
We evaluated this architecture in a blind, multi-file bug-fixing task (4 distinct bugs across 3 modules, verified by independent
pytestassertions):Key Takeaway: A 9B open-weight model running locally on consumer silicon solved the multi-file task in fewer turns than Gemini 3.8 Flash because its context was kept surgically lean (<1.8k tokens). Small models aren't incapable of complex reasoning—they have been suffocated by chat history.
Reference Implementation & Permanent DOI
The reference implementation, 10 formal invariants, and test suites are open source:
Would the AutoGen community and maintainers be interested in exploring epistemic context governors as a pluggable memory/context layer for multi-agent workflows?
All reactions