CogniKernel offers persistent and structured memory specifically designed for coding sessions. By extracting important decisions and consolidating them into an event-sourced store, it ensures previous choices are seamlessly integrated back into future work. This avoids unnecessary re-decisions and enhances workflow efficiency, all while keeping sensitive data local.
CogniKernel: Persistent Project Memory for Enhanced Coding Sessions
Every fresh session with Claude Code or Codex starts from zero. You re-explain why you picked Redis over Postgres for the queue. You watch the agent cheerfully suggest the caching approach you killed two days ago. You burn the first quarter of every session re-deriving context that already existed in your head — and in your last session.
CogniKernel fixes this with persistent, typed, event-sourced memory that follows your project across tools and sessions — and it does it without an LLM in the loop.
Why that matters
Most memory tools work by shipping your transcripts off to a model and asking it to "summarize what mattered." That means an extra API key, per-session token cost, added latency, and your code leaving your machine. CogniKernel treats memory extraction as classification, not generation: a deterministic sanitize → classify → consolidate pipeline backed by two small fine-tuned ONNX encoders (~130MB, CPU, milliseconds) that score salience and detect when a new decision supersedes an old one. No API calls, no tokens billed, nothing leaves your machine. The only model doing any "thinking" is the coding agent you're already running.
It's not a vector-DB wrapper
Retrieval is lexical-first (FTS5 BM25) fused with optional dense embeddings via reciprocal rank fusion — not pure vector search. Memory is typed, not free-text chunks: DECISION, CONSTRAINT_HARD/SOFT, and — critically — APPROACH_ABANDONED_DO_NOT_RETRY, so dead ends get their own graveyard instead of quietly vanishing. A dedicated prohibition_search pool means a "do not do X" rule can't get crowded out by unrelated prose right when you're about to do X.
Fails open, always. Every hook swallows its own failure, logs a warning, and lets the session continue. Memory is an enhancement, never a dependency — and memlora doctor --strict gives you a real health report instead of silent degradation.
Cross-platform by design. One SQLite store per project, alias-aware across Windows/WSL/native paths. A decision made in Codex shows up in your next Claude Code session's context block, and vice versa.
The numbers back it up. In a three-arm benchmark (CogniKernel vs. flat notes vs. no memory) across real multi-session projects: 2–4× fewer file reads in every project tested (best case: 3 reads vs. 29), and 18–23% lower price-weighted token cost on projects with evolving decisions — reported honestly, not cherry-picked from raw token counts that would look better but ignore cache discounting.
Observe → Extract → Consolidate → Store → Retrieve → Assemble → Inject
No comments yet.
Sign in to be the first to comment.